Skip to content

spirv: Properly handle forward pointers of SpvStorageClassUniform

Caio Oliveira requested to merge cmarcelo/mesa:r/fix-forward-pointers into master

This MR is on top of !781 (merged). Only the topmost patch is new.

Add an extra pass before handling the types to collect all the necessary information for deciding the right mode (hence address format) of a forward pointer.

Ideally the mode / address format would only depend on Storage Class (which is available as part of the forward pointer instruction). But for the SpvStorageClassUniform there are multiple options, depending on the block decorations of the pointed type.

The extra pass bootstrap the vtn_values for all the types and a few fields from arrays and structs, to be able to collect the block decorations.

As a consequence, we change a little bit the vtn_handle_type to do less checks and don't worry about creating vtn_values.

Merge request reports