Skip to content

v3dv: only update uniforms for dirty descriptors if stage has descriptors

Iago Toral requested to merge itoral/mesa:v3dv_descriptor_uniforms into master

If we have dirty descriptor set state we have to update our uniform data to reference the new resources such as addresses for textures or UBOs. This is known to have a high CPU cost, so we want to limit this as much as we can.

It is a common rendering pattern in applications to render many objects using the same pipeline, but modifying the descriptor sets bound to update textures, UBOs, etc. In this scenario, we would be incurring in unnecessary uniform stream updates for stages that don't access descriptor sets at all.

This change makes it so we track which shader stages in a pipeline use descriptor set state and skips updating uniform streams for them when dirty descriptor set state is the only reason requiring us to genrate new uniform streams for a draw call.

Merge request reports