mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/tpf: Do not emit HLSL_IR_CONSTANT instructions.
Since constants are now inlined.
This commit is contained in:
committed by
Alexandre Julliard
parent
a471c5567a
commit
7c360330d7
Notes:
Alexandre Julliard
2023-05-29 22:32:48 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/215
@@ -3004,6 +3004,10 @@ static void allocate_temp_registers_recurse(struct hlsl_ctx *ctx,
|
||||
|
||||
LIST_FOR_EACH_ENTRY(instr, &block->instrs, struct hlsl_ir_node, entry)
|
||||
{
|
||||
/* In SM4 all constants are inlined. */
|
||||
if (ctx->profile->major_version >= 4 && instr->type == HLSL_IR_CONSTANT)
|
||||
continue;
|
||||
|
||||
if (!instr->reg.allocated && instr->last_read)
|
||||
{
|
||||
instr->reg = allocate_numeric_registers_for_type(ctx, allocator, instr->index, instr->last_read,
|
||||
|
Reference in New Issue
Block a user