wine-staging/patches/vkd3d-latest/0005-Updated-vkd3d-to-5eba031fa1c7f606ffacf3cb7310615728d.patch
2024-02-10 18:55:27 +11:00

114 lines
4.3 KiB
Diff

From ed09b9ae4c28d9a6b6d3a47cfe2de6bf6791db8f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 10 Feb 2024 18:23:30 +1100
Subject: [PATCH 5/5] Updated vkd3d to
5eba031fa1c7f606ffacf3cb7310615728d150f0.
---
libs/vkd3d/libs/vkd3d-shader/hlsl.y | 18 ++++++++++++++++--
libs/vkd3d/libs/vkd3d/device.c | 4 ++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl.y b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
index 8dc353e11c0..5f6334a4d19 100644
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
@@ -5572,11 +5572,11 @@ attribute:
$$->name = $2;
hlsl_block_init(&$$->instrs);
hlsl_block_add_block(&$$->instrs, $4.instrs);
- vkd3d_free($4.instrs);
$$->loc = @$;
$$->args_count = $4.args_count;
for (i = 0; i < $4.args_count; ++i)
hlsl_src_from_node(&$$->args[i], $4.args[i]);
+ free_parse_initializer(&$4);
}
attribute_list:
@@ -5807,7 +5807,11 @@ func_prototype:
}
else
{
- free($1.attrs);
+ unsigned int i;
+
+ for (i = 0; i < $1.count; ++i)
+ hlsl_free_attribute((void *)$1.attrs[i]);
+ vkd3d_free($1.attrs);
}
$$ = $2;
}
@@ -6992,8 +6996,10 @@ primary_expr:
if (!(var = hlsl_get_var(ctx->cur_scope, $1)))
{
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Variable \"%s\" is not defined.", $1);
+ vkd3d_free($1);
YYABORT;
}
+ vkd3d_free($1);
if (!(load = hlsl_new_var_load(ctx, var, &@1)))
YYABORT;
if (!($$ = make_block(ctx, &load->node)))
@@ -7067,12 +7073,17 @@ postfix_expr:
if (!(field = get_struct_field(type->e.record.fields, type->e.record.field_count, $3)))
{
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Field \"%s\" is not defined.", $3);
+ vkd3d_free($3);
YYABORT;
}
field_idx = field - type->e.record.fields;
if (!add_record_access(ctx, $1, node, field_idx, &@2))
+ {
+ vkd3d_free($3);
YYABORT;
+ }
+ vkd3d_free($3);
$$ = $1;
}
else if (hlsl_is_numeric_type(node->data_type))
@@ -7082,14 +7093,17 @@ postfix_expr:
if (!(swizzle = get_swizzle(ctx, node, $3, &@3)))
{
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid swizzle \"%s\".", $3);
+ vkd3d_free($3);
YYABORT;
}
hlsl_block_add_instr($1, swizzle);
+ vkd3d_free($3);
$$ = $1;
}
else
{
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid subscript \"%s\".", $3);
+ vkd3d_free($3);
YYABORT;
}
}
diff --git a/libs/vkd3d/libs/vkd3d/device.c b/libs/vkd3d/libs/vkd3d/device.c
index 90272818b3d..1e094690f42 100644
--- a/libs/vkd3d/libs/vkd3d/device.c
+++ b/libs/vkd3d/libs/vkd3d/device.c
@@ -3888,7 +3888,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateSharedHandle(ID3D12Device7 *
struct d3d12_device *device = impl_from_ID3D12Device7(iface);
FIXME("iface %p, object %p, attributes %p, access %#x, name %s, handle %p stub!\n",
- iface, object, attributes, access, debugstr_w(name, device->wchar_size), handle);
+ iface, object, attributes, (uint32_t)access, debugstr_w(name, device->wchar_size), handle);
return E_NOTIMPL;
}
@@ -3908,7 +3908,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Devic
struct d3d12_device *device = impl_from_ID3D12Device7(iface);
FIXME("iface %p, name %s, access %#x, handle %p stub!\n",
- iface, debugstr_w(name, device->wchar_size), access, handle);
+ iface, debugstr_w(name, device->wchar_size), (uint32_t)access, handle);
return E_NOTIMPL;
}
--
2.43.0