diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-08-02 08:08:16 +1200 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-08-02 08:25:34 +1200 |
| commit | 393de7bf2023561c9e65ec1e1c76b44a2fc457d7 (patch) | |
| tree | 45909b69722fb7c1e20146d2dfb50a17a3e4e116 | |
| parent | fcdf249c034143c355bd7c7380aeefc8075f0d67 (diff) | |
| download | usermoji-393de7bf2023561c9e65ec1e1c76b44a2fc457d7.tar.xz | |
layers: Fix #808 broken mapping of image types to view types
This was trying to be too clever, and was foiled by bad assumptions
about the enum order.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
| -rw-r--r-- | layers/core_validation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a8724576..d034d4d4 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2623,14 +2623,14 @@ static uint32_t descriptor_type_to_reqs(shader_module const *module, uint32_t ty switch (dim) { case spv::Dim1D: - return DESCRIPTOR_REQ_VIEW_TYPE_1D << arrayed; + return arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_1D_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_1D; case spv::Dim2D: return (msaa ? DESCRIPTOR_REQ_MULTI_SAMPLE : DESCRIPTOR_REQ_SINGLE_SAMPLE) | - (DESCRIPTOR_REQ_VIEW_TYPE_2D << arrayed); + (arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_2D_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_2D); case spv::Dim3D: return DESCRIPTOR_REQ_VIEW_TYPE_3D; case spv::DimCube: - return DESCRIPTOR_REQ_VIEW_TYPE_CUBE << arrayed; + return arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_CUBE_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_CUBE; default: // subpass, buffer, etc. return 0; } |
