intel/tools: Don't allow empty type specifier
authorMatt Turner <mattst88@gmail.com>
Wed, 8 Jul 2020 20:15:19 +0000 (13:15 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 31 Jul 2020 19:59:24 +0000 (12:59 -0700)
It's preferable to require an explicit type.

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 a5f2d780efab76db197658a9016aeddf2571f7c3..a010e93bc68a073e01c86507e56f7d1affc4362e 100644 (file)
@@ -2013,8 +2013,7 @@ region_wh:
        ;
 
 srctype:
-       %empty          { $$ = retype($$, BRW_REGISTER_TYPE_F); }
-       | TYPE_F        { $$ = retype($$, BRW_REGISTER_TYPE_F); }
+         TYPE_F        { $$ = retype($$, BRW_REGISTER_TYPE_F); }
        | TYPE_UD       { $$ = retype($$, BRW_REGISTER_TYPE_UD); }
        | TYPE_D        { $$ = retype($$, BRW_REGISTER_TYPE_D); }
        | TYPE_UW       { $$ = retype($$, BRW_REGISTER_TYPE_UW); }