dEQP-VK.api.image_clearing: Use the correct aspects for depth/stencil attachments
These tests were blindly setting the aspectMask field of VkClearAttachment
to VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT even though the
format of the attachment may be a depth-only format. This affects the
following tests:
dEQP-VK.api.image_clearing.clear_depth_stencil_attachment.2d_d16_unorm
dEQP-VK.api.image_clearing.clear_depth_stencil_attachment.2d_d32_sfloat
dEQP-VK.api.image_clearing.clear_depth_stencil_attachment.2d_x8_d24_unorm_pack32
dEQP-VK.api.image_clearing.partial_clear_depth_stencil_attachment.2d_d16_unorm
dEQP-VK.api.image_clearing.partial_clear_depth_stencil_attachment.2d_d32_sfloat
dEQP-VK.api.image_clearing.partial_clear_depth_stencil_attachment.2d_x8_d24_unorm_pack32
Change-Id: I7c0de07de97ae8529e429c26b1b99798cc1443a4
diff --git a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
index e224f3f..48bab9a 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
@@ -1107,8 +1107,7 @@
{
const VkClearAttachment clearAttachment =
{
- VK_IMAGE_ASPECT_DEPTH_BIT |
- VK_IMAGE_ASPECT_STENCIL_BIT, // kImageAspectFlags aspectMask;
+ getImageAspectFlags(m_params.imageFormat), // kImageAspectFlags aspectMask;
0u, // deUint32 colorAttachment;
m_params.clearValue // VkClearValue clearValue;
};
@@ -1293,8 +1292,7 @@
{
const VkClearAttachment clearAttachment =
{
- VK_IMAGE_ASPECT_DEPTH_BIT |
- VK_IMAGE_ASPECT_STENCIL_BIT, // kImageAspectFlags aspectMask;
+ getImageAspectFlags(m_params.imageFormat), // kImageAspectFlags aspectMask;
0u, // deUint32 colorAttachment;
m_params.clearValue // VkClearValue clearValue;
};