[PATCH vkd3d 1/5] vkd3d-shader/hlsl: Use hlsl_alloc() in hlsl_new_texture_type().

Matteo Bruni mbruni at codeweavers.com
Fri Jan 21 15:22:25 CST 2022


Spotted by Giovanni Mascellani.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 libs/vkd3d-shader/hlsl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 8ae31306..a2879740 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -265,7 +265,7 @@ struct hlsl_type *hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_
 {
     struct hlsl_type *type;
 
-    if (!(type = vkd3d_calloc(1, sizeof(*type))))
+    if (!(type = hlsl_alloc(ctx, sizeof(*type))))
         return NULL;
     type->type = HLSL_CLASS_OBJECT;
     type->base_type = HLSL_TYPE_TEXTURE;
-- 
2.34.1




More information about the wine-devel mailing list