diff options
author | Kenneth Graunke <[email protected]> | 2019-01-02 23:34:19 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-01-07 14:25:04 -0800 |
commit | f003859f97cab3dfe63985b21d95787b8403de49 (patch) | |
tree | a8e822b1b569c0c63a08dffed0ed3470a79229d3 /src/amd/vulkan/radv_device.c | |
parent | c69f9297cfb6a1f29579fefd3b969d7ad78ec869 (diff) |
nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref
These days, we have two sampler lowering passes. The newer one,
gl_nir_lower_samplers_as_deref, is used by radeonsi. It rewrites
variables to drop structures out of sampler deref chains, to make
life simpler. It then sets var->data.binding for non-bindless
sampler and image variables based on the GL uniform storage's
opaque index values.
The older one converts sampler deref chains (nir_tex_src_texture_deref)
to a numerical offset (nir_tex_src_texture_offset). It also stores the
constant-valued portion of that number in tex->texture_index, making
life really simple for drivers that don't support indirects. It too
pokes at GL uniform storage's opaque index values.
Logically, we can do the first pass (simplify derefs, set bindings)
then the second (turn derefs to offsets, set texture_index). This
patch does exactly that, eliminating some redundancy (only one pass
has to poke at GL uniform storage), and gaining proper var->data.binding
values for drivers using the full lowering.
Reviewed-by: Ian Romanick <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
0 files changed, 0 insertions, 0 deletions