mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Consistently use HLSL allocation functions.
This commit is contained in:
parent
b9c164c1c4
commit
a9f33e8657
Notes:
Alexandre Julliard
2023-11-06 23:18:46 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/426
@ -759,7 +759,7 @@ struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim
|
||||
{
|
||||
struct hlsl_type *type;
|
||||
|
||||
if (!(type = vkd3d_calloc(1, sizeof(*type))))
|
||||
if (!(type = hlsl_alloc(ctx, sizeof(*type))))
|
||||
return NULL;
|
||||
type->class = HLSL_CLASS_OBJECT;
|
||||
type->base_type = HLSL_TYPE_UAV;
|
||||
@ -1617,7 +1617,7 @@ static bool clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block,
|
||||
|
||||
if (!list_empty(&src->uses))
|
||||
{
|
||||
if (!vkd3d_array_reserve((void **)&map->instrs, &map->capacity, map->count + 1, sizeof(*map->instrs)))
|
||||
if (!hlsl_array_reserve(ctx, (void **)&map->instrs, &map->capacity, map->count + 1, sizeof(*map->instrs)))
|
||||
{
|
||||
hlsl_block_cleanup(dst_block);
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user