mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 12:20:15 +01:00
This hardware bug is the result of a control flow optimization present in Gfx8-9 meant to prevent the ELSE instruction from disabling all channels and update the control flow stack only to have them re-enabled at the ENDIF instruction executed immediately after it. Instead, on Gfx8-9 an ELSE instruction that would normally have ended up with all channels disabled would pop off the last element of the stack and jump directly to JIP+1 instead of to the ENDIF at JIP, skipping over the ENDIF instruction. In simple cases this would work okay (though it's actual performance benefit is questionable), but in cases where a branch instruction within the IF block (e.g. BREAK or CONTINUE) caused all active channels to jump outside the IF conditional, the optimization would break the JIP chain of "join" instructions by skipping the ENDIF, causing the block of instructions immediately after the ENDIF to execute with all channels disabled until execution reaches the reconvergence point. This issue was observed on SKL in the dEQP-VK.reconvergence.subgroup_uniform_control_flow_elect.compute.nesting4.0.38 test in combination with some Vulkan binding model changes Lionel is working on. In such cases the execution with all channels disabled was leading to corruption of an indirect message descriptor, causing a hang. Unfortunately the hardware bug doesn't provide a recommended workaround. In order to fix the problem we point the JIP of an ELSE instruction to the instruction immediately before the ENDIF -- However that's not expected to work due to the restriction that JIP and UIP must be equal if and only if BranchCtrl is disabled -- So this patch also enables BranchCtrl, which is intended to support join instructions within the "ELSE" block, which in turn disables the optimization described above, which in turn causes us to execute the instruction immediately *before* the ENDIF with all channels disabled -- So in order to avoid further fallout from executing code with all channels disabled we need to insert a NOP before ENDIF instructions that have a matching ELSE instruction. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20921> |
||
|---|---|---|
| .. | ||
| blorp | ||
| ci | ||
| common | ||
| compiler | ||
| dev | ||
| ds | ||
| genxml | ||
| isl | ||
| nullhw-layer | ||
| perf | ||
| tools | ||
| vulkan | ||
| vulkan_hasvk | ||
| meson.build | ||