mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-shader: Decrement OpAtomicIDecrement result.
This commit is contained in:
parent
94a33020d3
commit
2171ba6d32
@ -5016,6 +5016,12 @@ static void vkd3d_dxbc_compiler_emit_uav_counter_instruction(struct vkd3d_dxbc_c
|
||||
operands[2] = vkd3d_dxbc_compiler_get_constant_uint(compiler, SpvMemorySemanticsMaskNone);
|
||||
result_id = vkd3d_spirv_build_op_trv(builder, &builder->function_stream,
|
||||
op, type_id, operands, ARRAY_SIZE(operands));
|
||||
if (op == SpvOpAtomicIDecrement)
|
||||
{
|
||||
/* SpvOpAtomicIDecrement returns the original value. */
|
||||
result_id = vkd3d_spirv_build_op_isub(builder, type_id, result_id,
|
||||
vkd3d_dxbc_compiler_get_constant_uint(compiler, 1));
|
||||
}
|
||||
vkd3d_dxbc_compiler_emit_store_dst(compiler, dst, result_id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user