summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-26 08:01:11 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 21:35:58 +0100
commit9677db03da37a61248c2ced49a9a5e53c872cc63 (patch)
tree2f8bce89547542b3e7f39e34f49ffc05b0bf5813 /src/video_core/renderer_opengl/gl_state.cpp
parentgl_state: Remove blend state tracking (diff)
downloadyuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar.gz
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar.bz2
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar.lz
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar.xz
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.tar.zst
yuzu-9677db03da37a61248c2ced49a9a5e53c872cc63.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 3cdb9b4a0..98de72b5f 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -113,28 +113,6 @@ void OpenGLState::ApplyRenderBuffer() {
}
}
-void OpenGLState::ApplyTextures() {
- const std::size_t size = std::size(textures);
- for (std::size_t i = 0; i < size; ++i) {
- if (UpdateValue(cur_state.textures[i], textures[i])) {
- // BindTextureUnit doesn't support binding null textures, skip those binds.
- // TODO(Rodrigo): Stop using null textures
- if (textures[i] != 0) {
- glBindTextureUnit(static_cast<GLuint>(i), textures[i]);
- }
- }
- }
-}
-
-void OpenGLState::ApplySamplers() {
- const std::size_t size = std::size(samplers);
- for (std::size_t i = 0; i < size; ++i) {
- if (UpdateValue(cur_state.samplers[i], samplers[i])) {
- glBindSampler(static_cast<GLuint>(i), samplers[i]);
- }
- }
-}
-
void OpenGLState::ApplyImages() {
if (const auto update = UpdateArray(cur_state.images, images)) {
glBindImageTextures(update->first, update->second, images.data() + update->first);
@@ -146,30 +124,10 @@ void OpenGLState::Apply() {
ApplyFramebufferState();
ApplyShaderProgram();
ApplyProgramPipeline();
- ApplyTextures();
- ApplySamplers();
ApplyImages();
ApplyRenderBuffer();
}
-OpenGLState& OpenGLState::UnbindTexture(GLuint handle) {
- for (auto& texture : textures) {
- if (texture == handle) {
- texture = 0;
- }
- }
- return *this;
-}
-
-OpenGLState& OpenGLState::ResetSampler(GLuint handle) {
- for (auto& sampler : samplers) {
- if (sampler == handle) {
- sampler = 0;
- }
- }
- return *this;
-}
-
OpenGLState& OpenGLState::ResetProgram(GLuint handle) {
if (draw.shader_program == handle) {
draw.shader_program = 0;