Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/Null/TextureCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Null
class TextureCache final : public TextureCacheBase
{
protected:
void CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& params, u32 native_width,
u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,
void CopyEFB(AbstractStagingTexture* dst, FramebufferManager*, const EFBCopyParams& params,
u32 native_width, u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,
const MathUtil::Rectangle<int>& src_rect, bool scale_by_half, bool linear_filter,
float y_scale, float gamma, bool clamp_top, bool clamp_bottom,
const std::array<u32, 3>& filter_coefficients) override
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/Software/TextureCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace SW
class TextureCache : public TextureCacheBase
{
protected:
void CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& params, u32 native_width,
u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,
void CopyEFB(AbstractStagingTexture* dst, FramebufferManager*, const EFBCopyParams& params,
u32 native_width, u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,
const MathUtil::Rectangle<int>& src_rect, bool scale_by_half, bool linear_filter,
float y_scale, float gamma, bool clamp_top, bool clamp_bottom,
const std::array<u32, 3>& filter_coefficients) override
Expand Down
37 changes: 30 additions & 7 deletions Source/Core/VideoCommon/BPStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,21 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager&
// ZBuffer (Zbuffer uses 24-bit Format)
bool is_depth_copy = bpmem.zcontrol.pixel_format == PixelFormat::Z24;
g_texture_cache->CopyRenderTargetToTexture(
destAddr, PE_copy.tp_realFormat(), copy_width, copy_height, destStride, is_depth_copy,
srcRect, PE_copy.intensity_fmt && PE_copy.auto_conv, PE_copy.half_scale, 1.0f,
s_gammaLUT[PE_copy.gamma], bpmem.triggerEFBCopy.clamp_top,
bpmem.triggerEFBCopy.clamp_bottom, bpmem.copyfilter.GetCoefficients());
FrameBufferCopyData{.pe_copy = PE_copy,
.dest_address = destAddr,
.copy_width = copy_width,
.copy_height = copy_height,
.dest_stride = destStride,
.efbcopy_format = PE_copy.tp_realFormat(),
.is_depth_copy = is_depth_copy,
.is_intensity = PE_copy.intensity_fmt && PE_copy.auto_conv,
.half_scale = PE_copy.half_scale,
.y_scale = 1.0f,
.gamma = s_gammaLUT[PE_copy.gamma],
.src_rect = srcRect,
.clamp_top = bpmem.triggerEFBCopy.clamp_top,
.clamp_bottom = bpmem.triggerEFBCopy.clamp_bottom,
.filter_coefficients = bpmem.copyfilter.GetCoefficients()});
}
else
{
Expand All @@ -337,9 +348,21 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager&

bool is_depth_copy = bpmem.zcontrol.pixel_format == PixelFormat::Z24;
g_texture_cache->CopyRenderTargetToTexture(
destAddr, EFBCopyFormat::XFB, copy_width, height, destStride, is_depth_copy, srcRect,
false, false, yScale, s_gammaLUT[PE_copy.gamma], bpmem.triggerEFBCopy.clamp_top,
bpmem.triggerEFBCopy.clamp_bottom, bpmem.copyfilter.GetCoefficients());
FrameBufferCopyData{.pe_copy = PE_copy,
.dest_address = destAddr,
.copy_width = copy_width,
.copy_height = height,
.dest_stride = destStride,
.efbcopy_format = EFBCopyFormat::XFB,
.is_depth_copy = is_depth_copy,
.is_intensity = false,
.half_scale = false,
.y_scale = yScale,
.gamma = s_gammaLUT[PE_copy.gamma],
.src_rect = srcRect,
.clamp_top = bpmem.triggerEFBCopy.clamp_top,
.clamp_bottom = bpmem.triggerEFBCopy.clamp_bottom,
.filter_coefficients = bpmem.copyfilter.GetCoefficients()});

auto& system = Core::System::GetInstance();

Expand Down
Loading