broadcom/compiler: add driver_location_map at vs prog data
This maps the nir shader data.location to its final data.driver_location. In general we are using the driver location as index (like vattr_sizes on the same struct), so having this map is useful if what we have is the data.location, and we don't have available the original nir shader. v2: use memset instead of for loop, and nir_foreach_shader_in_variable instead of nir_foreach_variable_with_modes (Iago) Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
This commit is contained in:

committed by
Marge Bot

parent
2be0c36775
commit
b71fd5587e
@@ -834,6 +834,15 @@ struct v3d_vs_prog_data {
|
||||
|
||||
/* Value to be programmed in VCM_CACHE_SIZE. */
|
||||
uint8_t vcm_cache_size;
|
||||
|
||||
/* Maps the nir->data.location to its
|
||||
* nir->data.driver_location. In general we are using the
|
||||
* driver location as index (like vattr_sizes above), so this
|
||||
* map is useful when what we have is the location
|
||||
*
|
||||
* Returns -1 if the location is not used
|
||||
*/
|
||||
int32_t driver_location_map[V3D_MAX_VS_INPUTS];
|
||||
};
|
||||
|
||||
struct v3d_gs_prog_data {
|
||||
|
Reference in New Issue
Block a user