spirv: acknowledge multisampled input attachments

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Iago Toral Quiroga
2017-01-24 10:48:01 +01:00
parent 2ab2be092d
commit 9467d78d38

View File

@@ -854,8 +854,12 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
val->type->access_qualifier = SpvAccessQualifierReadWrite; val->type->access_qualifier = SpvAccessQualifierReadWrite;
if (multisampled) { if (multisampled) {
assert(dim == GLSL_SAMPLER_DIM_2D); if (dim == GLSL_SAMPLER_DIM_2D)
dim = GLSL_SAMPLER_DIM_MS; dim = GLSL_SAMPLER_DIM_MS;
else if (dim == GLSL_SAMPLER_DIM_SUBPASS)
dim = GLSL_SAMPLER_DIM_SUBPASS_MS;
else
assert(!"Unsupported multisampled image type");
} }
val->type->image_format = translate_image_format(format); val->type->image_format = translate_image_format(format);
@@ -864,7 +868,8 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
val->type->type = glsl_sampler_type(dim, is_shadow, is_array, val->type->type = glsl_sampler_type(dim, is_shadow, is_array,
glsl_get_base_type(sampled_type)); glsl_get_base_type(sampled_type));
} else if (sampled == 2) { } else if (sampled == 2) {
assert((dim == GLSL_SAMPLER_DIM_SUBPASS) || format); assert((dim == GLSL_SAMPLER_DIM_SUBPASS ||
dim == GLSL_SAMPLER_DIM_SUBPASS_MS) || format);
assert(!is_shadow); assert(!is_shadow);
val->type->type = glsl_image_type(dim, is_array, val->type->type = glsl_image_type(dim, is_array,
glsl_get_base_type(sampled_type)); glsl_get_base_type(sampled_type));