mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
brw: remove nr_attribute_slots from vs_prog_data
It's not used outside of the compiler. We add a new nr_attribute_regs which now seems useless but will be useful in a later change. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
This commit is contained in:
parent
c00830083e
commit
e9e4aa0f29
2 changed files with 3 additions and 5 deletions
|
|
@ -93,7 +93,6 @@ brw_compile_vs(const struct brw_compiler *compiler,
|
|||
nir->info.clip_distance_array_size;
|
||||
|
||||
unsigned nr_attribute_slots = util_bitcount64(prog_data->inputs_read);
|
||||
|
||||
/* gl_VertexID and gl_InstanceID are system values, but arrive via an
|
||||
* incoming vertex attribute. So, add an extra slot.
|
||||
*/
|
||||
|
|
@ -129,14 +128,15 @@ brw_compile_vs(const struct brw_compiler *compiler,
|
|||
prog_data->uses_drawid = true;
|
||||
|
||||
prog_data->base.urb_read_length = DIV_ROUND_UP(nr_attribute_slots, 2);
|
||||
prog_data->nr_attribute_slots = nr_attribute_slots;
|
||||
unsigned nr_attribute_regs = 4 * nr_attribute_slots;
|
||||
|
||||
/* Since vertex shaders reuse the same VUE entry for inputs and outputs
|
||||
* (overwriting the original contents), we need to make sure the size is
|
||||
* the larger of the two.
|
||||
*/
|
||||
const unsigned vue_entries =
|
||||
MAX2(nr_attribute_slots, (unsigned)prog_data->base.vue_map.num_slots);
|
||||
MAX2(DIV_ROUND_UP(nr_attribute_regs, 4),
|
||||
(unsigned)prog_data->base.vue_map.num_slots);
|
||||
|
||||
prog_data->base.urb_entry_size = DIV_ROUND_UP(vue_entries, 4);
|
||||
|
||||
|
|
|
|||
|
|
@ -1021,8 +1021,6 @@ struct brw_vs_prog_data {
|
|||
uint64_t inputs_read;
|
||||
uint64_t double_inputs_read;
|
||||
|
||||
unsigned nr_attribute_slots;
|
||||
|
||||
bool uses_vertexid;
|
||||
bool uses_instanceid;
|
||||
bool uses_is_indexed_draw;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue