iris: track reset signalling instead of replacing the context
authorRohan Garg <rohan.garg@intel.com>
Thu, 27 Jul 2023 10:07:54 +0000 (12:07 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Jul 2023 13:43:38 +0000 (13:43 +0000)
commit2756534660ea3d900817832d450b8e3c3887c618
treecaec8c53f1ca756b8fcd63e2ab3bdc3154fdb7ea
parente52f7d5cb9c24fa3cc67fa9b9c8140a35a33d369
iris: track reset signalling instead of replacing the context

Instead of creating a new context when a reset is encountered, we now
track whether the reset was reported back to the application. According
to the spec, the application should poll the reset status and recreate
the context when NO_ERROR encountered after a RESET.

From the EXT_robustness spec:

5. How should the application react to a reset context event?

RESOLVED: For this extension, the application is expected to query
the reset status until NO_ERROR is returned. If a reset is encountered,
at least one *RESET* status will be returned. Once NO_ERROR is again
encountered, the application can safely destroy the old context and
create a new one.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24224>
src/gallium/drivers/iris/iris_batch.c
src/gallium/drivers/iris/iris_context.c
src/gallium/drivers/iris/iris_context.h