Skip to content

turnip: Rework texture/sampler descriptor layout to remove the linkage.

Emma Anholt requested to merge anholt/mesa:tu-texture-desc into master

The link_map was deciding an arbitrary ordering (based on order used in the NIR) of the textures and samplers in the hardware's texture/sampler tables. This created another layer of indirection in an already complicated world of set/binding indices, got in the way of supporting descriptorCount > 1, and meant that you are forced to reupload textures/samplers after pipeline changes.

Descriptor sets already tell you how many of each thing you need, and we can just allocate our space in the HW based on that. It means we can't garbage-collect holes unused by a shader, but it's way better optimization-wise to be able to (in the future) avoid dynamic re-emission of state by putting our state directly into the descriptor pool and uploading at CmdBind time.

Fixes failures in dEQP-VK.binding_model.shader_access.primary_cmd_buf.multiple

Merge request reports