Guillaume Charifi : wined3d: Recognize SM5 dcl_resource_raw instruction.

Alexandre Julliard julliard at winehq.org
Tue Jan 31 15:42:52 CST 2017


Module: wine
Branch: master
Commit: 107c6f078264779ca0354003c2c43df27df0e266
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=107c6f078264779ca0354003c2c43df27df0e266

Author: Guillaume Charifi <guillaume.charifi at sfr.fr>
Date:   Sun Jan 29 13:37:23 2017 +0100

wined3d: Recognize SM5 dcl_resource_raw instruction.

Signed-off-by: Guillaume Charifi <guillaume.charifi at sfr.fr>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/arb_program_shader.c |  1 +
 dlls/wined3d/glsl_shader.c        |  1 +
 dlls/wined3d/shader.c             |  6 ++++++
 dlls/wined3d/shader_sm4.c         | 10 ++++++++++
 dlls/wined3d/wined3d_private.h    |  1 +
 5 files changed, 19 insertions(+)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 3dbf584..d433f8c 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5066,6 +5066,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT   */ NULL,
     /* WINED3DSIH_DCL_OUTPUT_SIV                   */ NULL,
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY              */ shader_hw_nop,
+    /* WINED3DSIH_DCL_RESOURCE_RAW                 */ NULL,
     /* WINED3DSIH_DCL_RESOURCE_STRUCTURED          */ NULL,
     /* WINED3DSIH_DCL_SAMPLER                      */ NULL,
     /* WINED3DSIH_DCL_STREAM                       */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index cdd440d..f0c19fc 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8926,6 +8926,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT   */ NULL,
     /* WINED3DSIH_DCL_OUTPUT_SIV                   */ shader_glsl_nop,
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY              */ shader_glsl_nop,
+    /* WINED3DSIH_DCL_RESOURCE_RAW                 */ NULL,
     /* WINED3DSIH_DCL_RESOURCE_STRUCTURED          */ NULL,
     /* WINED3DSIH_DCL_SAMPLER                      */ shader_glsl_nop,
     /* WINED3DSIH_DCL_STREAM                       */ NULL,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index d3dbca3..0368ae1 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -91,6 +91,7 @@ static const char * const shader_opcode_names[] =
     /* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT   */ "dcl_output_control_point_count",
     /* WINED3DSIH_DCL_OUTPUT_SIV                   */ "dcl_output_siv",
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY              */ "dcl_outputTopology",
+    /* WINED3DSIH_DCL_RESOURCE_RAW                 */ "dcl_resource_raw",
     /* WINED3DSIH_DCL_RESOURCE_STRUCTURED          */ "dcl_resource_structured",
     /* WINED3DSIH_DCL_SAMPLER                      */ "dcl_sampler",
     /* WINED3DSIH_DCL_STREAM                       */ "dcl_stream",
@@ -2442,6 +2443,11 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
                     shader_opcode_names[ins.handler_idx], ins.declaration.fp.index,
                     ins.declaration.fp.array_size, ins.declaration.fp.body_count);
         }
+        else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_RAW)
+        {
+            shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
+            shader_dump_dst_param(&buffer, &ins.declaration.dst, &shader_version);
+        }
         else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_STRUCTURED)
         {
             shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index bcb55af..9bd9b62 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -258,6 +258,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM5_OP_DCL_UAV_STRUCTURED               = 0x9e,
     WINED3D_SM5_OP_DCL_TGSM_RAW                     = 0x9f,
     WINED3D_SM5_OP_DCL_TGSM_STRUCTURED              = 0xa0,
+    WINED3D_SM5_OP_DCL_RESOURCE_RAW                 = 0xa1,
     WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED          = 0xa2,
     WINED3D_SM5_OP_LD_UAV_TYPED                     = 0xa3,
     WINED3D_SM5_OP_STORE_UAV_TYPED                  = 0xa4,
@@ -774,6 +775,13 @@ static void shader_sm5_read_dcl_resource_structured(struct wined3d_shader_instru
     ins->declaration.structured_resource.byte_stride = *tokens;
 }
 
+static void shader_sm5_read_dcl_resource_raw(struct wined3d_shader_instruction *ins,
+        DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
+        struct wined3d_sm4_data *priv)
+{
+    shader_sm4_read_dst_param(priv, &tokens, WINED3D_DATA_RESOURCE, &ins->declaration.dst);
+}
+
 static void shader_sm5_read_sync(struct wined3d_shader_instruction *ins,
         DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
         struct wined3d_sm4_data *priv)
@@ -971,6 +979,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
             shader_sm5_read_dcl_tgsm_raw},
     {WINED3D_SM5_OP_DCL_TGSM_STRUCTURED,              WINED3DSIH_DCL_TGSM_STRUCTURED,              "",     "",
             shader_sm5_read_dcl_tgsm_structured},
+    {WINED3D_SM5_OP_DCL_RESOURCE_RAW,                 WINED3DSIH_DCL_RESOURCE_RAW,                 "",     "",
+            shader_sm5_read_dcl_resource_raw},
     {WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED,          WINED3DSIH_DCL_RESOURCE_STRUCTURED,          "",     "",
             shader_sm5_read_dcl_resource_structured},
     {WINED3D_SM5_OP_LD_UAV_TYPED,                     WINED3DSIH_LD_UAV_TYPED,                     "u",    "iU"},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 436cade..d7f9081 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -621,6 +621,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT,
     WINED3DSIH_DCL_OUTPUT_SIV,
     WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
+    WINED3DSIH_DCL_RESOURCE_RAW,
     WINED3DSIH_DCL_RESOURCE_STRUCTURED,
     WINED3DSIH_DCL_SAMPLER,
     WINED3DSIH_DCL_STREAM,




More information about the wine-cvs mailing list