mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nir,vtn: add shader_info::assume_no_data_races
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> (nir) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36602>
This commit is contained in:
parent
f1b16a5a1a
commit
21187c4662
2 changed files with 7 additions and 0 deletions
|
|
@ -334,6 +334,12 @@ typedef struct shader_info {
|
|||
*/
|
||||
enum gl_derivative_group derivative_group:2;
|
||||
|
||||
/* Assume that data races do not happen. If this isn't set, data races
|
||||
* read/write undefined values, but do not cause undefined behaviour. This
|
||||
* is set when the Vulkan memory model is used.
|
||||
*/
|
||||
bool assume_no_data_races:1;
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* Which inputs are doubles */
|
||||
|
|
|
|||
|
|
@ -5327,6 +5327,7 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||
case SpvMemoryModelVulkan:
|
||||
vtn_fail_if(!b->supported_capabilities.VulkanMemoryModel,
|
||||
"Vulkan memory model is unsupported by this driver");
|
||||
b->shader->info.assume_no_data_races = true;
|
||||
break;
|
||||
default:
|
||||
vtn_fail("Unsupported memory model: %s",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue