mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Use vsir_register_init() in spirv_compiler_emit_default_control_point_phase().
This commit is contained in:
parent
81802e27d0
commit
6f5cb219f4
Notes:
Alexandre Julliard
2023-09-26 22:47:43 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/319
@ -6403,20 +6403,13 @@ static void spirv_compiler_emit_default_control_point_phase(struct spirv_compile
|
||||
invocation_id = spirv_compiler_emit_load_invocation_id(compiler);
|
||||
|
||||
memset(&invocation, 0, sizeof(invocation));
|
||||
invocation.reg.type = VKD3DSPR_OUTPOINTID;
|
||||
invocation.reg.data_type = VKD3D_DATA_INT;
|
||||
invocation.reg.idx[0].offset = ~0u;
|
||||
invocation.reg.idx[1].offset = ~0u;
|
||||
invocation.reg.idx[2].offset = ~0u;
|
||||
invocation.reg.idx_count = 0;
|
||||
vsir_register_init(&invocation.reg, VKD3DSPR_OUTPOINTID, VKD3D_DATA_INT, 0);
|
||||
invocation.swizzle = VKD3D_SHADER_NO_SWIZZLE;
|
||||
|
||||
memset(&input_reg, 0, sizeof(input_reg));
|
||||
input_reg.type = VKD3DSPR_INPUT;
|
||||
input_reg.data_type = VKD3D_DATA_FLOAT;
|
||||
vsir_register_init(&input_reg, VKD3DSPR_INPUT, VKD3D_DATA_FLOAT, 2);
|
||||
input_reg.idx[0].offset = 0;
|
||||
input_reg.idx[0].rel_addr = &invocation;
|
||||
input_reg.idx[2].offset = ~0u;
|
||||
input_reg.idx_count = 2;
|
||||
input_reg.idx[1].offset = 0;
|
||||
input_id = spirv_compiler_get_register_id(compiler, &input_reg);
|
||||
|
||||
assert(input_signature->element_count == output_signature->element_count);
|
||||
|
Loading…
Reference in New Issue
Block a user