Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 11/01/22 02:03, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/dxbc.c | 20 +++++++++++++++++++- libs/vkd3d-shader/trace.c | 16 ++++++++++++++++ libs/vkd3d-shader/vkd3d_shader_private.h | 16 ++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index be7608661..a8a387bfd 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -91,7 +91,7 @@ struct vkd3d_shader_sm4_parser
unsigned int output_map[MAX_REG_OUTPUT];
- struct vkd3d_shader_src_param src_param[5];
- struct vkd3d_shader_src_param src_param[6]; struct vkd3d_shader_dst_param dst_param[2]; struct list src_free; struct list src;
@@ -894,6 +894,22 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] = {VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"}, {VKD3D_SM5_OP_ITOD, VKD3DSIH_ITOD, "d", "i"}, {VKD3D_SM5_OP_UTOD, VKD3DSIH_UTOD, "d", "u"},
{VKD3D_SM5_OP_GATHER4_S, VKD3DSIH_GATHER4_S, "uu", "fRS"},
{VKD3D_SM5_OP_GATHER4_C_S, VKD3DSIH_GATHER4_C_S, "fu", "fRSf"},
{VKD3D_SM5_OP_GATHER4_PO_S, VKD3DSIH_GATHER4_PO_S, "fu", "fiRS"},
{VKD3D_SM5_OP_GATHER4_PO_C_S, VKD3DSIH_GATHER4_PO_C_S, "fu", "fiRSf"},
{VKD3D_SM5_OP_LD_S, VKD3DSIH_LD_S, "uu", "iR"},
{VKD3D_SM5_OP_LD2DMS_S, VKD3DSIH_LD2DMS_S, "uu", "iRi"},
{VKD3D_SM5_OP_LD_UAV_TYPED_S, VKD3DSIH_LD_UAV_TYPED_S, "uu", "iU"},
{VKD3D_SM5_OP_LD_RAW_S, VKD3DSIH_LD_RAW_S, "uu", "iU"},
{VKD3D_SM5_OP_LD_STRUCTURED_S, VKD3DSIH_LD_STRUCTURED_S, "uu", "iiR"},
{VKD3D_SM5_OP_SAMPLE_LOD_S, VKD3DSIH_SAMPLE_LOD_S, "uu", "fRSf"},
{VKD3D_SM5_OP_SAMPLE_C_LZ_S, VKD3DSIH_SAMPLE_C_LZ_S, "fu", "fRSf"},
{VKD3D_SM5_OP_SAMPLE_CL_S, VKD3DSIH_SAMPLE_CL_S, "uu", "fRSf"},
{VKD3D_SM5_OP_SAMPLE_B_CL_S, VKD3DSIH_SAMPLE_B_CL_S, "uu", "fRSff"},
{VKD3D_SM5_OP_SAMPLE_GRAD_CL_S, VKD3DSIH_SAMPLE_GRAD_CL_S, "uu", "fRSfff"},
{VKD3D_SM5_OP_SAMPLE_C_CL_S, VKD3DSIH_SAMPLE_C_CL_S, "fu", "fRSff"},
{VKD3D_SM5_OP_CHECK_ACCESS_FULLY_MAPPED, VKD3DSIH_CHECK_ACCESS_FULLY_MAPPED, "u", "u"}, };
static const enum vkd3d_shader_register_type register_type_table[] =
@@ -1602,6 +1618,8 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_parser *parser, stru ins->dst = sm4->dst_param; ins->src_count = strlen(opcode_info->src_info); ins->src = sm4->src_param;
- assert(ins->dst_count <= ARRAY_SIZE(sm4->dst_param));
- assert(ins->src_count <= ARRAY_SIZE(sm4->src_param)); ins->resource_type = VKD3D_SHADER_RESOURCE_NONE; ins->resource_stride = 0; ins->resource_data_type[0] = VKD3D_DATA_FLOAT;
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index e4a1884cf..f6ecf9e27 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -51,6 +51,7 @@ static const char * const shader_opcode_names[] = [VKD3DSIH_CALL ] = "call", [VKD3DSIH_CALLNZ ] = "callnz", [VKD3DSIH_CASE ] = "case",
- [VKD3DSIH_CHECK_ACCESS_FULLY_MAPPED ] = "check_access_fully_mapped", [VKD3DSIH_CMP ] = "cmp", [VKD3DSIH_CND ] = "cnd", [VKD3DSIH_CONTINUE ] = "continue",
@@ -155,8 +156,12 @@ static const char * const shader_opcode_names[] = [VKD3DSIH_FTOU ] = "ftou", [VKD3DSIH_GATHER4 ] = "gather4", [VKD3DSIH_GATHER4_C ] = "gather4_c",
- [VKD3DSIH_GATHER4_C_S ] = "gather4_c_s", [VKD3DSIH_GATHER4_PO ] = "gather4_po", [VKD3DSIH_GATHER4_PO_C ] = "gather4_po_c",
- [VKD3DSIH_GATHER4_PO_C_S ] = "gather4_po_c_s",
- [VKD3DSIH_GATHER4_PO_S ] = "gather4_po_s",
- [VKD3DSIH_GATHER4_S ] = "gather4_s", [VKD3DSIH_GE ] = "ge", [VKD3DSIH_HS_CONTROL_POINT_PHASE ] = "hs_control_point_phase", [VKD3DSIH_HS_DECLS ] = "hs_decls",
@@ -194,9 +199,14 @@ static const char * const shader_opcode_names[] = [VKD3DSIH_LABEL ] = "label", [VKD3DSIH_LD ] = "ld", [VKD3DSIH_LD2DMS ] = "ld2dms",
- [VKD3DSIH_LD2DMS_S ] = "ld2dms_s", [VKD3DSIH_LD_RAW ] = "ld_raw",
- [VKD3DSIH_LD_RAW_S ] = "ld_raw_s",
- [VKD3DSIH_LD_S ] = "ld_s", [VKD3DSIH_LD_STRUCTURED ] = "ld_structured",
- [VKD3DSIH_LD_STRUCTURED_S ] = "ld_structured_s", [VKD3DSIH_LD_UAV_TYPED ] = "ld_uav_typed",
- [VKD3DSIH_LD_UAV_TYPED_S ] = "ld_uav_typed_s", [VKD3DSIH_LIT ] = "lit", [VKD3DSIH_LOD ] = "lod", [VKD3DSIH_LOG ] = "log",
@@ -235,11 +245,17 @@ static const char * const shader_opcode_names[] = [VKD3DSIH_RSQ ] = "rsq", [VKD3DSIH_SAMPLE ] = "sample", [VKD3DSIH_SAMPLE_B ] = "sample_b",
- [VKD3DSIH_SAMPLE_B_CL_S ] = "sample_b_cl_s", [VKD3DSIH_SAMPLE_C ] = "sample_c",
- [VKD3DSIH_SAMPLE_C_CL_S ] = "sample_c_cl_s", [VKD3DSIH_SAMPLE_C_LZ ] = "sample_c_lz",
- [VKD3DSIH_SAMPLE_C_LZ_S ] = "sample_c_lz_s",
- [VKD3DSIH_SAMPLE_CL_S ] = "sample_cl_s", [VKD3DSIH_SAMPLE_GRAD ] = "sample_d",
- [VKD3DSIH_SAMPLE_GRAD_CL_S ] = "sample_d_cl_s", [VKD3DSIH_SAMPLE_INFO ] = "sample_info", [VKD3DSIH_SAMPLE_LOD ] = "sample_l",
- [VKD3DSIH_SAMPLE_LOD_S ] = "sample_l_s", [VKD3DSIH_SAMPLE_POS ] = "sample_pos", [VKD3DSIH_SETP ] = "setp", [VKD3DSIH_SGE ] = "sge",
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index ec4582739..d59557971 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -151,6 +151,7 @@ enum vkd3d_shader_opcode VKD3DSIH_CALL, VKD3DSIH_CALLNZ, VKD3DSIH_CASE,
- VKD3DSIH_CHECK_ACCESS_FULLY_MAPPED, VKD3DSIH_CMP, VKD3DSIH_CND, VKD3DSIH_CONTINUE,
@@ -255,8 +256,12 @@ enum vkd3d_shader_opcode VKD3DSIH_FTOU, VKD3DSIH_GATHER4, VKD3DSIH_GATHER4_C,
- VKD3DSIH_GATHER4_C_S, VKD3DSIH_GATHER4_PO, VKD3DSIH_GATHER4_PO_C,
- VKD3DSIH_GATHER4_PO_C_S,
- VKD3DSIH_GATHER4_PO_S,
- VKD3DSIH_GATHER4_S, VKD3DSIH_GE, VKD3DSIH_HS_CONTROL_POINT_PHASE, VKD3DSIH_HS_DECLS,
@@ -294,9 +299,14 @@ enum vkd3d_shader_opcode VKD3DSIH_LABEL, VKD3DSIH_LD, VKD3DSIH_LD2DMS,
- VKD3DSIH_LD2DMS_S, VKD3DSIH_LD_RAW,
- VKD3DSIH_LD_RAW_S,
- VKD3DSIH_LD_S, VKD3DSIH_LD_STRUCTURED,
- VKD3DSIH_LD_STRUCTURED_S, VKD3DSIH_LD_UAV_TYPED,
- VKD3DSIH_LD_UAV_TYPED_S, VKD3DSIH_LIT, VKD3DSIH_LOD, VKD3DSIH_LOG,
@@ -335,11 +345,17 @@ enum vkd3d_shader_opcode VKD3DSIH_RSQ, VKD3DSIH_SAMPLE, VKD3DSIH_SAMPLE_B,
- VKD3DSIH_SAMPLE_B_CL_S, VKD3DSIH_SAMPLE_C,
- VKD3DSIH_SAMPLE_C_CL_S, VKD3DSIH_SAMPLE_C_LZ,
- VKD3DSIH_SAMPLE_C_LZ_S,
- VKD3DSIH_SAMPLE_CL_S, VKD3DSIH_SAMPLE_GRAD,
- VKD3DSIH_SAMPLE_GRAD_CL_S, VKD3DSIH_SAMPLE_INFO, VKD3DSIH_SAMPLE_LOD,
- VKD3DSIH_SAMPLE_LOD_S, VKD3DSIH_SAMPLE_POS, VKD3DSIH_SETP, VKD3DSIH_SGE,