summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 997325efc..81af803bc 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -463,7 +463,8 @@ void OpenGLState::ApplyPolygonOffset() const {
void OpenGLState::ApplyTextures() const {
bool has_delta{};
- std::size_t first{}, last{};
+ std::size_t first{};
+ std::size_t last{};
std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> textures;
for (std::size_t i = 0; i < std::size(texture_units); ++i) {
@@ -478,16 +479,6 @@ void OpenGLState::ApplyTextures() const {
}
last = i;
}
-
- // Update the texture swizzle
- if (textures[i] != 0 && (texture_unit.swizzle.r != cur_state_texture_unit.swizzle.r ||
- texture_unit.swizzle.g != cur_state_texture_unit.swizzle.g ||
- texture_unit.swizzle.b != cur_state_texture_unit.swizzle.b ||
- texture_unit.swizzle.a != cur_state_texture_unit.swizzle.a)) {
- std::array<GLint, 4> mask = {texture_unit.swizzle.r, texture_unit.swizzle.g,
- texture_unit.swizzle.b, texture_unit.swizzle.a};
- glTextureParameteriv(texture_unit.texture, GL_TEXTURE_SWIZZLE_RGBA, mask.data());
- }
}
if (has_delta) {
@@ -498,7 +489,8 @@ void OpenGLState::ApplyTextures() const {
void OpenGLState::ApplySamplers() const {
bool has_delta{};
- std::size_t first{}, last{};
+ std::size_t first{};
+ std::size_t last{};
std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> samplers;
for (std::size_t i = 0; i < std::size(samplers); ++i) {
samplers[i] = texture_units[i].sampler;