mirror of https://github.com/AxioDL/metaforce.git
Update boo and GLSL backend for Vulkan
This commit is contained in:
parent
b8010759fb
commit
66774da1be
|
@ -1 +1 @@
|
||||||
Subproject commit 6504bfc8c87403801f38947b06ed2a30f10978fb
|
Subproject commit 295d100ca3879016083b4fc20b45d0001e2fc13e
|
|
@ -118,7 +118,7 @@ std::string GLSL::makeVert(const char* glslVer, unsigned col, unsigned uv, unsig
|
||||||
GenerateVertInStruct(col, uv, w) + "\n" +
|
GenerateVertInStruct(col, uv, w) + "\n" +
|
||||||
GenerateVertToFragStruct() + "\n" +
|
GenerateVertToFragStruct() + "\n" +
|
||||||
GenerateVertUniformStruct(s, tm) +
|
GenerateVertUniformStruct(s, tm) +
|
||||||
"out VertToFrag vtf;\n\n"
|
"SBINDING(0) out VertToFrag vtf;\n\n"
|
||||||
"void main()\n{\n";
|
"void main()\n{\n";
|
||||||
|
|
||||||
if (s)
|
if (s)
|
||||||
|
@ -173,7 +173,7 @@ std::string GLSL::makeFrag(const char* glslVer,
|
||||||
GenerateVertToFragStruct() +
|
GenerateVertToFragStruct() +
|
||||||
"\nlayout(location=0) out vec4 colorOut;\n" +
|
"\nlayout(location=0) out vec4 colorOut;\n" +
|
||||||
texMapDecl +
|
texMapDecl +
|
||||||
"in VertToFrag vtf;\n\n" +
|
"SBINDING(0) in VertToFrag vtf;\n\n" +
|
||||||
lightingSrc + "\n" +
|
lightingSrc + "\n" +
|
||||||
"void main()\n{\n";
|
"void main()\n{\n";
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ std::string GLSL::makeFrag(const char* glslVer,
|
||||||
GenerateVertToFragStruct() +
|
GenerateVertToFragStruct() +
|
||||||
"\nlayout(location=0) out vec4 colorOut;\n" +
|
"\nlayout(location=0) out vec4 colorOut;\n" +
|
||||||
texMapDecl +
|
texMapDecl +
|
||||||
"in VertToFrag vtf;\n\n" +
|
"SBINDING(0) in VertToFrag vtf;\n\n" +
|
||||||
lightingSrc + "\n" +
|
lightingSrc + "\n" +
|
||||||
postSrc +
|
postSrc +
|
||||||
"\nvoid main()\n{\n";
|
"\nvoid main()\n{\n";
|
||||||
|
@ -455,7 +455,7 @@ struct SPIRVBackendFactory : IShaderBackendFactory
|
||||||
|
|
||||||
atUint32 vertSz = vertBlob.size() * sizeof(unsigned int);
|
atUint32 vertSz = vertBlob.size() * sizeof(unsigned int);
|
||||||
atUint32 fragSz = fragBlob.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;
|
size_t cachedSz = 15 + vertSz + fragSz + pipelineSz;
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback
|
||||||
|
|
||||||
/* Compile HECL shader */
|
/* Compile HECL shader */
|
||||||
static std::string testShader = "HECLOpaque(Texture(0, UV(0)))";
|
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);
|
hecl::Runtime::ShaderTag testShaderTag(testShader, 0, 1, 0, 0, 0, boo::Primitive::TriStrips, false, false, false);
|
||||||
boo::IShaderPipeline* testShaderObj =
|
boo::IShaderPipeline* testShaderObj =
|
||||||
shaderMgr.buildShader(testShaderTag, testShader, "testShader", ctx);
|
shaderMgr.buildShader(testShaderTag, testShader, "testShader", ctx);
|
||||||
|
@ -200,7 +201,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback
|
||||||
vubo->load(&vuboData, sizeof(vuboData));
|
vubo->load(&vuboData, sizeof(vuboData));
|
||||||
|
|
||||||
gfxQ->setShaderDataBinding(binding);
|
gfxQ->setShaderDataBinding(binding);
|
||||||
gfxQ->draw(0, 4);
|
gfxQ->drawIndexed(0, 4);
|
||||||
gfxQ->resolveDisplay(renderTex);
|
gfxQ->resolveDisplay(renderTex);
|
||||||
gfxQ->execute();
|
gfxQ->execute();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue