summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index a02d5c856..24560d7f8 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -80,6 +80,24 @@ private:
GLenum gl_type;
};
+ struct SamplerInfo {
+ using TextureConfig = Pica::Regs::TextureConfig;
+
+ OGLSampler sampler;
+
+ /// Creates the sampler object, initializing its state so that it's in sync with the SamplerInfo struct.
+ void Create();
+ /// Syncs the sampler object with the config, updating any necessary state.
+ void SyncWithConfig(const TextureConfig& config);
+
+ private:
+ TextureConfig::TextureFilter mag_filter;
+ TextureConfig::TextureFilter min_filter;
+ TextureConfig::WrapMode wrap_s;
+ TextureConfig::WrapMode wrap_t;
+ u32 border_color;
+ };
+
/// Structure that the hardware rendered vertices are composed of
struct HardwareVertex {
HardwareVertex(const Pica::Shader::OutputVertex& v) {
@@ -193,6 +211,7 @@ private:
PAddr last_fb_depth_addr;
// Hardware rasterizer
+ std::array<SamplerInfo, 3> texture_samplers;
TextureInfo fb_color_texture;
DepthTextureInfo fb_depth_texture;
OGLShader shader;