Revert "vulkan: use push constants for builtin uniforms"

This reverts commit 47e3fc85d2.
This commit is contained in:
niki
2022-09-15 15:55:47 +02:00
parent 47e3fc85d2
commit f4c38eb00a
9 changed files with 79 additions and 223 deletions
-11
View File
@@ -86,13 +86,6 @@ static const char global_syntax[] = R"(
)";
static const char render_uniforms[] = R"(
#ifdef LOVE_BUILTIN_UNIFORM_PUSH_CONSTANT
layout( push_constant, std430 ) uniform LoveBuiltinUniforms
{
vec4 data[13];
} LovePushConstants;
#define love_UniformsPerDraw (LovePushConstants.data)
#else
// According to the GLSL ES 1.0 spec, uniform precision must match between stages,
// but we can't guarantee that highp is always supported in fragment shaders...
// We *really* don't want to use mediump for these in vertex shaders though.
@@ -102,7 +95,6 @@ uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw2[1];
#else
uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13];
#endif
#endif
// Older GLSL doesn't support preprocessor line continuations...
#define TransformMatrix mat4(love_UniformsPerDraw[0], love_UniformsPerDraw[1], love_UniformsPerDraw[2], love_UniformsPerDraw[3])
@@ -551,9 +543,6 @@ std::string Shader::createShaderStageCode(Graphics *gfx, ShaderStageType stage,
if (glsl1on3)
ss << "#define LOVE_GLSL1_ON_GLSL3 1\n";
if (gfx->getCapabilities().features[Graphics::FEATURE_BUILTIN_UNIFORM_PUSH_CONSTANT])
ss << "#define LOVE_BUILTIN_UNIFORM_PUSH_CONSTANT 1\n";
if (isGammaCorrect())
ss << "#define LOVE_GAMMA_CORRECT 1\n";
if (info.usesMRT)