mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
nir: Drop infer_non_readable option for nir_opt_access()
Everybody sets it to true now, and the only reason for the option to exist was to work around a bug that's now been fixed. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19162>
This commit is contained in:
parent
1462a61b5d
commit
fde99747e9
9 changed files with 2 additions and 12 deletions
|
|
@ -1052,7 +1052,6 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_
|
|||
|
||||
const nir_opt_access_options opt_access_options = {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
};
|
||||
NIR_PASS(_, nir, nir_opt_access, &opt_access_options);
|
||||
|
||||
|
|
|
|||
|
|
@ -5511,7 +5511,6 @@ bool nir_opt_comparison_pre(nir_shader *shader);
|
|||
|
||||
typedef struct nir_opt_access_options {
|
||||
bool is_vulkan;
|
||||
bool infer_non_readable;
|
||||
} nir_opt_access_options;
|
||||
|
||||
bool nir_opt_access(nir_shader *shader, const nir_opt_access_options *options);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
struct access_state {
|
||||
nir_shader *shader;
|
||||
bool infer_non_readable;
|
||||
|
||||
struct set *vars_written;
|
||||
struct set *vars_read;
|
||||
|
|
@ -210,7 +209,7 @@ process_variable(struct access_state *state, nir_variable *var)
|
|||
access |= ACCESS_NON_WRITEABLE;
|
||||
}
|
||||
|
||||
if (state->infer_non_readable && !(access & ACCESS_NON_READABLE)) {
|
||||
if (!(access & ACCESS_NON_READABLE)) {
|
||||
if (is_buffer ? !state->buffers_read : !state->images_read)
|
||||
access |= ACCESS_NON_READABLE;
|
||||
else if ((access & ACCESS_RESTRICT) && !_mesa_set_search(state->vars_read, var))
|
||||
|
|
@ -250,7 +249,7 @@ update_access(struct access_state *state, nir_intrinsic_instr *instr, bool is_bu
|
|||
|
||||
if (is_memory_readonly)
|
||||
access |= ACCESS_NON_WRITEABLE;
|
||||
if (state->infer_non_readable && is_memory_writeonly)
|
||||
if (is_memory_writeonly)
|
||||
access |= ACCESS_NON_READABLE;
|
||||
if (!(access & ACCESS_VOLATILE) && is_memory_readonly)
|
||||
access |= ACCESS_CAN_REORDER;
|
||||
|
|
@ -327,7 +326,6 @@ nir_opt_access(nir_shader *shader, const nir_opt_access_options *options)
|
|||
{
|
||||
struct access_state state = {
|
||||
.shader = shader,
|
||||
.infer_non_readable = options->infer_non_readable,
|
||||
.vars_written = _mesa_pointer_set_create(NULL),
|
||||
.vars_read = _mesa_pointer_set_create(NULL),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -778,7 +778,6 @@ tu_shader_create(struct tu_device *dev,
|
|||
|
||||
NIR_PASS_V(nir, nir_opt_access, &(nir_opt_access_options) {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
});
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ bool rogue_nir_passes(struct rogue_build_ctx *ctx,
|
|||
/* Optimize GL access qualifiers. */
|
||||
const nir_opt_access_options opt_access_options = {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
};
|
||||
NIR_PASS_V(nir, nir_opt_access, &opt_access_options);
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,6 @@ anv_shader_stage_to_nir(struct anv_device *device,
|
|||
|
||||
const nir_opt_access_options opt_access_options = {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
};
|
||||
NIR_PASS(_, nir, nir_opt_access, &opt_access_options);
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ anv_shader_stage_to_nir(struct anv_device *device,
|
|||
|
||||
const nir_opt_access_options opt_access_options = {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
};
|
||||
NIR_PASS(_, nir, nir_opt_access, &opt_access_options);
|
||||
|
||||
|
|
|
|||
|
|
@ -770,7 +770,6 @@ st_link_nir(struct gl_context *ctx,
|
|||
|
||||
nir_opt_access_options opt_access_options;
|
||||
opt_access_options.is_vulkan = false;
|
||||
opt_access_options.infer_non_readable = true;
|
||||
NIR_PASS_V(nir, nir_opt_access, &opt_access_options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -640,7 +640,6 @@ dxil_spirv_nir_passes(nir_shader *nir,
|
|||
if (conf->read_only_images_as_srvs) {
|
||||
const nir_opt_access_options opt_access_options = {
|
||||
.is_vulkan = true,
|
||||
.infer_non_readable = true,
|
||||
};
|
||||
NIR_PASS_V(nir, nir_opt_access, &opt_access_options);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue