From b044c047c48469be479ba2633ae14eff8643041e Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 30 Aug 2015 10:05:56 -0300 Subject: OpenGL: Use Sampler Objects to decouple sampler config from textures Fixes #978 --- src/video_core/renderer_opengl/gl_rasterizer_cache.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index d8f9edf59..ec56237b5 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -6,6 +6,7 @@ #include "gl_state.h" #include "gl_resource_manager.h" +#include "video_core/debug_utils/debug_utils.h" #include "video_core/pica.h" #include @@ -16,7 +17,11 @@ public: ~RasterizerCacheOpenGL(); /// Loads a texture from 3DS memory to OpenGL and caches it (if not already cached) - void LoadAndBindTexture(OpenGLState &state, unsigned texture_unit, const Pica::Regs::FullTextureConfig& config); + void LoadAndBindTexture(OpenGLState &state, unsigned texture_unit, const Pica::DebugUtils::TextureInfo& info); + + void LoadAndBindTexture(OpenGLState &state, unsigned texture_unit, const Pica::Regs::FullTextureConfig& config) { + LoadAndBindTexture(state, texture_unit, Pica::DebugUtils::TextureInfo::FromPicaRegister(config.config, config.format)); + } /// Flush any cached resource that touches the flushed region void NotifyFlush(PAddr addr, u32 size, bool ignore_hash = false); -- cgit v1.2.3