Skip to content

WIP: nir: Add variable modes for textures and atomic counters

Faith Ekstrand requested to merge gfxstrand/mesa:wip/nir-var-texture into main

This is similar to !4743 (merged) only for textures and atomic counters. Everything associated with texturing will go in nir_var_texture: textures, samplers and combined texture+sampler. We could split hairs and try to separate samplers and textures but then we have a bit of a mess for combined sampler+texture variables.

One thing here that's a bit non-obvious: When coming from GLSL, samplers are in nir_var_uniform until lower_samplers_as_deref() is called. This is a bit awkward but required right now as GLSL allows samplers to live inside structs with other stuff. I'm starting to wish that had been written as a GLSL lowering pass.....

Edited by Faith Ekstrand

Merge request reports