nir/lower_io: Don't use variable to get deref mode
Drivers only use lower_io for modes where pointers don't have a meaningful value, and dereferences can always be traced back to a variable. But there can be other modes, like global mode with VK_EXT_buffer_device_address, where pointers cannot be traced back to a variable, and lower_io would segfault on loads/stores of these since nir_deref_instr_get_variable() would return NULL.
Just use the mode on the deref itself to filter out these modes before we try to get the variable.
Fixes: 118a66df ("radv: Use NIR barycentric coordinates")