zink: emit Aliased decorations for any image that isn't explicitly marked restrict
these might be aliased fixes: arb_shader_image_load_store-restrict fixes #6090 Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15217>
This commit is contained in:
parent
351378ae80
commit
fcdcfd9967
|
@ -193,6 +193,21 @@ emit_access_decorations(struct ntv_context *ctx, nir_variable *var, SpvId var_id
|
||||||
unreachable("unknown access bit");
|
unreachable("unknown access bit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* The Simple, GLSL, and Vulkan memory models can assume that aliasing is generally
|
||||||
|
* not present between the memory object declarations. Specifically, the consumer
|
||||||
|
* is free to assume aliasing is not present between memory object declarations,
|
||||||
|
* unless the memory object declarations explicitly indicate they alias.
|
||||||
|
* ...
|
||||||
|
* Applying Restrict is allowed, but has no effect.
|
||||||
|
* ...
|
||||||
|
* Only those memory object declarations decorated with Aliased or AliasedPointer may alias each other.
|
||||||
|
*
|
||||||
|
* - SPIRV 2.18.2 Aliasing
|
||||||
|
*
|
||||||
|
* thus if the variable isn't marked restrict, assume it may alias
|
||||||
|
*/
|
||||||
|
if (!(var->data.access & ACCESS_RESTRICT))
|
||||||
|
spirv_builder_emit_decoration(&ctx->builder, var_id, SpvDecorationAliased);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SpvOp
|
static SpvOp
|
||||||
|
|
Loading…
Reference in New Issue