nir/opt_access: don't ignore infer_non_readable
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Fixes: d7d0b4445a
("nir/opt_access: infer writeonly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3959
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8018>
This commit is contained in:
parent
fe669ff4a0
commit
b548512813
|
@ -197,7 +197,7 @@ process_variable(struct access_state *state, nir_variable *var)
|
|||
access |= ACCESS_NON_WRITEABLE;
|
||||
}
|
||||
|
||||
if (!(access & ACCESS_NON_READABLE)) {
|
||||
if (state->infer_non_readable && !(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))
|
||||
|
@ -230,7 +230,7 @@ update_access(struct access_state *state, nir_intrinsic_instr *instr, bool is_im
|
|||
|
||||
if (is_memory_readonly)
|
||||
access |= ACCESS_NON_WRITEABLE;
|
||||
if (is_memory_writeonly)
|
||||
if (state->infer_non_readable && is_memory_writeonly)
|
||||
access |= ACCESS_NON_READABLE;
|
||||
if (!(access & ACCESS_VOLATILE) && is_memory_readonly)
|
||||
access |= ACCESS_CAN_REORDER;
|
||||
|
|
Loading…
Reference in New Issue