Merge pull request #622 from Subv/unused_tex

GPU: Ignore unused textures and corrected the TEX shader instruction decoding.
This commit is contained in:
bunnei 2018-07-05 11:29:17 -04:00 committed by GitHub
commit 8b815877a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -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());