mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Avoid multiple PrimitiveId declarations in hull shaders.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dc074af2a0
commit
3172faf612
@ -4047,6 +4047,7 @@ static void vkd3d_dxbc_compiler_emit_input_register(struct vkd3d_dxbc_compiler *
|
||||
const struct vkd3d_shader_register *reg = &dst->reg;
|
||||
const struct vkd3d_spirv_builtin *builtin;
|
||||
struct vkd3d_symbol reg_symbol;
|
||||
struct rb_entry *entry;
|
||||
uint32_t input_id;
|
||||
|
||||
assert(!reg->idx[0].rel_addr);
|
||||
@ -4059,9 +4060,13 @@ static void vkd3d_dxbc_compiler_emit_input_register(struct vkd3d_dxbc_compiler *
|
||||
return;
|
||||
}
|
||||
|
||||
/* vPrim may be declared in multiple hull shader phases. */
|
||||
vkd3d_symbol_make_register(®_symbol, reg);
|
||||
if ((entry = rb_get(&compiler->symbol_table, ®_symbol)))
|
||||
return;
|
||||
|
||||
input_id = vkd3d_dxbc_compiler_emit_builtin_variable(compiler, builtin, SpvStorageClassInput, 0);
|
||||
|
||||
vkd3d_symbol_make_register(®_symbol, reg);
|
||||
vkd3d_symbol_set_register_info(®_symbol, input_id, SpvStorageClassInput,
|
||||
builtin->component_type, vkd3d_write_mask_from_component_count(builtin->component_count));
|
||||
reg_symbol.info.reg.is_aggregate = builtin->spirv_array_size;
|
||||
|
Loading…
Reference in New Issue
Block a user