summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_blit.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-08-22 13:35:53 +1000
committerDave Airlie <[email protected]>2017-09-13 08:40:18 +1000
commit2f5b4490b59062f224e73f7a2d5cc0d8bd8eaa7b (patch)
treed27f29f8a0b2b17ed4f541671dd802251042dc8c /src/amd/vulkan/radv_meta_blit.c
parentd496780fb2c7f2cf0e32b6a79dc528e5156dfcb3 (diff)
radv: don't use iview for meta image width/height.
Work out the width/height from the level manually, as on GFX9 we won't minify the iview width/height. This fixes: dEQP-VK.api.image_clearing.core.clear_color_image* on gfx9 Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_blit.c')
-rw-r--r--src/amd/vulkan/radv_meta_blit.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/amd/vulkan/radv_meta_blit.c b/src/amd/vulkan/radv_meta_blit.c
index 3510e871bbe..2c1a13228d2 100644
--- a/src/amd/vulkan/radv_meta_blit.c
+++ b/src/amd/vulkan/radv_meta_blit.c
@@ -275,15 +275,20 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer,
VkFilter blit_filter)
{
struct radv_device *device = cmd_buffer->device;
+ uint32_t src_width = radv_minify(src_iview->image->info.width, src_iview->base_mip);
+ uint32_t src_height = radv_minify(src_iview->image->info.height, src_iview->base_mip);
+ uint32_t src_depth = radv_minify(src_iview->image->info.depth, src_iview->base_mip);
+ uint32_t dst_width = radv_minify(dest_iview->image->info.width, dest_iview->base_mip);
+ uint32_t dst_height = radv_minify(dest_iview->image->info.height, dest_iview->base_mip);
assert(src_image->info.samples == dest_image->info.samples);
float vertex_push_constants[5] = {
- (float)src_offset_0.x / (float)src_iview->extent.width,
- (float)src_offset_0.y / (float)src_iview->extent.height,
- (float)src_offset_1.x / (float)src_iview->extent.width,
- (float)src_offset_1.y / (float)src_iview->extent.height,
- (float)src_offset_0.z / (float)src_iview->extent.depth,
+ (float)src_offset_0.x / (float)src_width,
+ (float)src_offset_0.y / (float)src_height,
+ (float)src_offset_1.x / (float)src_width,
+ (float)src_offset_1.y / (float)src_height,
+ (float)src_offset_0.z / (float)src_depth,
};
radv_CmdPushConstants(radv_cmd_buffer_to_handle(cmd_buffer),
@@ -310,8 +315,8 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer,
.pAttachments = (VkImageView[]) {
radv_image_view_to_handle(dest_iview),
},
- .width = dest_iview->extent.width,
- .height = dest_iview->extent.height,
+ .width = dst_width,
+ .height = dst_height,
.layers = 1,
}, &cmd_buffer->pool->alloc, &fb);
VkPipeline pipeline;