Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
- string = hlsl_type_to_string(ctx, $3); - if (string) - hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, - "Texture data type %s is not scalar or vector.", string->buffer); - hlsl_release_string_buffer(ctx, string); - } + /* TODO: unspecified sample count is not allowed for all targets */ $$ = hlsl_new_texture_type(ctx, $1, $3); } + | texture_ms_type '<' type ',' shift_expr '>' + { + unsigned int sample_count = evaluate_static_expression(node_from_list($5)); + destroy_instr_list($5); + + if (($$ = hlsl_new_texture_type(ctx, $1, $3))) + $$->sample_count = sample_count; This works, but I'd rather make the sample count an extra argument to hlsl_new_texture_type().
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/115#note_26230