mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 07:10:09 +01:00
intel/brw: allocate large table in the heap instead of the stack
When having a large number of virtual register this table can be too large to be allocated on the stack. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30008>
This commit is contained in:
parent
753d253df7
commit
65c0ef859f
1 changed files with 2 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ brw_fs_opt_split_virtual_grfs(fs_visitor &s)
|
|||
|
||||
/* Count the total number of registers */
|
||||
unsigned reg_count = 0;
|
||||
unsigned vgrf_to_reg[num_vars];
|
||||
unsigned *vgrf_to_reg = new unsigned[num_vars];
|
||||
for (unsigned i = 0; i < num_vars; i++) {
|
||||
vgrf_to_reg[i] = reg_count;
|
||||
reg_count += s.alloc.sizes[i];
|
||||
|
|
@ -203,6 +203,7 @@ cleanup:
|
|||
delete[] vgrf_has_split;
|
||||
delete[] new_virtual_grf;
|
||||
delete[] new_reg_offset;
|
||||
delete[] vgrf_to_reg;
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue