diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-10 21:06:32 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-22 21:07:32 +0200 |
commit | 17315cee16df0848ed095ba3bc3fc1460465a682 (patch) | |
tree | 389f727594923b179584c48c85b994d269c1f937 /src/video_core/renderer_opengl/gl_shader_cache.h | |
parent | Remove SyncAlphaTest and clang format (diff) | |
download | yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar.gz yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar.bz2 yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar.lz yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar.xz yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.tar.zst yuzu-17315cee16df0848ed095ba3bc3fc1460465a682.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index 2eaa63804..7c80ee86b 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h @@ -73,15 +73,15 @@ public: /// Gets the GL uniform location for the specified resource, caching as needed GLint GetUniformLocation(const GLShader::SamplerEntry& sampler); - GLint GetAlphaTestingEnableLocation(); - GLint GetAlphaTestingFuncLocation(); - GLint GetAlphaTestingRefLocation(); + void SetAlphaTesting(const bool enable, const float ref, const u32 func); private: /// Generates a geometry shader or returns one that already exists. GLuint LazyGeometryProgram(OGLProgram& target_program, const std::string& glsl_topology, const std::string& debug_name); + void SaveAlphaTestingLocations(); + VAddr addr; Maxwell::ShaderProgram program_type; GLShader::ShaderSetup setup; @@ -102,6 +102,12 @@ private: OGLProgram triangles_adjacency; } geometry_programs; + struct { + GLint enable_loc; + GLint ref_loc; + GLint func_loc; + } alpha_test; + std::map<u32, GLuint> resource_cache; std::map<u32, GLint> uniform_cache; }; |