aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_state.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-10 08:57:05 -0400
committerGitHub <noreply@github.com>2019-09-10 08:57:05 -0400
commit434d0922dcf886c6bb3ac50b96a8c6091c5c6c11 (patch)
tree7a8789ba575866a8cdc03f8b4bd6d17789659fcd /src/video_core/renderer_opengl/gl_state.h
parent07a0242535ff339b556629b34f5d3da6c4e3da69 (diff)
parent1f43e5296fcd2debaea672fd9740d2f07223406b (diff)
Merge pull request #2759 from ReinUsesLisp/compute-images
gl_rasterizer: Bind images and samplers to compute
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
-rw-r--r--src/video_core/renderer_opengl/gl_state.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index fdf9a8a12..949b13051 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -118,21 +118,9 @@ public:
GLenum operation;
} logic_op;
- // 3 texture units - one for each that is used in PICA fragment shader emulation
- struct TextureUnit {
- GLuint texture; // GL_TEXTURE_BINDING_2D
- GLuint sampler; // GL_SAMPLER_BINDING
-
- void Unbind() {
- texture = 0;
- }
-
- void Reset() {
- Unbind();
- sampler = 0;
- }
- };
- std::array<TextureUnit, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> texture_units;
+ std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> textures{};
+ std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> samplers{};
+ std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumImages> images{};
struct {
GLuint read_framebuffer; // GL_READ_FRAMEBUFFER_BINDING
@@ -220,6 +208,7 @@ public:
void ApplyLogicOp() const;
void ApplyTextures() const;
void ApplySamplers() const;
+ void ApplyImages() const;
void ApplyDepthClamp() const;
void ApplyPolygonOffset() const;
void ApplyAlphaTest() const;