mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/tpf: Handle conversion instructions in STAT.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
44222ea739
commit
cfa8f0dccb
Notes:
Henri Verbeet
2024-09-13 16:06:12 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1069
@ -620,8 +620,9 @@ enum vkd3d_sm4_shader_data_type
|
||||
enum vkd3d_sm4_stat_field
|
||||
{
|
||||
VKD3D_STAT_UNUSED = 0,
|
||||
VKD3D_STAT_MOV,
|
||||
VKD3D_STAT_INSTR_COUNT,
|
||||
VKD3D_STAT_MOV,
|
||||
VKD3D_STAT_CONV,
|
||||
VKD3D_STAT_COUNT,
|
||||
};
|
||||
|
||||
@ -1686,7 +1687,19 @@ static void init_sm4_lookup_tables(struct vkd3d_sm4_lookup_tables *lookup)
|
||||
|
||||
static const struct vkd3d_sm4_stat_field_info stat_field_table[] =
|
||||
{
|
||||
{VKD3D_SM4_OP_MOV, VKD3D_STAT_MOV},
|
||||
{VKD3D_SM4_OP_MOV, VKD3D_STAT_MOV},
|
||||
{VKD3D_SM4_OP_ITOF, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM4_OP_FTOI, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM4_OP_FTOU, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM4_OP_UTOF, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_DTOU, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_UTOD, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_DTOF, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_FTOD, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_DTOI, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_ITOD, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_F32TOF16, VKD3D_STAT_CONV},
|
||||
{VKD3D_SM5_OP_F16TOF32, VKD3D_STAT_CONV},
|
||||
};
|
||||
|
||||
memset(lookup, 0, sizeof(*lookup));
|
||||
@ -6226,7 +6239,7 @@ static void write_sm4_stat(struct hlsl_ctx *ctx, const struct sm4_stat *stat, st
|
||||
put_u32(&buffer, 0); /* Texture gradient instructions */
|
||||
put_u32(&buffer, stat->fields[VKD3D_STAT_MOV]);
|
||||
put_u32(&buffer, 0); /* MOVC instructions */
|
||||
put_u32(&buffer, 0); /* Conversion instructions */
|
||||
put_u32(&buffer, stat->fields[VKD3D_STAT_CONV]);
|
||||
put_u32(&buffer, 0); /* Bitwise instructions */
|
||||
put_u32(&buffer, 0); /* Input primitive */
|
||||
put_u32(&buffer, 0); /* GS output topology */
|
||||
|
Loading…
Reference in New Issue
Block a user