diff --git a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc index e0817d00d..9da117bf4 100644 --- a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc @@ -1329,10 +1329,11 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory, bool draw_resolution_scaled = IsDrawResolutionScaled(); draw_util::ResolveInfo resolve_info; + bool fixed_16_truncated_to_minus_1_to_1 = IsFixed16TruncatedToMinus1To1(); if (!draw_util::GetResolveInfo( register_file(), memory, trace_writer_, draw_resolution_scale_x(), - draw_resolution_scale_y(), IsFixed16TruncatedToMinus1To1(), - resolve_info)) { + draw_resolution_scale_y(), fixed_16_truncated_to_minus_1_to_1, + fixed_16_truncated_to_minus_1_to_1, resolve_info)) { return false; } diff --git a/src/xenia/gpu/draw_util.cc b/src/xenia/gpu/draw_util.cc index 0590ce017..70bf76df7 100644 --- a/src/xenia/gpu/draw_util.cc +++ b/src/xenia/gpu/draw_util.cc @@ -764,7 +764,8 @@ const ResolveCopyShaderInfo bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, TraceWriter& trace_writer, uint32_t draw_resolution_scale_x, uint32_t draw_resolution_scale_y, - bool fixed_16_truncated_to_minus_1_to_1, + bool fixed_rg16_truncated_to_minus_1_to_1, + bool fixed_rgba16_truncated_to_minus_1_to_1, ResolveInfo& info_out) { auto rb_copy_control = regs.Get(); info_out.rb_copy_control = rb_copy_control; @@ -1093,8 +1094,9 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, color_edram_info.format = uint32_t(color_info.color_format); color_edram_info.format_is_64bpp = is_64bpp; color_edram_info.duplicate_second_pixel = uint32_t(duplicate_second_pixel); - if (fixed_16_truncated_to_minus_1_to_1 && - (color_info.color_format == xenos::ColorRenderTargetFormat::k_16_16 || + if ((fixed_rg16_truncated_to_minus_1_to_1 && + color_info.color_format == xenos::ColorRenderTargetFormat::k_16_16) || + (fixed_rgba16_truncated_to_minus_1_to_1 && color_info.color_format == xenos::ColorRenderTargetFormat::k_16_16_16_16)) { // The texture expects 0x8001 = -32, 0x7FFF = 32, but the hack making diff --git a/src/xenia/gpu/draw_util.h b/src/xenia/gpu/draw_util.h index 2a3620fe0..f270de673 100644 --- a/src/xenia/gpu/draw_util.h +++ b/src/xenia/gpu/draw_util.h @@ -517,14 +517,15 @@ struct ResolveInfo { }; // Returns false if there was an error obtaining the info making it totally -// invalid. fixed_16_truncated_to_minus_1_to_1 is false if 16_16 and 16_16_16_16 +// invalid. fixed_rg[ba]16_truncated_to_minus_1_to_1 is false if 16_16[_16_16] // color render target formats are properly emulated as -32...32, true if // emulated as snorm, with range limited to -1...1, but with correct blending // within that range. bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, TraceWriter& trace_writer, uint32_t draw_resolution_scale_x, uint32_t draw_resolution_scale_y, - bool fixed_16_truncated_to_minus_1_to_1, + bool fixed_rg16_truncated_to_minus_1_to_1, + bool fixed_rgba16_truncated_to_minus_1_to_1, ResolveInfo& info_out); // Taking user configuration - stretching or letterboxing, overscan region to