mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
brw: store the remapping table for wa_18019110168 in constant data
That way it can be accessed at runtime. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35103>
This commit is contained in:
parent
e1a7eb1718
commit
6336cf0ea2
2 changed files with 27 additions and 1 deletions
|
|
@ -1315,6 +1315,23 @@ brw_compile_mesh(const struct brw_compiler *compiler,
|
|||
|
||||
g.generate_code(selected->cfg, selected->dispatch_width, selected->shader_stats,
|
||||
selected->performance_analysis.require(), params->base.stats);
|
||||
g.add_const_data(nir->constant_data, nir->constant_data_size);
|
||||
if (prog_data->map.wa_18019110168_active) {
|
||||
uint8_t *const_data =
|
||||
(uint8_t *) rzalloc_size(params->base.mem_ctx,
|
||||
nir->constant_data_size +
|
||||
sizeof(prog_data->map.per_primitive_offsets));
|
||||
memcpy(const_data, nir->constant_data, nir->constant_data_size);
|
||||
memcpy(const_data + nir->constant_data_size,
|
||||
prog_data->map.per_primitive_offsets,
|
||||
sizeof(prog_data->map.per_primitive_offsets));
|
||||
g.add_const_data(const_data,
|
||||
nir->constant_data_size +
|
||||
sizeof(prog_data->map.per_primitive_offset));
|
||||
prog_data->wa_18019110168_mapping_offset =
|
||||
prog_data->base.base.const_data_offset + nir->constant_data_size;
|
||||
} else {
|
||||
g.add_const_data(nir->constant_data, nir->constant_data_size);
|
||||
}
|
||||
|
||||
return g.get_assembly();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1306,6 +1306,15 @@ struct brw_mesh_prog_data {
|
|||
|
||||
bool uses_drawid;
|
||||
bool autostrip_enable;
|
||||
|
||||
/**
|
||||
* Offset in the program where the remapping table for Wa_18019110168 is
|
||||
* located.
|
||||
*
|
||||
* The remapping table has the same format as
|
||||
* intel_vue_map::varying_to_slot[]
|
||||
*/
|
||||
uint32_t wa_18019110168_mapping_offset;
|
||||
};
|
||||
|
||||
/* brw_any_prog_data is prog_data for any stage that maps to an API stage */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue