rsx image_in: Fix in_pitch 0

The hw doesnt fix pitch, when specifying src pitch 0 it copies the same pixels line to dst. keep in mind out_pitch = 0 is not allowed in image_in.
Same goes for buffer_notify, though it allows out_pitch to be 0.
This commit is contained in:
eladash 2018-11-30 21:06:48 -08:00 committed by kd-11
parent d1d3ac984e
commit 28e4a9e0d0
2 changed files with 1 additions and 27 deletions

View File

@ -150,7 +150,7 @@ namespace rsx
{
const auto& range = method_registers.current_draw_clause.get_range();
const u32 vertCount = range.count;
const size_t bufferSize = vertCount * vertStride + vertSize;
const size_t bufferSize = (vertCount - 1) * vertStride + vertSize;
frame_capture_data::memory_block block;
block.offset = base_address + (range.first * vertStride);
@ -306,11 +306,6 @@ namespace rsx
u8* pixels_src = src_region.tile ? src_region.ptr + src_region.base : src_region.ptr;
if (in_pitch == 0)
{
in_pitch = in_bpp * in_w;
}
const u32 src_size = in_pitch * (in_h - 1) + (in_w * in_bpp);
rsx->read_barrier(src_region.address, src_size);
@ -329,11 +324,6 @@ namespace rsx
const u32 line_count = method_registers.nv0039_line_count();
const u8 in_format = method_registers.nv0039_input_format();
if (!in_pitch)
{
in_pitch = line_length;
}
u32 src_offset = method_registers.nv0039_input_offset();
u32 src_dma = method_registers.nv0039_input_location();
u32 src_addr = get_address(src_offset, src_dma);
@ -355,7 +345,6 @@ namespace rsx
}
insert_mem_block_in_map(replay_command.memory_state, std::move(block), std::move(block_data));
capture_display_tile_state(rsx, replay_command);
}

View File

@ -885,11 +885,6 @@ namespace rsx
out_pitch = out_bpp * out_w;
}
if (in_pitch == 0)
{
in_pitch = in_bpp * in_w;
}
const u32 in_offset = u32(in_x * in_bpp + in_pitch * in_y);
const s32 out_offset = out_x * out_bpp + out_pitch * out_y;
@ -1165,16 +1160,6 @@ namespace rsx
LOG_TRACE(RSX, "NV0039_OFFSET_IN: pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x",
in_pitch, out_pitch, line_length, line_count, in_format, out_format, notify);
if (!in_pitch)
{
in_pitch = line_length;
}
if (!out_pitch)
{
out_pitch = line_length;
}
u32 src_offset = method_registers.nv0039_input_offset();
u32 src_dma = method_registers.nv0039_input_location();