mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Define a symbolic constant to represent the D3D_SIF_TEXTURE_COMPONENTS shift.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c2057c6849
commit
9d5dce2dc1
@ -561,7 +561,7 @@ static void write_sm4_rdef(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc)
|
|||||||
put_u32(&buffer, sm4_resource_format(var->data_type));
|
put_u32(&buffer, sm4_resource_format(var->data_type));
|
||||||
put_u32(&buffer, sm4_rdef_resource_dimension(var->data_type));
|
put_u32(&buffer, sm4_rdef_resource_dimension(var->data_type));
|
||||||
put_u32(&buffer, ~0u); /* FIXME: multisample count */
|
put_u32(&buffer, ~0u); /* FIXME: multisample count */
|
||||||
flags |= (var->data_type->e.resource_format->dimx - 1) << 2;
|
flags |= (var->data_type->e.resource_format->dimx - 1) << VKD3D_SM4_SIF_TEXTURE_COMPONENTS_SHIFT;
|
||||||
}
|
}
|
||||||
put_u32(&buffer, var->reg.id);
|
put_u32(&buffer, var->reg.id);
|
||||||
put_u32(&buffer, 1); /* bind count */
|
put_u32(&buffer, 1); /* bind count */
|
||||||
|
@ -146,6 +146,9 @@
|
|||||||
|
|
||||||
#define VKD3D_SM4_TYPE_COMPONENT(com, i) (((com) >> (4 * (i))) & 0xfu)
|
#define VKD3D_SM4_TYPE_COMPONENT(com, i) (((com) >> (4 * (i))) & 0xfu)
|
||||||
|
|
||||||
|
/* The shift that corresponds to the D3D_SIF_TEXTURE_COMPONENTS mask. */
|
||||||
|
#define VKD3D_SM4_SIF_TEXTURE_COMPONENTS_SHIFT 2
|
||||||
|
|
||||||
enum vkd3d_sm4_opcode
|
enum vkd3d_sm4_opcode
|
||||||
{
|
{
|
||||||
VKD3D_SM4_OP_ADD = 0x00,
|
VKD3D_SM4_OP_ADD = 0x00,
|
||||||
|
Loading…
Reference in New Issue
Block a user