From bb65d36c5c5bc4a8b4ff43e17c7ca06f6386b1f9 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 1 May 2023 13:07:01 -0700 Subject: [PATCH] spirv2dxil: Mark SSBO reads for bindless as CAN_REORDER This makes it so that they can be CSE'd, which helps prevent redundant reads of the same data. Part-of: --- src/microsoft/spirv_to_dxil/dxil_spirv_nir_lower_bindless.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/microsoft/spirv_to_dxil/dxil_spirv_nir_lower_bindless.c b/src/microsoft/spirv_to_dxil/dxil_spirv_nir_lower_bindless.c index b6ccfff..6dda984 100644 --- a/src/microsoft/spirv_to_dxil/dxil_spirv_nir_lower_bindless.c +++ b/src/microsoft/spirv_to_dxil/dxil_spirv_nir_lower_bindless.c @@ -57,7 +57,8 @@ load_vulkan_ssbo(nir_builder *b, unsigned buf_idx, nir_channel(b, descriptor, 0), offset, .align_mul = num_comps * 4, - .align_offset = 0); + .align_offset = 0, + .access = ACCESS_NON_WRITEABLE | ACCESS_CAN_REORDER); } static nir_ssa_def * -- 2.7.4