Merge branch 'love2d:12.0-development' into 12.0-development

This commit is contained in:
nikeinikei
2022-11-26 05:30:31 +01:00
committed by GitHub
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -551,7 +551,7 @@ std::string Shader::createShaderStageCode(Graphics *gfx, ShaderStageType stage,
// Note: backends are expected to handle this situation if highp is ever
// conditional in that backend.
if (!gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP])
ss << "#define LOVE_SPLIT_UNIFORMS_PER_DRAW 1";
ss << "#define LOVE_SPLIT_UNIFORMS_PER_DRAW 1\n";
for (const auto &def : options.defines)
ss << "#define " + def.first + " " + def.second + "\n";
+1 -1
View File
@@ -469,7 +469,7 @@ bool Shader::loadVolatile()
// love::graphics::Shader sets up the shader code-side of this.
auto gfx = Module::getInstance<love::graphics::Graphics>(Module::M_GRAPHICS);
if (gfx != nullptr)
splitUniformsPerDraw = gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP];
splitUniformsPerDraw = !gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP];
// zero out active texture list
textureUnits.clear();