aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_meta_clear.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-03-04 20:41:05 -0800
committerNanley Chery <[email protected]>2016-03-04 21:25:23 -0800
commit4e75f9b219f674ea79e6d521dd8a6b1ccd8b3c10 (patch)
tree6515760edb85082dbb9e986833e8c4164d7f098b /src/intel/vulkan/anv_meta_clear.c
parentc1436e80efee072f1fc3e3b4af0d5e7ad9dd3fb7 (diff)
anv: Implement VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS}
v2: Subtract the baseMipLevel and baseArrayLayer (Jason) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_meta_clear.c')
-rw-r--r--src/intel/vulkan/anv_meta_clear.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_meta_clear.c b/src/intel/vulkan/anv_meta_clear.c
index 8f92a9d755c..bce94460844 100644
--- a/src/intel/vulkan/anv_meta_clear.c
+++ b/src/intel/vulkan/anv_meta_clear.c
@@ -795,8 +795,8 @@ anv_cmd_clear_image(struct anv_cmd_buffer *cmd_buffer,
for (uint32_t r = 0; r < range_count; r++) {
const VkImageSubresourceRange *range = &ranges[r];
- for (uint32_t l = 0; l < range->levelCount; ++l) {
- for (uint32_t s = 0; s < range->layerCount; ++s) {
+ for (uint32_t l = 0; l < anv_get_levelCount(image, range); ++l) {
+ for (uint32_t s = 0; s < anv_get_layerCount(image, range); ++s) {
struct anv_image_view iview;
anv_image_view_init(&iview, cmd_buffer->device,
&(VkImageViewCreateInfo) {