mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/spirv: Do not handle division by zero for VSIR_OP_IDIV or VSIR_OP_IREM.
These correspond to the DXIL SDiv and SRem instructions, for which division by zero is undefined. Division by zero is also undefined for DXIL UDiv and URem; addressing those is slightly more involved.
This commit is contained in:
Notes:
Henri Verbeet
2025-10-13 19:32:21 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1775
@@ -7676,8 +7676,6 @@ static enum vkd3d_result spirv_compiler_emit_alu_instruction(struct spirv_compil
|
|||||||
* so we have an explicit check. */
|
* so we have an explicit check. */
|
||||||
switch (instruction->opcode)
|
switch (instruction->opcode)
|
||||||
{
|
{
|
||||||
case VSIR_OP_IDIV:
|
|
||||||
case VSIR_OP_IREM:
|
|
||||||
case VSIR_OP_UDIV_SIMPLE:
|
case VSIR_OP_UDIV_SIMPLE:
|
||||||
case VSIR_OP_UREM:
|
case VSIR_OP_UREM:
|
||||||
check_zero = true;
|
check_zero = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user