diff --git a/.pick_status.json b/.pick_status.json index 88926fe4ed7..ad7d4a645a9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1584,7 +1584,7 @@ "description": "r600: fix textures with swizzles limited to zero and one", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index e86bf3cd365..a1e773d1e07 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -3103,6 +3103,26 @@ out_word4: if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB && !is_srgb_valid) return ~0; + + if (unlikely(swizzle_view && + swizzle_view[0] >= PIPE_SWIZZLE_0 && + swizzle_view[1] >= PIPE_SWIZZLE_0 && + swizzle_view[2] >= PIPE_SWIZZLE_0 && + swizzle_view[3] >= PIPE_SWIZZLE_0)) { + switch (result) { + case FMT_32_32_32_32_FLOAT: + case FMT_32_32_FLOAT: + result = FMT_32_FLOAT; + break; + case FMT_16_16_16_16: + case FMT_16_16: + result = FMT_32; + break; + default: + break; + } + } + if (word4_p) *word4_p = word4; if (yuv_format_p)