mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 10:23:01 -06:00
gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.
This commit is contained in:
parent
d8c60029d6
commit
cd47391c2d
2 changed files with 11 additions and 11 deletions
|
@ -65,9 +65,9 @@ struct FormatTuple {
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer(
|
/*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer(u32 zeta_width, u32 zeta_height,
|
||||||
const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config, Tegra::GPUVAddr zeta_address,
|
Tegra::GPUVAddr zeta_address,
|
||||||
Tegra::DepthFormat format) {
|
Tegra::DepthFormat format) {
|
||||||
|
|
||||||
SurfaceParams params{};
|
SurfaceParams params{};
|
||||||
params.addr = zeta_address;
|
params.addr = zeta_address;
|
||||||
|
@ -77,9 +77,9 @@ struct FormatTuple {
|
||||||
params.component_type = ComponentTypeFromDepthFormat(format);
|
params.component_type = ComponentTypeFromDepthFormat(format);
|
||||||
params.type = GetFormatType(params.pixel_format);
|
params.type = GetFormatType(params.pixel_format);
|
||||||
params.size_in_bytes = params.SizeInBytes();
|
params.size_in_bytes = params.SizeInBytes();
|
||||||
params.width = config.width;
|
params.width = zeta_width;
|
||||||
params.height = config.height;
|
params.height = zeta_height;
|
||||||
params.unaligned_height = config.height;
|
params.unaligned_height = zeta_height;
|
||||||
params.size_in_bytes = params.SizeInBytes();
|
params.size_in_bytes = params.SizeInBytes();
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
@ -519,8 +519,8 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (using_depth_fb) {
|
if (using_depth_fb) {
|
||||||
depth_params =
|
depth_params = SurfaceParams::CreateForDepthBuffer(regs.zeta_width, regs.zeta_height,
|
||||||
SurfaceParams::CreateForDepthBuffer(regs.rt[0], regs.zeta.Address(), regs.zeta.format);
|
regs.zeta.Address(), regs.zeta.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
MathUtil::Rectangle<u32> color_rect{};
|
MathUtil::Rectangle<u32> color_rect{};
|
||||||
|
|
|
@ -365,9 +365,9 @@ struct SurfaceParams {
|
||||||
const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config);
|
const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config);
|
||||||
|
|
||||||
/// Creates SurfaceParams for a depth buffer configuration
|
/// Creates SurfaceParams for a depth buffer configuration
|
||||||
static SurfaceParams CreateForDepthBuffer(
|
static SurfaceParams CreateForDepthBuffer(u32 zeta_width, u32 zeta_height,
|
||||||
const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& config,
|
Tegra::GPUVAddr zeta_address,
|
||||||
Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format);
|
Tegra::DepthFormat format);
|
||||||
|
|
||||||
Tegra::GPUVAddr addr;
|
Tegra::GPUVAddr addr;
|
||||||
bool is_tiled;
|
bool is_tiled;
|
||||||
|
|
Loading…
Reference in a new issue