summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-09 21:42:27 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-30 23:10:35 +0100
commit220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3 (patch)
tree81fa5880e3bd243754922788de2503ae8b738143 /src
parentgl_rasterizer_cache: Move swizzling to textures instead of state (diff)
downloadyuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar.gz
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar.bz2
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar.lz
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar.xz
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.tar.zst
yuzu-220df45b7dfc3654fe0fb4cb6b6eb65c1bfce8e3.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_state.h2
2 files changed, 0 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 79d16d1f3..7831bc8cc 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1022,11 +1022,8 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s
if (surface != nullptr) {
unit.texture =
entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle;
- const GLenum target = entry.IsArray() ? surface->TargetLayer() : surface->Target();
surface->UpdateSwizzle(texture.tic.x_source, texture.tic.y_source, texture.tic.z_source,
texture.tic.w_source);
- unit.texture = handle;
- unit.target = target;
} else {
// Can occur when texture addr is null or its memory is unmapped/invalid
unit.texture = 0;
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index ced602bf6..9e1eda5b1 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -126,7 +126,6 @@ public:
struct TextureUnit {
GLuint texture; // GL_TEXTURE_BINDING_2D
GLuint sampler; // GL_SAMPLER_BINDING
- GLenum target;
void Unbind() {
texture = 0;
@@ -135,7 +134,6 @@ public:
void Reset() {
Unbind();
sampler = 0;
- target = GL_TEXTURE_2D;
}
};
std::array<TextureUnit, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> texture_units;