diff --git a/hecl/extern/boo b/hecl/extern/boo index 6504bfc8c..295d100ca 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit 6504bfc8c87403801f38947b06ed2a30f10978fb +Subproject commit 295d100ca3879016083b4fc20b45d0001e2fc13e diff --git a/hecl/lib/Backend/GLSL.cpp b/hecl/lib/Backend/GLSL.cpp index 9a48c3225..ba427fc2c 100644 --- a/hecl/lib/Backend/GLSL.cpp +++ b/hecl/lib/Backend/GLSL.cpp @@ -118,7 +118,7 @@ std::string GLSL::makeVert(const char* glslVer, unsigned col, unsigned uv, unsig GenerateVertInStruct(col, uv, w) + "\n" + GenerateVertToFragStruct() + "\n" + GenerateVertUniformStruct(s, tm) + - "out VertToFrag vtf;\n\n" + "SBINDING(0) out VertToFrag vtf;\n\n" "void main()\n{\n"; if (s) @@ -173,7 +173,7 @@ std::string GLSL::makeFrag(const char* glslVer, GenerateVertToFragStruct() + "\nlayout(location=0) out vec4 colorOut;\n" + texMapDecl + - "in VertToFrag vtf;\n\n" + + "SBINDING(0) in VertToFrag vtf;\n\n" + lightingSrc + "\n" + "void main()\n{\n"; @@ -223,7 +223,7 @@ std::string GLSL::makeFrag(const char* glslVer, GenerateVertToFragStruct() + "\nlayout(location=0) out vec4 colorOut;\n" + texMapDecl + - "in VertToFrag vtf;\n\n" + + "SBINDING(0) in VertToFrag vtf;\n\n" + lightingSrc + "\n" + postSrc + "\nvoid main()\n{\n"; @@ -455,7 +455,7 @@ struct SPIRVBackendFactory : IShaderBackendFactory atUint32 vertSz = vertBlob.size() * sizeof(unsigned int); atUint32 fragSz = fragBlob.size() * sizeof(unsigned int); - atUint32 pipelineSz = pipelineBlob.size() * sizeof(unsigned int); + atUint32 pipelineSz = pipelineBlob.size(); size_t cachedSz = 15 + vertSz + fragSz + pipelineSz; diff --git a/hecl/test/main.cpp b/hecl/test/main.cpp index 12baebffc..0ed9abeaf 100644 --- a/hecl/test/main.cpp +++ b/hecl/test/main.cpp @@ -86,6 +86,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback /* Compile HECL shader */ static std::string testShader = "HECLOpaque(Texture(0, UV(0)))"; + //static std::string testShader = "HECLOpaque(vec4(1.0,1.0,1.0,1.0))"; hecl::Runtime::ShaderTag testShaderTag(testShader, 0, 1, 0, 0, 0, boo::Primitive::TriStrips, false, false, false); boo::IShaderPipeline* testShaderObj = shaderMgr.buildShader(testShaderTag, testShader, "testShader", ctx); @@ -200,7 +201,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback vubo->load(&vuboData, sizeof(vuboData)); gfxQ->setShaderDataBinding(binding); - gfxQ->draw(0, 4); + gfxQ->drawIndexed(0, 4); gfxQ->resolveDisplay(renderTex); gfxQ->execute();