mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Don't pass the semantic index in add_semantic_var().
This commit is contained in:
committed by
Henri Verbeet
parent
28f74a73aa
commit
f08fed5ffb
Notes:
Henri Verbeet
2025-07-21 12:34:54 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1595
@@ -288,10 +288,10 @@ static bool types_are_semantic_equivalent(struct hlsl_ctx *ctx, const struct hls
|
|||||||
|
|
||||||
static struct hlsl_ir_var *add_semantic_var(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func,
|
static struct hlsl_ir_var *add_semantic_var(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *func,
|
||||||
struct hlsl_ir_var *var, struct hlsl_type *type, uint32_t modifiers, struct hlsl_semantic *semantic,
|
struct hlsl_ir_var *var, struct hlsl_type *type, uint32_t modifiers, struct hlsl_semantic *semantic,
|
||||||
uint32_t index, uint32_t stream_index, bool output, bool force_align, bool create,
|
uint32_t stream_index, bool output, bool force_align, bool create, const struct vkd3d_shader_location *loc)
|
||||||
const struct vkd3d_shader_location *loc)
|
|
||||||
{
|
{
|
||||||
struct hlsl_semantic new_semantic;
|
struct hlsl_semantic new_semantic;
|
||||||
|
uint32_t index = semantic->index;
|
||||||
struct hlsl_ir_var *ext_var;
|
struct hlsl_ir_var *ext_var;
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
char *new_name;
|
char *new_name;
|
||||||
@@ -441,8 +441,8 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_dec
|
|||||||
return;
|
return;
|
||||||
prim_type_src->modifiers = var->data_type->modifiers & HLSL_PRIMITIVE_MODIFIERS_MASK;
|
prim_type_src->modifiers = var->data_type->modifiers & HLSL_PRIMITIVE_MODIFIERS_MASK;
|
||||||
|
|
||||||
if (!(input = add_semantic_var(ctx, func, var, prim_type_src, modifiers,
|
if (!(input = add_semantic_var(ctx, func, var, prim_type_src,
|
||||||
semantic, semantic->index, 0, false, force_align, true, loc)))
|
modifiers, semantic, 0, false, force_align, true, loc)))
|
||||||
return;
|
return;
|
||||||
++semantic->index;
|
++semantic->index;
|
||||||
hlsl_init_simple_deref_from_var(&prim_deref, input);
|
hlsl_init_simple_deref_from_var(&prim_deref, input);
|
||||||
@@ -456,7 +456,7 @@ static void prepend_input_copy(struct hlsl_ctx *ctx, struct hlsl_ir_function_dec
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(input = add_semantic_var(ctx, func, var, vector_type_src,
|
if (!(input = add_semantic_var(ctx, func, var, vector_type_src,
|
||||||
modifiers, semantic, semantic->index, 0, false, force_align, true, loc)))
|
modifiers, semantic, 0, false, force_align, true, loc)))
|
||||||
return;
|
return;
|
||||||
++semantic->index;
|
++semantic->index;
|
||||||
|
|
||||||
@@ -608,8 +608,8 @@ static void append_output_copy(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
|||||||
struct hlsl_ir_var *output;
|
struct hlsl_ir_var *output;
|
||||||
struct hlsl_ir_node *load;
|
struct hlsl_ir_node *load;
|
||||||
|
|
||||||
if (!(output = add_semantic_var(ctx, func, var, vector_type,
|
if (!(output = add_semantic_var(ctx, func, var, vector_type, modifiers,
|
||||||
modifiers, semantic, semantic->index, stream_index, true, force_align, create, loc)))
|
semantic, stream_index, true, force_align, create, loc)))
|
||||||
return;
|
return;
|
||||||
++semantic->index;
|
++semantic->index;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user