mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
rsx: Major fixes
- Handle aliased depth + color target by disabling depth writes. This looks to be the correct way - Add support for generic passes that cannot be done using general imaging operations. Lays the framework for tons of features and effects - Implement RGBA->D24D8 casting. Sometimes games will split depth texture into RGBA8 then use the new RGBA8 as a depth texture directly -- This happens alot in ps3 games and I'm not sure why. Its likely the ps3 did not sample fp values with linear filtering so this is a workaround -- Only implemented for openGL at the moment -- Requires a workaround for an AMD driver bug
This commit is contained in:
parent
8646f51fa3
commit
33f3a3e014
13 changed files with 272 additions and 31 deletions
|
|
@ -185,7 +185,7 @@ void GLGSRender::init_buffers(bool skip_reading)
|
|||
const auto depth_format = rsx::method_registers.surface_depth_fmt();
|
||||
|
||||
const auto required_color_pitch = rsx::utility::get_packed_pitch(surface_format, clip_horizontal);
|
||||
const auto required_z_pitch = depth_format == rsx::surface_depth_format::z16 ? clip_horizontal * 2 : clip_horizontal * 4;
|
||||
const u32 required_z_pitch = depth_format == rsx::surface_depth_format::z16 ? clip_horizontal * 2 : clip_horizontal * 4;
|
||||
|
||||
if (depth_address && zeta_pitch < required_z_pitch)
|
||||
depth_address = 0;
|
||||
|
|
@ -207,8 +207,9 @@ void GLGSRender::init_buffers(bool skip_reading)
|
|||
if (surface_addresses[index] == depth_address &&
|
||||
zeta_pitch >= required_z_pitch)
|
||||
{
|
||||
LOG_ERROR(RSX, "Some game dev set up the MRT to write to the same address as depth and color attachment. Not sure how to deal with that so the draw is discarded.");
|
||||
framebuffer_status_valid = false;
|
||||
//LOG_ERROR(RSX, "Some game dev set up the MRT to write to the same address as depth and color attachment. Not sure how to deal with that so the draw is discarded.");
|
||||
//framebuffer_status_valid = false;
|
||||
depth_address = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue