Re: [PATCH v2 0/7] MR739: vkd3d-shader/hlsl: Parse state blocks, part 1.
22 Mar
2024
22 Mar
'24
9:12 p.m.
Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
state_block: %empty - | state_block state + { + if (!($$ = hlsl_alloc(ctx, sizeof(*$$)))) + YYABORT; + } + | state_block any_identifier '[' C_INTEGER ']' '=' complex_initializer ';'
You could probably avoid the duplication with a separate "%empty | [int]" rule. Or alternatively use "arrays" and add an explicit check for count > 1. Is C_INTEGER correct here, or should we allow compile-time constants? -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65846
639
Age (days ago)
639
Last active (days ago)
0 comments
1 participants
participants (1)
-
Zebediah Figura (@zfigura)