mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-17 23:40:29 +01:00
anv: Restrict the number of color regions to those actually written
The back-end compiler emits the number of color writes specified by wm_prog_key::nr_color_regions regardless of what nir_store_outputs we have. Once we've gone through and figured out which render targets actually exist and are written by the shader, we should restrict the key to avoid extra RT write messages. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
4d57e543b8
commit
80bc0b728c
1 changed files with 5 additions and 0 deletions
|
|
@ -963,6 +963,11 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,
|
|||
num_rts = 1;
|
||||
}
|
||||
|
||||
/* Now that we've determined the actual number of render targets, adjust
|
||||
* the key accordingly.
|
||||
*/
|
||||
key.nr_color_regions = num_rts;
|
||||
|
||||
assert(num_rts <= max_rt);
|
||||
map.surface_to_descriptor -= num_rts;
|
||||
map.surface_count += num_rts;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue