intel/tools: Pass integers, not enums, to stride()
authorMatt Turner <mattst88@gmail.com>
Wed, 8 Jul 2020 20:55:21 +0000 (13:55 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 31 Jul 2020 19:59:24 +0000 (12:59 -0700)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956>

src/intel/tools/i965_gram.y

index 03ebc7e3e6da750ddf2ec9ebef8bf0983280279d..44a25018c56d8443f3e8c658ccd77a0a9147ad85 100644 (file)
@@ -1938,14 +1938,14 @@ indirectregion:
 region:
        %empty
        {
-               $$ = stride($$, BRW_VERTICAL_STRIDE_1, BRW_WIDTH_2, BRW_HORIZONTAL_STRIDE_1);
+               $$ = stride($$, 0, 1, 0);
        }
        | LANGLE exp RANGLE
        {
                if ($2 != 0 && ($2 > 32 || !isPowerofTwo($2)))
                        error(&@2, "Invalid VertStride %d\n", $2);
 
-               $$ = stride($$, $2, BRW_WIDTH_1, 0);
+               $$ = stride($$, $2, 1, 0);
        }
        | LANGLE exp COMMA exp COMMA exp RANGLE
        {
@@ -1999,7 +1999,8 @@ region_wh:
                        error(&@4, "Invalid Horizontal stride in"
                                   " region_wh %d\n", $4);
 
-               $$ = stride($$, BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL, $2, $4);
+               $$ = stride($$, 0, $2, $4);
+               $$.vstride = BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL;
        }
        ;