From 40f0fc36c8bf1eb0bb0440b43d7b723134ef13c9 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 25 Jul 2016 18:11:50 +1200 Subject: layers: Add enum for descriptor requirements Signed-off-by: Chris Forbes --- layers/core_validation_types.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index e7ee5686..8b13a93f 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -85,6 +85,23 @@ template <> struct hash { }; } + +// Flags describing requirements imposed by the pipeline on a descriptor. These +// can't be checked at pipeline creation time as they depend on the Image or +// ImageView bound. +enum descriptor_req { + DESCRIPTOR_REQ_VIEW_TYPE_1D = 1 << VK_IMAGE_VIEW_TYPE_1D, + DESCRIPTOR_REQ_VIEW_TYPE_1D_ARRAY = 1 << VK_IMAGE_VIEW_TYPE_1D_ARRAY, + DESCRIPTOR_REQ_VIEW_TYPE_2D = 1 << VK_IMAGE_VIEW_TYPE_2D, + DESCRIPTOR_REQ_VIEW_TYPE_2D_ARRAY = 1 << VK_IMAGE_VIEW_TYPE_2D_ARRAY, + DESCRIPTOR_REQ_VIEW_TYPE_3D = 1 << VK_IMAGE_VIEW_TYPE_3D, + DESCRIPTOR_REQ_VIEW_TYPE_CUBE = 1 << VK_IMAGE_VIEW_TYPE_CUBE, + DESCRIPTOR_REQ_VIEW_TYPE_CUBE_ARRAY = 1 << VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, + + DESCRIPTOR_REQ_SINGLE_SAMPLE = 2 << VK_IMAGE_VIEW_TYPE_END_RANGE, + DESCRIPTOR_REQ_MULTI_SAMPLE = DESCRIPTOR_REQ_SINGLE_SAMPLE << 1, +}; + struct DESCRIPTOR_POOL_NODE { VkDescriptorPool pool; uint32_t maxSets; // Max descriptor sets allowed in this pool -- cgit v1.2.3