summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_clear.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-05-02 09:49:14 +1000
committerDave Airlie <[email protected]>2017-05-03 06:00:17 +1000
commit7e8d0a402b0a0db431da04f5126853de50729ed7 (patch)
tree74d4764a218de4eb1e16ee4a0bd111e2b66cbe70 /src/amd/vulkan/radv_meta_clear.c
parentd5400a5ec2afdbca1c2745183f171ac72d6f0647 (diff)
radv: move some image info into a separate struct.
This is to rework the surface code like radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_clear.c')
-rw-r--r--src/amd/vulkan/radv_meta_clear.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index d72f4c858da..190af651a1a 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -371,7 +371,7 @@ emit_color_clear(struct radv_cmd_buffer *cmd_buffer,
const uint32_t subpass_att = clear_att->colorAttachment;
const uint32_t pass_att = subpass->color_attachments[subpass_att].attachment;
const struct radv_image_view *iview = fb->attachments[pass_att].attachment;
- const uint32_t samples = iview->image->samples;
+ const uint32_t samples = iview->image->info.samples;
const uint32_t samples_log2 = ffs(samples) - 1;
unsigned fs_key = radv_format_meta_fs_key(iview->vk_format);
struct radv_pipeline *pipeline;
@@ -661,7 +661,7 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,
VkClearDepthStencilValue clear_value = clear_att->clearValue.depthStencil;
VkImageAspectFlags aspects = clear_att->aspectMask;
const struct radv_image_view *iview = fb->attachments[pass_att].attachment;
- const uint32_t samples = iview->image->samples;
+ const uint32_t samples = iview->image->info.samples;
const uint32_t samples_log2 = ffs(samples) - 1;
VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
uint32_t offset;
@@ -849,26 +849,25 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer,
/* all layers are bound */
if (iview->base_layer > 0)
goto fail;
- if (iview->image->array_size != iview->layer_count)
+ if (iview->image->info.array_size != iview->layer_count)
goto fail;
- if (iview->image->levels > 1)
+ if (iview->image->info.levels > 1)
goto fail;
if (iview->image->surface.level[0].mode < RADEON_SURF_MODE_1D)
goto fail;
-
if (!radv_image_extent_compare(iview->image, &iview->extent))
goto fail;
if (clear_rect->rect.offset.x || clear_rect->rect.offset.y ||
- clear_rect->rect.extent.width != iview->image->extent.width ||
- clear_rect->rect.extent.height != iview->image->extent.height)
+ clear_rect->rect.extent.width != iview->image->info.width ||
+ clear_rect->rect.extent.height != iview->image->info.height)
goto fail;
if (clear_rect->baseArrayLayer != 0)
goto fail;
- if (clear_rect->layerCount != iview->image->array_size)
+ if (clear_rect->layerCount != iview->image->info.array_size)
goto fail;
/* DCC */
@@ -1178,7 +1177,7 @@ radv_cmd_clear_image(struct radv_cmd_buffer *cmd_buffer,
const VkImageSubresourceRange *range = &ranges[r];
for (uint32_t l = 0; l < radv_get_levelCount(image, range); ++l) {
const uint32_t layer_count = image->type == VK_IMAGE_TYPE_3D ?
- radv_minify(image->extent.depth, range->baseMipLevel + l) :
+ radv_minify(image->info.depth, range->baseMipLevel + l) :
radv_get_layerCount(image, range);
for (uint32_t s = 0; s < layer_count; ++s) {