enum pipe_format pfmt = vbufs[i].format;
enum a3xx_vtx_fmt fmt = fd3_pipe2vtx(pfmt);
bool switchnext = (i != last);
+ bool isint = util_format_is_pure_integer(pfmt);
uint32_t fs = util_format_get_blocksize(pfmt);
debug_assert(fmt != ~0);
A3XX_VFD_DECODE_INSTR_REGID(vp->inputs[i].regid) |
A3XX_VFD_DECODE_INSTR_SHIFTCNT(fs) |
A3XX_VFD_DECODE_INSTR_LASTCOMPVALID |
+ COND(isint, A3XX_VFD_DECODE_INSTR_INT) |
COND(switchnext, A3XX_VFD_DECODE_INSTR_SWITCHNEXT));
total_in += vp->inputs[i].ncomp;
case PIPE_FORMAT_R16G16_SNORM:
return VFMT_NORM_SHORT_16_16;
+ case PIPE_FORMAT_R32_UINT:
+ case PIPE_FORMAT_R32_USCALED:
+ return VFMT_UINT_32;
+
+ case PIPE_FORMAT_R32_SINT:
+ case PIPE_FORMAT_R32_SSCALED:
+ return VFMT_INT_32;
+
case PIPE_FORMAT_R10G10B10A2_UNORM:
return VFMT_NORM_UINT_10_10_10_2;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
return VFMT_FLOAT_16_16_16_16;
+ case PIPE_FORMAT_R32G32_UINT:
+ case PIPE_FORMAT_R32G32_USCALED:
+ return VFMT_UINT_32_32;
+
+ case PIPE_FORMAT_R32G32_SINT:
+ case PIPE_FORMAT_R32G32_SSCALED:
+ return VFMT_INT_32_32;
+
/* 96-bit buffers. */
case PIPE_FORMAT_R32G32B32_FLOAT:
return VFMT_FLOAT_32_32_32;
case PIPE_FORMAT_R32G32B32_FIXED:
return VFMT_FIXED_32_32_32;
+ case PIPE_FORMAT_R32G32B32_UINT:
+ case PIPE_FORMAT_R32G32B32_USCALED:
+ return VFMT_UINT_32_32_32;
+
+ case PIPE_FORMAT_R32G32B32_SINT:
+ case PIPE_FORMAT_R32G32B32_SSCALED:
+ return VFMT_INT_32_32_32;
+
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return VFMT_FLOAT_32_32_32_32;
case PIPE_FORMAT_R32G32B32A32_FIXED:
return VFMT_FIXED_32_32_32_32;
-/* TODO probably need gles3 blob drivers to find the 32bit int formats:
- case PIPE_FORMAT_R32G32B32A32_SNORM:
- case PIPE_FORMAT_R32G32B32A32_UNORM:
- case PIPE_FORMAT_R32G32B32A32_SINT:
case PIPE_FORMAT_R32G32B32A32_UINT:
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ return VFMT_UINT_32_32_32_32;
- case PIPE_FORMAT_R32_UINT:
- case PIPE_FORMAT_R32_SINT:
- case PIPE_FORMAT_A32_UINT:
- case PIPE_FORMAT_A32_SINT:
- case PIPE_FORMAT_L32_UINT:
- case PIPE_FORMAT_L32_SINT:
- case PIPE_FORMAT_I32_UINT:
- case PIPE_FORMAT_I32_SINT:
+ case PIPE_FORMAT_R32G32B32A32_SINT:
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ return VFMT_INT_32_32_32_32;
- case PIPE_FORMAT_R32G32_SINT:
- case PIPE_FORMAT_R32G32_UINT:
- case PIPE_FORMAT_L32A32_UINT:
- case PIPE_FORMAT_L32A32_SINT:
-*/
+/* TODO normalized 32bit int formats do not appear to be supported
+ * natively.. will require either shader variant or VFD_DECODE
+ * gymnastics like the blob driver does..
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ */
default:
return ~0;