mesa/src
Eleni Maria Stea adc575dbf6 iris: fix in fences backend for ext_external_objects edge case
EXT_external_objects require we call glSignalSemaphoreEXT followed by a
glFlush. If the rendering workload is small when Signal and Flush
take place the relevant batch buffers with the actual rendering might
have been submitted already. In that case the following condition is met:
(iris_batch_bytes_used(batch) == 0). This causes:
glFlush() --> iris_fence_flush() -> iris_batch_flush() ->
_iris_batch_flush() to no-op, and so the fence doesn't get submitted to the
kernel. Then when anv tries to submit an execuf2 that must wait on the
shared VkSempahore / drm_syncobj fence, there isn't one and the kernel
rejects the batchbuffer causing an -EINVAL return of the execbuf2 ioctl
and a VK_DEVICE_LOST error. Empty batch buffers do have typically one
fence attached, but the ones carrying the extra fence from a
glSignalSempahore() call do have at least 2.

See also: the discussion in MR!4337.

v2: Changed the batch struct to have a contains_fence_signal variable
that is set to true when i915_EXEC_FENCE_SIGNAL fence is added to the
batch and off when batch is reset (Tapani Pälli)

Authored-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8861>
2021-03-02 05:47:06 +00:00
..
amd radv: remove useless decompression of the DS resolve attachment 2021-03-01 18:10:35 +00:00
android_stub egl/android: implement image cleanup callback 2020-12-15 06:05:27 +00:00
broadcom v3dv: fix branching to large secondaries with more than one BCL buffer. 2021-03-01 15:16:45 +01:00
compiler util/disk_cache: move cache tests to the util directory 2021-03-02 02:39:05 +00:00
drm-shim drm-shim: report support for timeline semaphores 2021-02-09 21:08:52 +00:00
egl egl: android: use num_planes param in createImageFromDmaBufs() 2021-02-25 16:15:24 +00:00
etnaviv etnaviv, v3d: Fix valgrind include paths. 2020-12-15 19:39:29 +00:00
freedreno turnip/ir3: check for bindless IBOs in atomic dests fixup 2021-02-26 21:13:04 +00:00
gallium iris: fix in fences backend for ext_external_objects edge case 2021-03-02 05:47:06 +00:00
gbm egl: implement EGL_EXT_protected_surface support 2020-11-02 10:15:47 +01:00
getopt
glx Adjust dylib compatibility versions to match what was set by mesa-18.3's autotools-based builds 2021-02-22 21:27:19 +00:00
gtest
hgl hgl: Major refactor and cleanup 2021-01-09 20:51:35 -06:00
imgui
intel anv: group as many command buffers into a single execbuf 2021-02-27 17:14:25 +02:00
loader loader: Silence a warning at -Og 2021-02-18 20:59:43 +00:00
mapi glapi: keep declspec(thread) msvc-specific 2021-02-24 13:47:30 +00:00
mesa mesa/st: even better no-oping for clears 2021-03-01 22:42:30 +00:00
microsoft nir: add has_txs flag 2021-02-23 14:04:30 +00:00
nouveau nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
panfrost pan/mdg: prevent csel_v from being scheduled alongside writeout 2021-03-01 17:24:06 +00:00
util util/disk_cache: move cache tests to the util directory 2021-03-02 02:39:05 +00:00
virtio virgl: update headers 2021-02-16 16:09:14 +00:00
vulkan vulkan: Update dispatch table gen for Windows 2021-02-26 04:29:52 +10:00
meson.build nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
SConscript