summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2017-12-19 08:59:36 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2017-12-20 06:55:41 +0100
commita31f0c4a363d18d860f8f5db165fa200f9c01d42 (patch)
tree6fd83fc67a5ea8e5033456f97cf67dee0087e0ad /src/intel
parent0cf6320eb5eca1ea20906624ad5a46ca386e0aa6 (diff)
anv: disallow VK_REMAINING_ARRAY_LAYERS in vkCmdClearAttachments()
Vulkan spec doesn't specify that VK_REMAINING_ARRAY_LAYERS is allowed in the passed VkClearRect struct. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_blorp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index e244468e03b..8bb0216d6e4 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -989,6 +989,7 @@ clear_color_attachment(struct anv_cmd_buffer *cmd_buffer,
for (uint32_t r = 0; r < rectCount; ++r) {
const VkOffset2D offset = pRects[r].rect.offset;
const VkExtent2D extent = pRects[r].rect.extent;
+ assert(pRects[r].layerCount != VK_REMAINING_ARRAY_LAYERS);
blorp_clear_attachments(batch, binding_table,
ISL_FORMAT_UNSUPPORTED, pass_att->samples,
pRects[r].baseArrayLayer,
@@ -1060,6 +1061,7 @@ clear_depth_stencil_attachment(struct anv_cmd_buffer *cmd_buffer,
const VkOffset2D offset = pRects[r].rect.offset;
const VkExtent2D extent = pRects[r].rect.extent;
VkClearDepthStencilValue value = attachment->clearValue.depthStencil;
+ assert(pRects[r].layerCount != VK_REMAINING_ARRAY_LAYERS);
blorp_clear_attachments(batch, binding_table,
depth_format, pass_att->samples,
pRects[r].baseArrayLayer,