summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-21 20:29:36 +0200
committerbunnei <bunneidev@gmail.com>2018-07-22 03:51:06 +0200
commitcd47391c2d32caf36d38805d138530e2121a247a (patch)
tree5babe011761c01194e9484602edb324b4b4cbb06
parentgl_rasterizer: Use zeta_enable register to enable depth buffer. (diff)
downloadyuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar.gz
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar.bz2
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar.lz
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar.xz
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.tar.zst
yuzu-cd47391c2d32caf36d38805d138530e2121a247a.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp16
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 2c43982b0..672eb2990 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -65,9 +65,9 @@ struct FormatTuple {
return params;
}
-/*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer(
- const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config, Tegra::GPUVAddr zeta_address,
- Tegra::DepthFormat format) {
+/*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer(u32 zeta_width, u32 zeta_height,
+ Tegra::GPUVAddr zeta_address,
+ Tegra::DepthFormat format) {
SurfaceParams params{};
params.addr = zeta_address;
@@ -77,9 +77,9 @@ struct FormatTuple {
params.component_type = ComponentTypeFromDepthFormat(format);
params.type = GetFormatType(params.pixel_format);
params.size_in_bytes = params.SizeInBytes();
- params.width = config.width;
- params.height = config.height;
- params.unaligned_height = config.height;
+ params.width = zeta_width;
+ params.height = zeta_height;
+ params.unaligned_height = zeta_height;
params.size_in_bytes = params.SizeInBytes();
return params;
}
@@ -519,8 +519,8 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
}
if (using_depth_fb) {
- depth_params =
- SurfaceParams::CreateForDepthBuffer(regs.rt[0], regs.zeta.Address(), regs.zeta.format);
+ depth_params = SurfaceParams::CreateForDepthBuffer(regs.zeta_width, regs.zeta_height,
+ regs.zeta.Address(), regs.zeta.format);
}
MathUtil::Rectangle<u32> color_rect{};
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
index 718c45ce1..d00746e8c 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -365,9 +365,9 @@ struct SurfaceParams {
const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config);
/// Creates SurfaceParams for a depth buffer configuration
- static SurfaceParams CreateForDepthBuffer(
- const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config,
- Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format);
+ static SurfaceParams CreateForDepthBuffer(u32 zeta_width, u32 zeta_height,
+ Tegra::GPUVAddr zeta_address,
+ Tegra::DepthFormat format);
Tegra::GPUVAddr addr;
bool is_tiled;