layers: Impose singlesample/multisample constraints on input attachment descriptors
authorChris Forbes <chrisforbes@google.com>
Wed, 31 Aug 2016 18:59:48 +0000 (11:59 -0700)
committerChris Forbes <chrisforbes@google.com>
Thu, 1 Sep 2016 15:32:53 +0000 (08:32 -0700)
Signed-off-by: Chris Forbes <chrisforbes@google.com>
layers/core_validation.cpp

index 13b3d4b..a960b77 100644 (file)
@@ -2687,7 +2687,9 @@ static uint32_t descriptor_type_to_reqs(shader_module const *module, uint32_t ty
                 return DESCRIPTOR_REQ_VIEW_TYPE_3D;
             case spv::DimCube:
                 return arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_CUBE_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_CUBE;
-            default:  // subpass, buffer, etc.
+            case spv::DimSubpassData:
+                return msaa ? DESCRIPTOR_REQ_MULTI_SAMPLE : DESCRIPTOR_REQ_SINGLE_SAMPLE;
+            default:  // buffer, etc.
                 return 0;
             }
         }