diff options
author | Marek Olšák <[email protected]> | 2019-02-27 18:31:54 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-04-01 12:21:20 -0400 |
commit | 3ad2a9b3faa19e29fe1c2a28c712f265ee29423b (patch) | |
tree | cf4997d5ff0442bfd367543185de357c15f0b3a6 | |
parent | d4e0fbc92fd08be504f328144c874da47b78e5dc (diff) |
radeonsi: fix assertion failure by using the correct type
src/gallium/drivers/radeonsi/si_state_viewport.c:196: si_emit_guardband:
Assertion `vp_as_scissor.maxx <= max_viewport_size[vp_as_scissor.quant_mode]
&& vp_as_scissor.maxy <= max_viewport_size[vp_as_scissor.quant_mode]' failed.
The comparison was unsigned, so negative maxx or maxy would fail.
Fixes: 3c540e0a7488 "radeonsi: Fix guardband computation for large render targets"
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_viewport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_viewport.c b/src/gallium/drivers/radeonsi/si_state_viewport.c index 64bb956b200..a9a1be73ba4 100644 --- a/src/gallium/drivers/radeonsi/si_state_viewport.c +++ b/src/gallium/drivers/radeonsi/si_state_viewport.c @@ -186,7 +186,7 @@ static void si_emit_guardband(struct si_context *ctx) ctx->chip_class >= VI ? 16 : MAX2(ctx->screen->se_tile_repeat, 16); /* Indexed by quantization modes */ - static unsigned max_viewport_size[] = {65535, 16383, 4095}; + static int max_viewport_size[] = {65535, 16383, 4095}; /* Ensure that the whole viewport stays representable in * absolute coordinates. |