From 6ab6b59aadd957d4ac991d49752f2b88bf6631db Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 19 Jul 2016 14:50:04 +1200 Subject: [PATCH] layers: Allow consuming COMBINED_IMAGE_SAMPLER as separate pieces Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 924d452..edfb627 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2411,7 +2411,8 @@ static bool descriptor_type_match(shader_module const *module, uint32_t type_id, } case spv::OpTypeSampler: - return descriptor_type == VK_DESCRIPTOR_TYPE_SAMPLER; + return descriptor_type == VK_DESCRIPTOR_TYPE_SAMPLER || + descriptor_type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; case spv::OpTypeSampledImage: if (descriptor_type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) { @@ -2444,7 +2445,8 @@ static bool descriptor_type_match(shader_module const *module, uint32_t type_id, return descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; } } else if (sampled == 1) { - return descriptor_type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; + return descriptor_type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || + descriptor_type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; } else { return descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; } -- 2.7.4