From 021cb0bced1d8045f04b85024b97a07a4d0df12f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 15 Nov 2015 17:43:01 -0500 Subject: renderer_opengl: Use textures for fragment shader LUTs instead of UBOs. - Gets us LUT interpolation for free. - Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs. --- src/video_core/renderer_opengl/gl_rasterizer.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 9e93b8b2f..b50542701 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -264,11 +264,10 @@ private: std::array lighting_global_ambient; INSERT_PADDING_WORDS(1); LightSrc light_src[8]; - std::array, 256>, 6> lighting_lut; }; - static_assert(sizeof(UniformData) == 0x6210, "The size of the UniformData structure has changed, update the structure in the shader"); - static_assert(sizeof(UniformData) < 32768, "UniformData structure must be less than 32kb"); + static_assert(sizeof(UniformData) == 0x310, "The size of the UniformData structure has changed, update the structure in the shader"); + static_assert(sizeof(UniformData) < 16384, "UniformData structure must be less than 16kb as per the OpenGL spec"); /// Reconfigure the OpenGL color texture to use the given format and dimensions void ReconfigureColorTexture(TextureInfo& texture, Pica::Regs::ColorFormat format, u32 width, u32 height); @@ -378,7 +377,7 @@ private: struct { UniformData data; - bool lut_dirty[24]; + bool lut_dirty[6]; bool dirty; } uniform_block_data; @@ -386,4 +385,7 @@ private: OGLBuffer vertex_buffer; OGLBuffer uniform_buffer; OGLFramebuffer framebuffer; + + std::array lighting_lut; + std::array, 256>, 6> lighting_lut_data; }; -- cgit v1.2.3