zink: don't generate sampled image type for non-sampled images
this creates validation errors Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9802>
This commit is contained in:

committed by
Marge Bot

parent
674132dee8
commit
bbe5eb43c7
@@ -790,9 +790,7 @@ emit_image(struct ntv_context *ctx, struct nir_variable *var)
|
||||
is_ms, is_sampler ? 1 : 2,
|
||||
get_image_format(var->data.image.format));
|
||||
|
||||
SpvId sampled_type = spirv_builder_type_sampled_image(&ctx->builder,
|
||||
image_type);
|
||||
SpvId var_type = is_sampler ? sampled_type : image_type;
|
||||
SpvId var_type = is_sampler ? spirv_builder_type_sampled_image(&ctx->builder, image_type) : image_type;
|
||||
|
||||
int index = var->data.driver_location;
|
||||
assert(!is_sampler || (!(ctx->samplers_used & (1 << index))));
|
||||
|
Reference in New Issue
Block a user