summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_resolve_fs.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-12-26 16:11:35 +0100
committerBas Nieuwenhuizen <[email protected]>2017-12-28 00:26:07 +0100
commit73279da41dae991afc5d4e4dbe51542060e21c59 (patch)
tree638b05e288e4f1f3d536756f06d15d8ba3a9aa00 /src/amd/vulkan/radv_meta_resolve_fs.c
parent258ebe79a0c2133e362035b76f3cf3243880926f (diff)
radv: Fix fragment resolve destination offset.
The position start at (dst.x, dst.y), so if we want the source to start at (src.x, src.y), we have to offset by (src.x-dst.x,src.y-dst.y). Haven't tested that this fixed anything yet, but found by inspection. Fixes: 69136f4e633 "radv/meta: add resolve pass using fragment/vertex shaders" Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_resolve_fs.c')
-rw-r--r--src/amd/vulkan/radv_meta_resolve_fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve_fs.c b/src/amd/vulkan/radv_meta_resolve_fs.c
index 756309efd2e..b937c12ec11 100644
--- a/src/amd/vulkan/radv_meta_resolve_fs.c
+++ b/src/amd/vulkan/radv_meta_resolve_fs.c
@@ -407,8 +407,8 @@ emit_resolve(struct radv_cmd_buffer *cmd_buffer,
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
unsigned push_constants[2] = {
- src_offset->x,
- src_offset->y,
+ src_offset->x - dest_offset->x,
+ src_offset->y - dest_offset->y,
};
radv_CmdPushConstants(radv_cmd_buffer_to_handle(cmd_buffer),
device->meta_state.resolve_fragment.p_layout,