Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,067
    • Issues 3,067
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1,000
    • Merge requests 1,000
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Merge requests
  • !8861

iris: fix in fences backend for ext_external_objects edge case

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Eleni Maria Stea requested to merge hikiko/mesa:hikiko/review/mario-kleiner-patch-for-fences-edge-case into master Feb 04, 2021
  • Overview 18
  • Commits 1
  • Pipelines 21
  • Changes 3

This is based on a patch from Mario Kleiner and fixes the following edge case reported by him in MR!4337:

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.

Authored-by: Mario Kleiner mario.kleiner.de@gmail.com Signed-off-by: Eleni Maria Stea elene.mst@gmail.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: hikiko/review/mario-kleiner-patch-for-fences-edge-case