2025-08-15 08:07:30 +10:00
|
|
|
From 31ab77ada15b692f5b37d8ddf15f65c375860def Mon Sep 17 00:00:00 2001
|
2025-08-01 07:19:16 +10:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Thu, 31 Jul 2025 09:06:17 +1000
|
|
|
|
Subject: [PATCH] Updated vkd3d to 75cb4336ec1a0455c347db05b22dc0fd76dd8b5f.
|
|
|
|
|
|
|
|
---
|
|
|
|
libs/vkd3d/libs/vkd3d-shader/ir.c | 11 +++++++++--
|
|
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
|
|
|
index 1098e4d3950..4c324fef7cf 100644
|
|
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
|
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
|
|
|
@@ -444,7 +444,14 @@ bool vsir_program_init(struct vsir_program *program, const struct vkd3d_shader_c
|
|
|
|
program->shader_version = *version;
|
|
|
|
program->cf_type = cf_type;
|
|
|
|
program->normalisation_level = normalisation_level;
|
|
|
|
- return shader_instruction_array_init(&program->instructions, reserve);
|
|
|
|
+ if (!shader_instruction_array_init(&program->instructions, reserve))
|
|
|
|
+ {
|
|
|
|
+ if (program->free_parameters)
|
|
|
|
+ vkd3d_free((void *)program->parameters);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void vsir_program_cleanup(struct vsir_program *program)
|
|
|
|
@@ -8744,6 +8751,7 @@ static void temp_allocator_set_dst(struct temp_allocator *allocator,
|
|
|
|
enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
|
|
|
struct vkd3d_shader_message_context *message_context)
|
|
|
|
{
|
|
|
|
+ const unsigned int prev_temp_count = program->temp_count;
|
|
|
|
struct temp_allocator allocator = {0};
|
|
|
|
struct temp_allocator_reg *regs;
|
|
|
|
struct liveness_tracker tracker;
|
|
|
|
@@ -8766,7 +8774,6 @@ enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
|
|
|
for (unsigned int i = 0; i < program->ssa_count; ++i)
|
|
|
|
{
|
|
|
|
const struct liveness_tracker_reg *liveness_reg = &tracker.ssa_regs[i];
|
|
|
|
- const unsigned int prev_temp_count = program->temp_count;
|
|
|
|
struct temp_allocator_reg *reg = &allocator.ssa_regs[i];
|
|
|
|
|
|
|
|
if (temp_allocator_allocate(&allocator, &tracker, reg, liveness_reg, prev_temp_count))
|
|
|
|
--
|
2025-08-15 08:07:30 +10:00
|
|
|
2.50.1
|
2025-08-01 07:19:16 +10:00
|
|
|
|