return V_008F14_IMG_DATA_FORMAT_10_11_11;
}
- /* R8G8Bx_SNORM - TODO CxV8U8 */
+ /* Other "OTHER" layouts are unsupported. */
+ if (desc->layout == UTIL_FORMAT_LAYOUT_OTHER)
+ goto out_unknown;
/* hw cannot support mixed formats (except depth/stencil, since only
* depth is read).*/
!desc->channel[first_non_void].pure_integer)
goto out_unknown;
+ /* Reject unsupported 32_*NORM and FIXED formats. */
+ if (desc->channel[first_non_void].size == 32 &&
+ (desc->channel[first_non_void].normalized ||
+ desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_FIXED))
+ goto out_unknown;
+
+ /* This format fails on Gfx8/Carrizo´. */
+ if (format == PIPE_FORMAT_A8R8_UNORM)
+ goto out_unknown;
+
/* See whether the components are of the same size. */
for (i = 1; i < desc->nr_channels; i++) {
uniform = uniform && desc->channel[0].size == desc->channel[i].size;
}
goto out_unknown;
case 4:
+ /* 5551 and 1555 UINT formats fail on Gfx8/Carrizo´. */
+ if (desc->channel[1].size == 5 &&
+ desc->channel[2].size == 5 &&
+ desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED &&
+ desc->channel[first_non_void].pure_integer)
+ goto out_unknown;
+
if (desc->channel[0].size == 5 && desc->channel[1].size == 5 &&
desc->channel[2].size == 5 && desc->channel[3].size == 1) {
return V_008F14_IMG_DATA_FORMAT_1_5_5_5;
switch (desc->channel[first_non_void].size) {
case 4:
switch (desc->nr_channels) {
-#if 0 /* Not supported for render targets */
- case 2:
- return V_008F14_IMG_DATA_FORMAT_4_4;
-#endif
case 4:
+ /* 4444 UINT formats fail on Gfx8/Carrizo´. */
+ if (desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED &&
+ desc->channel[first_non_void].pure_integer)
+ goto out_unknown;
+
return V_008F14_IMG_DATA_FORMAT_4_4_4_4;
}
break;