mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
iris: Fix SINT assert in convert_fast_clear_color
Don't assert that the size of every channel is greater than zero. This assert doesn't work for integer formats with less than 4 channels. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7345>
This commit is contained in:
parent
4cb9b5db2c
commit
60336cac60
1 changed files with 1 additions and 2 deletions
|
|
@ -179,8 +179,7 @@ convert_fast_clear_color(struct iris_context *ice,
|
|||
for (int i = 0; i < 4; i++) {
|
||||
unsigned bits = util_format_get_component_bits(
|
||||
format, UTIL_FORMAT_COLORSPACE_RGB, i);
|
||||
assert(bits > 0);
|
||||
if (bits < 32) {
|
||||
if (bits > 0 && bits < 32) {
|
||||
int32_t max = (1 << (bits - 1)) - 1;
|
||||
int32_t min = -(1 << (bits - 1));
|
||||
override_color.i32[i] = CLAMP(override_color.i32[i], min, max);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue