RDNA 2 : _operand_float_flags diverge entre l'interpréteur et le HLSL (SDWA/DPP des conversions à mode et de v_frexp_exp) #205

Closed
opened 2026-11-25 13:49:34 +00:00 by LooperSalty · 1 comment
LooperSalty commented 2026-11-25 13:49:34 +00:00 (Migrated from github.com)
Contributor

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-25T13:49:34Z.


Constat

Depuis #133 (4d46b68), _operand_float_flags n'est plus la même dans PrototypeScarlett/emu/rdna2_exec_ext.py:20 (interpréteur) et PrototypeScarlett/emu/rdna2_hlsl_ext.py:16 (HLSL). Seul l'interpréteur a été mis à jour.

Instruction Interpréteur (src, dst f32) HLSL (src, dst f32)
v_cvt_flr_i32_f32, v_cvt_rpi_i32_f32 (True, False) (False, False) : lit parts[3] = i32 et parts[2] = flr
v_cvt_off_f32_i4 (False, True) (False, False)
v_frexp_exp_i32_f32 (True, False) (True, True)

En SDWA/DPP, neg/abs et l'extension de signe sont donc appliqués différemment des deux côtés, ce qui contredit la règle 4 d'AGENTS.md (HLSL identique à l'interpréteur). Lu statiquement, pas encore reproduit par un test.

Fait quand

  • Une seule fonction partagée (par exemple dans un module commun importé par rdna2_exec_ext.py et rdna2_hlsl_ext.py).
  • Un test de parité interpréteur / HLSL en SDWA avec neg ou abs sur ces 4 instructions, qui échoue avant le correctif (GPU ou WARP).

Trouvé par un audit du dépôt le 2026-11-25.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6605990311 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/issues/205). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-25T13:49:34Z. --- ## Constat Depuis #133 (`4d46b68`), `_operand_float_flags` n'est plus la même dans `PrototypeScarlett/emu/rdna2_exec_ext.py:20` (interpréteur) et `PrototypeScarlett/emu/rdna2_hlsl_ext.py:16` (HLSL). Seul l'interpréteur a été mis à jour. | Instruction | Interpréteur (src, dst f32) | HLSL (src, dst f32) | | --- | --- | --- | | `v_cvt_flr_i32_f32`, `v_cvt_rpi_i32_f32` | (True, False) | (False, False) : lit `parts[3]` = `i32` et `parts[2]` = `flr` | | `v_cvt_off_f32_i4` | (False, True) | (False, False) | | `v_frexp_exp_i32_f32` | (True, False) | (True, True) | En SDWA/DPP, neg/abs et l'extension de signe sont donc appliqués différemment des deux côtés, ce qui contredit la règle 4 d'AGENTS.md (HLSL identique à l'interpréteur). Lu statiquement, pas encore reproduit par un test. ## Fait quand - [ ] Une seule fonction partagée (par exemple dans un module commun importé par `rdna2_exec_ext.py` et `rdna2_hlsl_ext.py`). - [ ] Un test de parité interpréteur / HLSL en SDWA avec neg ou abs sur ces 4 instructions, qui échoue avant le correctif (GPU ou WARP). Trouvé par un audit du dépôt le 2026-11-25.
LooperSalty commented 2026-11-25 18:10:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-25T18:10:45Z.


Fixed by #215.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7170548946 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/issues/205#issuecomment-7170548946). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-25T18:10:45Z. --- Fixed by #215.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LooperSalty/AnyXboxX#205
No description provided.