vkd3d-shader/tpf: Set 'gather' instructions counter in the STAT.

This commit is contained in:
Nikolay Sivov 2024-09-18 23:32:40 +02:00 committed by Henri Verbeet
parent 01f6ef5e6d
commit 32ced3bd8f
Notes: Henri Verbeet 2024-09-19 14:47:27 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1086

View File

@ -647,6 +647,7 @@ enum vkd3d_sm4_stat_field
VKD3D_STAT_TESS_CONTROL_POINT_COUNT, VKD3D_STAT_TESS_CONTROL_POINT_COUNT,
VKD3D_STAT_BARRIER, VKD3D_STAT_BARRIER,
VKD3D_STAT_LOD, VKD3D_STAT_LOD,
VKD3D_STAT_GATHER,
VKD3D_STAT_COUNT, VKD3D_STAT_COUNT,
}; };
@ -1795,17 +1796,15 @@ static void init_sm4_lookup_tables(struct vkd3d_sm4_lookup_tables *lookup)
{VKD3D_SM4_OP_SAMPLE_LOD, VKD3D_STAT_SAMPLE}, {VKD3D_SM4_OP_SAMPLE_LOD, VKD3D_STAT_SAMPLE},
{VKD3D_SM5_OP_SAMPLE_LOD_S, VKD3D_STAT_SAMPLE}, {VKD3D_SM5_OP_SAMPLE_LOD_S, VKD3D_STAT_SAMPLE},
{VKD3D_SM5_OP_SAMPLE_CL_S, VKD3D_STAT_SAMPLE}, {VKD3D_SM5_OP_SAMPLE_CL_S, VKD3D_STAT_SAMPLE},
{VKD3D_SM4_OP_GATHER4, VKD3D_STAT_SAMPLE},
{VKD3D_SM5_OP_GATHER4_PO, VKD3D_STAT_SAMPLE},
{VKD3D_SM4_OP_SAMPLE_C, VKD3D_STAT_SAMPLE_C}, {VKD3D_SM4_OP_SAMPLE_C, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM4_OP_SAMPLE_C_LZ, VKD3D_STAT_SAMPLE_C}, {VKD3D_SM4_OP_SAMPLE_C_LZ, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM5_OP_SAMPLE_C_LZ_S, VKD3D_STAT_SAMPLE_C}, {VKD3D_SM5_OP_SAMPLE_C_LZ_S, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM5_OP_SAMPLE_C_CL_S, VKD3D_STAT_SAMPLE_C}, {VKD3D_SM5_OP_SAMPLE_C_CL_S, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM5_OP_GATHER4_C, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM5_OP_GATHER4_PO_C, VKD3D_STAT_SAMPLE_C},
{VKD3D_SM4_OP_SAMPLE_GRAD, VKD3D_STAT_SAMPLE_GRAD}, {VKD3D_SM4_OP_SAMPLE_GRAD, VKD3D_STAT_SAMPLE_GRAD},
{VKD3D_SM5_OP_SAMPLE_GRAD_CL_S, VKD3D_STAT_SAMPLE_GRAD}, {VKD3D_SM5_OP_SAMPLE_GRAD_CL_S, VKD3D_STAT_SAMPLE_GRAD},
{VKD3D_SM4_OP_SAMPLE_B, VKD3D_STAT_SAMPLE_BIAS}, {VKD3D_SM4_OP_SAMPLE_B, VKD3D_STAT_SAMPLE_BIAS},
{VKD3D_SM4_OP_GATHER4, VKD3D_STAT_GATHER},
{VKD3D_SM5_OP_GATHER4_PO, VKD3D_STAT_GATHER},
{VKD3D_SM4_OP_LOD, VKD3D_STAT_LOD}, {VKD3D_SM4_OP_LOD, VKD3D_STAT_LOD},
{VKD3D_SM4_OP_LD, VKD3D_STAT_LOAD}, {VKD3D_SM4_OP_LD, VKD3D_STAT_LOAD},
@ -6438,7 +6437,7 @@ static void write_sm4_stat(struct hlsl_ctx *ctx, const struct sm4_stat *stat, st
put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_INPUT_PRIMITIVE]); put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_INPUT_PRIMITIVE]);
put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_OUTPUT_TOPOLOGY]); put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_OUTPUT_TOPOLOGY]);
put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_VERTICES_OUT]); put_u32(&buffer, stat->fields[VKD3D_STAT_DCL_VERTICES_OUT]);
put_u32(&buffer, 0); /* Unknown */ put_u32(&buffer, stat->fields[VKD3D_STAT_GATHER]);
put_u32(&buffer, stat->fields[VKD3D_STAT_LOD]); put_u32(&buffer, stat->fields[VKD3D_STAT_LOD]);
put_u32(&buffer, 0); /* Sample frequency */ put_u32(&buffer, 0); /* Sample frequency */