On Wed, 21 Apr 2021 at 06:30, Zebediah Figura zfigura@codeweavers.com wrote:
+#define D3DSP_REGTYPE_SHIFT 28 +#define D3DSP_REGTYPE_SHIFT2 8 +#define D3DSP_REGTYPE_MASK (0x7 << D3DSP_REGTYPE_SHIFT)
It ends up working out here, but note that shifting signed integers produces implementation defined or undefined results in various cases. (We have -Wshift-overflow for that in Wine; I think for vkd3d it's enabled implicitly by -std=c99) It's generally best to make mask constants explicitly unsigned for that reason. On the other hand, these being signed probably matches the PSDK, so perhaps we don't care.