mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
iris: Skip allocating a null surface when there are 0 color regions.
The compiler now sets the "Null Render Target" bit in the RT write extended message descriptor, causing it to write to an implicit null surface without us needing to set one up in the binding table. Together with the last patch, this improves performance in Car Chase on an Icelake 8x8 (locked to 700Mhz) by 0.0445526% +/- 0.0132736% (n=832). Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
f76a724e06
commit
f8c44e4ed7
2 changed files with 9 additions and 2 deletions
|
|
@ -1522,8 +1522,15 @@ iris_compile_fs(struct iris_context *ice,
|
||||||
*/
|
*/
|
||||||
brw_nir_lower_fs_outputs(nir);
|
brw_nir_lower_fs_outputs(nir);
|
||||||
|
|
||||||
|
/* On Gen11+, shader RT write messages have a "Null Render Target" bit
|
||||||
|
* and do not need a binding table entry with a null surface. Earlier
|
||||||
|
* generations need an entry for a null surface.
|
||||||
|
*/
|
||||||
|
int null_rts = devinfo->gen < 11 ? 1 : 0;
|
||||||
|
|
||||||
struct iris_binding_table bt;
|
struct iris_binding_table bt;
|
||||||
iris_setup_binding_table(devinfo, nir, &bt, MAX2(key->nr_color_regions, 1),
|
iris_setup_binding_table(devinfo, nir, &bt,
|
||||||
|
MAX2(key->nr_color_regions, null_rts),
|
||||||
num_system_values, num_cbufs);
|
num_system_values, num_cbufs);
|
||||||
|
|
||||||
brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges);
|
brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges);
|
||||||
|
|
|
||||||
|
|
@ -4337,7 +4337,7 @@ iris_populate_binding_table(struct iris_context *ice,
|
||||||
}
|
}
|
||||||
push_bt_entry(addr);
|
push_bt_entry(addr);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (GEN_GEN < 11) {
|
||||||
uint32_t addr = use_null_fb_surface(batch, ice);
|
uint32_t addr = use_null_fb_surface(batch, ice);
|
||||||
push_bt_entry(addr);
|
push_bt_entry(addr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue