summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-07-21 21:26:20 -0700
committerFrancisco Jerez <[email protected]>2016-08-25 18:36:06 -0700
commit7dac8820730777756c00d7024330517848dc3b9f (patch)
tree2a229a1a650a958404b42f910971c714307efe46 /src/gallium/drivers/radeonsi/si_state.c
parent4e990b67cef9a90f362e5a3791234ef779f47bea (diff)
i965/fs: Rework representation of fragment output locations in NIR.
The problem with the current approach is that driver output locations are represented as a linear offset within the nir_outputs array, which makes it rather difficult for the back-end to figure out what color output and index some nir_intrinsic_load/store_output was meant for, because the offset of a given output within the nir_output array is dependent on the type and size of all previously allocated outputs. Instead this defines the driver location of an output to be the pair formed by its GLSL-assigned location and index (I've borrowed the bitfield macros from brw_defines.h in order to represent the pair of integers as a single scalar value that can be assigned to nir_variable_data::driver_location). nir_assign_var_locations is no longer useful for fragment outputs. Because fragment outputs are now allocated independently rather than within the nir_outputs array, the get_frag_output() helper becomes necessary in order to obtain the right temporary register for a given location-index pair. The type_size helper passed to nir_lower_io is now type_size_dvec4 rather than type_size_vec4_times_4 so that output array offsets are provided in terms of whole array elements rather than in terms of scalar components (dvec4 is the largest vector type supported by the GLSL so this will cause all individual fragment outputs to have a size of one regardless of the type). Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
0 files changed, 0 insertions, 0 deletions