break;
}
}
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) {
+ if (i == 4 || desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) {
ntype = V_028C70_NUMBER_FLOAT;
} else {
ntype = V_028C70_NUMBER_UNORM;
util_format_compose_swizzles(desc->swizzle, state_swizzle, swizzle);
first_non_void = util_format_get_first_non_void_channel(pipe_format);
- switch (desc->channel[first_non_void].type) {
+ if (first_non_void < 0) {
+ num_format = V_008F14_IMG_NUM_FORMAT_FLOAT;
+ } else switch (desc->channel[first_non_void].type) {
case UTIL_FORMAT_TYPE_FLOAT:
num_format = V_008F14_IMG_NUM_FORMAT_FLOAT;
break;