summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-05 17:29:17 +0200
committerGitHub <noreply@github.com>2018-07-05 17:29:17 +0200
commit8b815877a6f8b0c1b80496a485511f15d1d86684 (patch)
treee8297e0d3b51898ad891b0ad56cbd99206117b22
parentMerge pull request #621 from Subv/psetp_ (diff)
parentGPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders. (diff)
downloadyuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar.gz
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar.bz2
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar.lz
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar.xz
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.tar.zst
yuzu-8b815877a6f8b0c1b80496a485511f15d1d86684.zip
-rw-r--r--src/video_core/engines/shader_bytecode.h2
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 95b7d46ec..da1aaeeee 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -654,7 +654,7 @@ private:
INST("1110111111011---", Id::LD_A, Type::Memory, "LD_A"),
INST("1110111110010---", Id::LD_C, Type::Memory, "LD_C"),
INST("1110111111110---", Id::ST_A, Type::Memory, "ST_A"),
- INST("1100000000111---", Id::TEX, Type::Memory, "TEX"),
+ INST("110000----111---", Id::TEX, Type::Memory, "TEX"),
INST("1101111101001---", Id::TEXQ, Type::Memory, "TEXQ"),
INST("1101100---------", Id::TEXS, Type::Memory, "TEXS"),
INST("1101101---------", Id::TLDS, Type::Memory, "TLDS"),
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 3c3657d9d..bacb389e1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/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());