nir: Use var->data.mode instead of deref->mode in a few cases
We already have the variable so we know the mode exactly. Just use that instead of the deref mode. If these paths ever have to handle variable pointers (not likely since they're OpenGL-specific), we can fix them to handle crazy deref modes then. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>
This commit is contained in:

committed by
Marge Bot

parent
5664713d7b
commit
bb5d5029b7
@@ -87,7 +87,7 @@ lower_impl(nir_builder *b, nir_instr *instr, bool bindless_only)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bindless = deref->mode != nir_var_uniform || var->data.bindless;
|
||||
bool bindless = var->data.mode != nir_var_uniform || var->data.bindless;
|
||||
if (bindless_only && !bindless)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user