vkd3d-shader/fx: Support string annotations for fx_4+.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-08-13 23:59:41 +02:00 committed by Henri Verbeet
parent d4ae844bb6
commit 60ce81112b
Notes: Henri Verbeet 2024-08-14 22:15:51 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/995
2 changed files with 5 additions and 1 deletions

View File

@ -1360,6 +1360,10 @@ static void write_fx_4_annotation(struct hlsl_ir_var *var, struct fx_write_conte
offset = write_fx_4_default_value(var->data_type, var->default_values, fx);
put_u32(buffer, offset);
}
else if (type->class == HLSL_CLASS_STRING)
{
write_fx_4_string_initializer(var, fx);
}
else
{
hlsl_fixme(ctx, &var->loc, "Writing annotations for type class %u is not implemented.", type->class);

View File

@ -110,7 +110,7 @@ float4 main() : sv_target { return 0; }
shader model >= 5.0
shader model < 6.0
[effect todo]
[effect]
float4 f
<
string a = "\nAAA\tBBB\rCCC\fDDD\vEEE\sFFF";