radv: add an assertion to prevent GPU hangs when VRS isn't supported

Just hit this case with a buggy CTS test.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13361>
This commit is contained in:
Samuel Pitoiset 2021-10-14 16:21:29 +02:00
parent 9a32a7fdfe
commit 8304392c35
1 changed files with 2 additions and 0 deletions

View File

@ -1611,6 +1611,8 @@ radv_emit_fragment_shading_rate(struct radv_cmd_buffer *cmd_buffer)
uint32_t vertex_comb_mode = d->fragment_shading_rate.combiner_ops[0];
uint32_t htile_comb_mode = d->fragment_shading_rate.combiner_ops[1];
assert(cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10_3);
if (subpass && !subpass->vrs_attachment) {
/* When the current subpass has no VRS attachment, the VRS rates are expected to be 1x1, so we
* can cheat by tweaking the different combiner modes.