anv: Fix invalid resource barrier signal stage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Simulator is crashing when receiving GPGPU + Pixel as resource barrier signal
stage, what according to spec is invalid.
So here replacing the pixel stage by color, over synchronizing it a bit but
keeping it functional.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14641
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40516>
This commit is contained in:
José Roberto de Souza 2026-03-19 07:30:34 -07:00 committed by Marge Bot
parent 347e82c718
commit c0f1689e11

View file

@ -1817,6 +1817,15 @@ resource_barrier_signal_stage(enum intel_engine_class engine_class,
(hw_stages & RESOURCE_BARRIER_STAGE_COLOR))
hw_stages &= ~RESOURCE_BARRIER_STAGE_GEOM;
/* GPGPU + Pixel is not a valid resource barrier stage, so lets over
* synchronize a bit.
*/
if ((hw_stages & RESOURCE_BARRIER_STAGE_GPGPU) &&
(hw_stages & RESOURCE_BARRIER_STAGE_PIXEL)) {
hw_stages &= ~RESOURCE_BARRIER_STAGE_PIXEL;
hw_stages |= RESOURCE_BARRIER_STAGE_COLOR;
}
return hw_stages;
}