tu: fix rast state allocation size on a6xx gen4

A few regs were added without changing the size of draw state.

Fixes: 4e05338d99 ("turnip: Rast updates for a6xx gen4")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13644>
(cherry picked from commit 79fcd63bd6)
This commit is contained in:
Danylo Piliaiev 2021-11-03 14:05:23 +02:00 committed by Eric Engestrom
parent 1146a8ef50
commit d3efbf9c64
2 changed files with 4 additions and 2 deletions

View file

@ -130,7 +130,7 @@
"description": "tu: fix rast state allocation size on a6xx gen4",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4e05338d99abbf2858a0d8444ffc53028fe23051"
},

View file

@ -2776,7 +2776,9 @@ tu_pipeline_builder_parse_rasterization(struct tu_pipeline_builder *builder,
}
struct tu_cs cs;
uint32_t cs_size = 9 + (builder->emit_msaa_state ? 11 : 0);
uint32_t cs_size = 9 +
(builder->device->physical_device->info->a6xx.has_shading_rate ? 8 : 0) +
(builder->emit_msaa_state ? 11 : 0);
pipeline->rast_state = tu_cs_draw_state(&pipeline->cs, &cs, cs_size);
tu_cs_emit_regs(&cs,