From b55d8111e66ab909ec932850284a7afd13827303 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 23 Aug 2018 17:30:27 -0400 Subject: renderer_opengl: Implement a new shader cache. --- src/video_core/renderer_opengl/gl_rasterizer.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 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 531b04046..7dd329efe 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -17,6 +17,7 @@ #include "video_core/rasterizer_interface.h" #include "video_core/renderer_opengl/gl_rasterizer_cache.h" #include "video_core/renderer_opengl/gl_resource_manager.h" +#include "video_core/renderer_opengl/gl_shader_cache.h" #include "video_core/renderer_opengl/gl_shader_gen.h" #include "video_core/renderer_opengl/gl_shader_manager.h" #include "video_core/renderer_opengl/gl_state.h" @@ -99,26 +100,23 @@ private: /* * Configures the current constbuffers to use for the draw command. * @param stage The shader stage to configure buffers for. - * @param program The OpenGL program object that contains the specified stage. + * @param shader The shader object that contains the specified stage. * @param current_bindpoint The offset at which to start counting new buffer bindpoints. - * @param entries Vector describing the buffers that are actually used in the guest shader. * @returns The next available bindpoint for use in the next shader stage. */ std::tuple SetupConstBuffers( u8* buffer_ptr, GLintptr buffer_offset, Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, - GLuint program, u32 current_bindpoint, - const std::vector& entries); + Shader& shader, u32 current_bindpoint); /* * Configures the current textures to use for the draw command. * @param stage The shader stage to configure textures for. - * @param program The OpenGL program object that contains the specified stage. + * @param shader The shader object that contains the specified stage. * @param current_unit The offset at which to start counting unused texture units. - * @param entries Vector describing the textures that are actually used in the guest shader. * @returns The next available bindpoint for use in the next shader stage. */ - u32 SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, GLuint program, - u32 current_unit, const std::vector& entries); + u32 SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, Shader& shader, + u32 current_unit); /// Syncs the viewport to match the guest state void SyncViewport(const MathUtil::Rectangle& surfaces_rect); @@ -157,6 +155,7 @@ private: OpenGLState state; RasterizerCacheOpenGL res_cache; + ShaderCacheOpenGL shader_cache; Core::Frontend::EmuWindow& emu_window; -- cgit v1.2.3