Sfoglia il codice sorgente

GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders.

Subv 8 anni fa
parent
commit
4bda9693be
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      src/video_core/renderer_opengl/gl_rasterizer.cpp

+ 4 - 1
src/video_core/renderer_opengl/gl_rasterizer.cpp

@@ -686,7 +686,10 @@ u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, GLuint program,
 
         // Bind the uniform to the sampler.
         GLint uniform = glGetUniformLocation(program, entry.GetName().c_str());
-        ASSERT(uniform != -1);
+        if (uniform == -1) {
+            continue;
+        }
+
         glProgramUniform1i(program, uniform, current_bindpoint);
 
         const auto texture = maxwell3d.GetStageTexture(entry.GetStage(), entry.GetOffset());