vkd3d-shader/tpf.c:3810:39: warning: passing argument 2 of ‘sm4_register_from_node’ from incompatible pointer type [-Wincompatible-pointer-types] vkd3d-shader/tpf.c:4750:59: warning: passing argument 3 of ‘sm4_register_from_deref’ from incompatible pointer type [-Wincompatible-pointer-types]
The other option is to change the parameter to a DWORD but this is a larger change.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
vkd3d-shader/tpf.c:3810:39: warning: passing argument 2 of ‘sm4_register_from_node’ from incompatible pointer type [-Wincompatible-pointer-types] vkd3d-shader/tpf.c:4750:59: warning: passing argument 3 of ‘sm4_register_from_deref’ from incompatible pointer type [-Wincompatible-pointer-types] --- libs/vkd3d-shader/vkd3d_shader_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index af75ef3b..2e9a98a6 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -758,7 +758,7 @@ void vsir_register_init(struct vkd3d_shader_register *reg, enum vkd3d_shader_reg struct vkd3d_shader_dst_param { struct vkd3d_shader_register reg; - DWORD write_mask; + unsigned int write_mask; DWORD modifiers; DWORD shift; };
This merge request was approved by Giovanni Mascellani.
No objections from me, but since Francisco is working on this it's appropriate to have a green light from him too.
No objections from me, but since Francisco is working on this it's appropriate to have a green light from him too.
In general sure, but I think this is straightforward. I'd suggest using uint32_t though, because this is a mask.
More broadly, the only places in vkd3d that should use Windows types like DWORD are places where those are dictated by the API we're implementing; for vkd3d-shader that's essentially nowhere. (Because things like DWORD don't have a consistent definition between the Linux and the Windows build. We want to address that, but avoiding these types avoids the issue, and there should be few places that actually require them.)