mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Store original semantic name.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
47d077e5ce
commit
1124ea46ee
Notes:
Henri Verbeet
2024-06-11 17:09:32 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/902
@@ -3352,9 +3352,25 @@ void hlsl_free_attribute(struct hlsl_attribute *attr)
|
||||
void hlsl_cleanup_semantic(struct hlsl_semantic *semantic)
|
||||
{
|
||||
vkd3d_free((void *)semantic->name);
|
||||
vkd3d_free((void *)semantic->raw_name);
|
||||
memset(semantic, 0, sizeof(*semantic));
|
||||
}
|
||||
|
||||
bool hlsl_clone_semantic(struct hlsl_ctx *ctx, struct hlsl_semantic *dst, const struct hlsl_semantic *src)
|
||||
{
|
||||
*dst = *src;
|
||||
dst->name = dst->raw_name = NULL;
|
||||
if (src->name && !(dst->name = hlsl_strdup(ctx, src->name)))
|
||||
return false;
|
||||
if (src->raw_name && !(dst->raw_name = hlsl_strdup(ctx, src->raw_name)))
|
||||
{
|
||||
hlsl_cleanup_semantic(dst);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void free_function_decl(struct hlsl_ir_function_decl *decl)
|
||||
{
|
||||
unsigned int i;
|
||||
|
Reference in New Issue
Block a user