diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-10 22:34:15 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-22 21:07:33 +0200 |
commit | 59a004f915e84fec4a4fed125661eb486e1de198 (patch) | |
tree | 0503fc9161e632023e1deeb005b33ee028440bcc /src/video_core/renderer_opengl/gl_shader_cache.cpp | |
parent | Cache uniform locations and restructure the implementation (diff) | |
download | yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar.gz yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar.bz2 yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar.lz yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar.xz yuzu-59a004f915e84fec4a4fed125661eb486e1de198.tar.zst yuzu-59a004f915e84fec4a4fed125661eb486e1de198.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index ccb8b4805..1a03a677f 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -94,10 +94,6 @@ CachedShader::CachedShader(VAddr addr, Maxwell::ShaderProgram program_type) // Store shader's code to lazily build it on draw geometry_programs.code = program_result.first; } - - if (program_type == Maxwell::ShaderProgram::Fragment) { - SaveAlphaTestingLocations(); - } } GLuint CachedShader::GetProgramResourceIndex(const GLShader::ConstBufferEntry& buffer) { @@ -138,22 +134,6 @@ GLuint CachedShader::LazyGeometryProgram(OGLProgram& target_program, return target_program.handle; }; -void CachedShader::SetAlphaTesting(const bool enable, const float ref, const u32 func) { - if (program_type == Maxwell::ShaderProgram::Fragment) { - glProgramUniform1ui(program.handle, alpha_test.enable_loc, - (enable ? 1 : 0)); - glProgramUniform1f(program.handle, alpha_test.ref_loc, - ref); - glProgramUniform1ui(program.handle, alpha_test.func_loc, func); - } -} - -void CachedShader::SaveAlphaTestingLocations() { - alpha_test.enable_loc = glGetUniformLocation(program.handle, "alpha_testing_enable"); - alpha_test.ref_loc = glGetUniformLocation(program.handle, "alpha_testing_ref"); - alpha_test.func_loc = glGetUniformLocation(program.handle, "alpha_testing_func"); -} - Shader ShaderCacheOpenGL::GetStageProgram(Maxwell::ShaderProgram program) { const VAddr program_addr{GetShaderAddress(program)}; |