Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
unsigned int ret = 0; bool progress;
- LIST_FOR_EACH_ENTRY(node, &block->instrs, struct hlsl_ir_node, entry)
- {
switch (node->type)
{
case HLSL_IR_CONSTANT:
case HLSL_IR_EXPR:
case HLSL_IR_SWIZZLE:
case HLSL_IR_LOAD:
continue;
default:
hlsl_error(ctx, &node->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX,
"Expected literal expression.");
Can you please spell out the other cases instead of using DEFAULT?
Not least because some brief tests suggest INDEX should also be allowed. (Interestingly, though, ternary expressions are not.)