Zebediah Figura : d3dcompiler: Do not store matrix and vector indexes as deref instructions.

Alexandre Julliard julliard at winehq.org
Tue May 19 16:07:49 CDT 2020


Module: wine
Branch: master
Commit: d46065d1f36d5f9feab653d3844099ae02f7d8f1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d46065d1f36d5f9feab653d3844099ae02f7d8f1

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon May  4 15:03:44 2020 -0500

d3dcompiler: Do not store matrix and vector indexes as deref instructions.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/hlsl.y | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 5875705cf1..cc868757a2 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -619,13 +619,10 @@ static struct hlsl_ir_deref *new_array_deref(struct hlsl_ir_node *array,
     {
         data_type = expr_type->e.array.type;
     }
-    else if (expr_type->type == HLSL_CLASS_MATRIX)
+    else if (expr_type->type == HLSL_CLASS_MATRIX || expr_type->type == HLSL_CLASS_VECTOR)
     {
-        data_type = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, expr_type->base_type, expr_type->dimx, 1);
-    }
-    else if (expr_type->type == HLSL_CLASS_VECTOR)
-    {
-        data_type = new_hlsl_type(NULL, HLSL_CLASS_SCALAR, expr_type->base_type, 1, 1);
+        FIXME("Index of matrix or vector type.\n");
+        return NULL;
     }
     else
     {
@@ -2337,9 +2334,6 @@ postfix_expr:             primary_expr
                             }
                         | postfix_expr '[' expr ']'
                             {
-                                /* This may be an array dereference or a vector/matrix
-                                 * subcomponent access.
-                                 * We store it as an array dereference in any case. */
                                 struct hlsl_ir_deref *deref;
 
                                 if (node_from_list($3)->data_type->type != HLSL_CLASS_SCALAR)




More information about the wine-cvs mailing list