VERY experimental Nintendo Switch 2 emulator
C++
Merge pull request #2067 from ReinUsesLisp/workaround-fb
bunnei26a37f8ae984
diff --cc src/video_core/renderer_opengl/gl_rasterizer.hindex 22a0796b69,f6824c4028..7f2bf0f8bc--- a/src/video_core/renderer_opengl/gl_rasterizer.h+++ b/src/video_core/renderer_opengl/gl_rasterizer.h@@@ -121,23 -122,32 +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 statevoid SyncViewport(OpenGLState& current_state);