Commit 3c3b514d authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Fix vkQueueSubmit problem with AMD GPU

With AMD GL driver, glSignalSemaphoreEXT() doesn't flush the gl context,
and AMD DRM kernel driver checks every semaphores which are waited on
with vkQueueSubmit() call, to make sure the works to signal those
semaphores are submitted to DRM kernel driver. Otherwise the
vkQueueSubmit() will fail. So we need to call glFlush() explicitly after
calling glSignalSemaphoreEXT().

Bug: 1046462
Change-Id: I7d0967ab33953a2571376314f9aac238b86759fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2034621
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737777}
parent 63c6b9d5
......@@ -166,6 +166,12 @@ void ExternalVkImageGLRepresentationShared::EndAccess() {
api()->glSignalSemaphoreEXTFn(gl_semaphore, 0, nullptr, 1,
&texture_service_id_, &dst_layout);
api()->glDeleteSemaphoresEXTFn(1, &gl_semaphore);
// Base on the spec, the glSignalSemaphoreEXT() call just inserts signal
// semaphore command in the gl context. It may or may not flush the context
// which depends on the impelemntation. So to make it safe, we always call
// glFlush() here. If the implementation does flush in the
// glSignalSemaphoreEXT() call, the glFlush() call should be a noop.
api()->glFlushFn();
}
backing_impl()->EndAccess(readonly, std::move(semaphore_handle),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment