mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Respect VKD3D_SHADER_CONDITIONAL_OP_Z when discard has a bool argument.
This commit is contained in:
parent
9e59e57cb3
commit
c2ce15b623
Notes:
Henri Verbeet
2024-07-11 17:16:48 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/870
@ -8152,6 +8152,8 @@ static void spirv_compiler_emit_discard(struct spirv_compiler *compiler,
|
|||||||
if (src->reg.data_type != VKD3D_DATA_BOOL)
|
if (src->reg.data_type != VKD3D_DATA_BOOL)
|
||||||
condition_id = spirv_compiler_emit_int_to_bool(compiler,
|
condition_id = spirv_compiler_emit_int_to_bool(compiler,
|
||||||
instruction->flags, src->reg.data_type, 1, condition_id);
|
instruction->flags, src->reg.data_type, 1, condition_id);
|
||||||
|
else if (instruction->flags & VKD3D_SHADER_CONDITIONAL_OP_Z)
|
||||||
|
condition_id = vkd3d_spirv_build_op_logical_not(builder, vkd3d_spirv_get_op_type_bool(builder), condition_id);
|
||||||
void_id = vkd3d_spirv_get_op_type_void(builder);
|
void_id = vkd3d_spirv_get_op_type_void(builder);
|
||||||
vkd3d_spirv_build_op_function_call(builder, void_id, spirv_compiler_get_discard_function_id(compiler),
|
vkd3d_spirv_build_op_function_call(builder, void_id, spirv_compiler_get_discard_function_id(compiler),
|
||||||
&condition_id, 1);
|
&condition_id, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user