mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
intel/compiler: Set NoMask on cr0 access for float controls mode
This is trying to clear a bit in the control register. However, it's executing with whatever channel mask happens to be active. Typically this is the one at the start of the program, so at least some channels will be active. Typically the first channel will be active due to packed dispatch, but that's not always guaranteed. Without NoMask, the float controls writes may randomly not happen. Recent GPUs also seem to have a hang issue when the first instruction in the shader doesn't have any active channels. Having an instruction with NoMask at the start of the program works around the issue. See HSD bug 14017989577. In our case, the float controls preamble was breaking that restriction every time, causing us to run into this problem frequently. Thanks to Tapani Pälli for finding this hang issue, and Francisco Jerez and Lionel Landwerlin for helping pinpoint this issue during review of a workaround patch in !20194. Fixes GPU hangs in Elder Scrolls Online, Witcher 3, and likely more. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7639 Fixes:9da56ffc52("i965/fs: add emit_shader_float_controls_execution_mode() and aux functions") Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20214> (cherry picked from commitbafbe7c23a)
This commit is contained in:
parent
75e55ca05a
commit
d936394cf4
2 changed files with 3 additions and 2 deletions
|
|
@ -2776,7 +2776,7 @@
|
|||
"description": "intel/compiler: Set NoMask on cr0 access for float controls mode",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "9da56ffc5228ff4578d4a078e456a0bf8588e71c"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -269,7 +269,8 @@ fs_visitor::emit_shader_float_controls_execution_mode()
|
|||
if (execution_mode == FLOAT_CONTROLS_DEFAULT_FLOAT_CONTROL_MODE)
|
||||
return;
|
||||
|
||||
fs_builder abld = bld.annotate("shader floats control execution mode");
|
||||
fs_builder ubld = bld.exec_all().group(1, 0);
|
||||
fs_builder abld = ubld.annotate("shader floats control execution mode");
|
||||
unsigned mask, mode = brw_rnd_mode_from_nir(execution_mode, &mask);
|
||||
|
||||
if (mask == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue