diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2016-11-14 17:26:09 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-24 16:34:39 +0000 |
commit | 4b2caa02f048d73b2e7dc27b9ad363e0f29a5d02 (patch) | |
tree | 0b23352ee76ad8c5d6896836a0a556ac84b91040 /src/intel | |
parent | fd5fe00f7bb672cad9da19329acac88dcc2086f7 (diff) | |
download | external_mesa3d-4b2caa02f048d73b2e7dc27b9ad363e0f29a5d02.zip external_mesa3d-4b2caa02f048d73b2e7dc27b9ad363e0f29a5d02.tar.gz external_mesa3d-4b2caa02f048d73b2e7dc27b9ad363e0f29a5d02.tar.bz2 |
anv: fix multi level clears with VK_REMAINING_MIP_LEVELS
A commit from the CTS suite on the 1.0-dev branch started using
VK_REMAINING_MIP_LEVELS, we're not dealing with it properly for clears.
Fixes:
dEQP-VK.api.image_clearing.clear_color_image.*
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a46bc3f70a22a71dc2977f7394841e1b19bb68b6)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 87f242c..73882445 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -787,7 +787,7 @@ void anv_CmdClearColorImage( unsigned base_layer = pRanges[r].baseArrayLayer; unsigned layer_count = pRanges[r].layerCount; - for (unsigned i = 0; i < pRanges[r].levelCount; i++) { + for (unsigned i = 0; i < anv_get_levelCount(image, &pRanges[r]); i++) { const unsigned level = pRanges[r].baseMipLevel + i; const unsigned level_width = anv_minify(image->extent.width, level); const unsigned level_height = anv_minify(image->extent.height, level); @@ -847,7 +847,7 @@ void anv_CmdClearDepthStencilImage( unsigned base_layer = pRanges[r].baseArrayLayer; unsigned layer_count = pRanges[r].layerCount; - for (unsigned i = 0; i < pRanges[r].levelCount; i++) { + for (unsigned i = 0; i < anv_get_levelCount(image, &pRanges[r]); i++) { const unsigned level = pRanges[r].baseMipLevel + i; const unsigned level_width = anv_minify(image->extent.width, level); const unsigned level_height = anv_minify(image->extent.height, level); |