diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 21c51f874..7f2bf0f8b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -56,7 +56,6 @@ public: void FlushAndInvalidateRegion(VAddr addr, u64 size) override; bool AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Regs::Surface& src, const Tegra::Engines::Fermi2D::Regs::Surface& dst) override; - bool AccelerateFill(const void* config) override; bool AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, u32 pixel_stride) override; bool AccelerateDrawBatch(bool is_indexed) override; @@ -122,30 +121,25 @@ private: * @param using_depth_fb If true, configure the depth/stencil framebuffer. * @param preserve_contents If true, tries to preserve data from a previously used framebuffer. * @param single_color_target Specifies if a single color buffer target should be used. + * @returns If depth (first) or stencil (second) are being stored in the bound zeta texture + * (requires using_depth_fb to be true) */ - void ConfigureFramebuffers(OpenGLState& current_state, bool use_color_fb = true, - bool using_depth_fb = true, bool preserve_contents = true, - std::optional<std::size_t> single_color_target = {}); + std::pair<bool, bool> ConfigureFramebuffers( + OpenGLState& current_state, bool use_color_fb = true, bool using_depth_fb = true, + bool preserve_contents = true, std::optional<std::size_t> single_color_target = {}); - /** - * Configures the current constbuffers to use for the draw command. - * @param stage The shader stage to configure buffers for. - * @param shader The shader object that contains the specified stage. - * @param current_bindpoint The offset at which to start counting new buffer bindpoints. - * @returns The next available bindpoint for use in the next shader stage. - */ - u32 SetupConstBuffers(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, Shader& shader, - GLenum primitive_mode, u32 current_bindpoint); + /// Configures the current constbuffers to use for the draw command. + void SetupConstBuffers(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, const Shader& shader, + GLuint program_handle, BaseBindings base_bindings); - /** - * Configures the current textures to use for the draw command. - * @param stage The shader stage to configure textures for. - * @param shader The shader object that contains the specified stage. - * @param current_unit The offset at which to start counting unused texture units. - * @returns The next available bindpoint for use in the next shader stage. - */ - u32 SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, Shader& shader, - GLenum primitive_mode, u32 current_unit); + /// Configures the current global memory entries to use for the draw command. + void SetupGlobalRegions(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, + const Shader& shader, GLenum primitive_mode, + BaseBindings base_bindings); + + /// Configures the current textures to use for the draw command. + void SetupTextures(Tegra::Engines::Maxwell3D::Regs::ShaderStage stage, const Shader& shader, + GLuint program_handle, BaseBindings base_bindings); /// Syncs the viewport and depth range to match the guest state void SyncViewport(OpenGLState& current_state); @@ -221,6 +215,7 @@ private: std::map<FramebufferCacheKey, OGLFramebuffer> framebuffer_cache; FramebufferConfigState current_framebuffer_config_state; + std::pair<bool, bool> current_depth_stencil_usage{}; std::array<SamplerInfo, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> texture_samplers; |