skia2/include/gpu/GrBackendSemaphore.h

97 lines
2.5 KiB
C
Raw Normal View History

Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrBackendSemaphore_DEFINED
#define GrBackendSemaphore_DEFINED
#include "include/gpu/GrTypes.h"
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
#include "include/gpu/gl/GrGLTypes.h"
#include "include/gpu/mtl/GrMtlTypes.h"
#include "include/gpu/vk/GrVkTypes.h"
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
/**
* Wrapper class for passing into and receiving data from Ganesh about a backend semaphore object.
*/
class GrBackendSemaphore {
public:
// For convenience we just set the backend here to OpenGL. The GrBackendSemaphore cannot be used
// until either initGL or initVulkan are called which will set the appropriate GrBackend.
GrBackendSemaphore() : fBackend(GrBackendApi::kOpenGL), fGLSync(0), fIsInitialized(false) {}
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
void initGL(GrGLsync sync) {
fBackend = GrBackendApi::kOpenGL;
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
fGLSync = sync;
fIsInitialized = true;
}
void initVulkan(VkSemaphore semaphore) {
fBackend = GrBackendApi::kVulkan;
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
fVkSemaphore = semaphore;
Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" This reverts commit a55e214bbe3942a098d97906a0f008d59dd1fafb. Reason for revert:google3 should be fixed now Original change's description: > Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" > > This reverts commit 55aea84baa53f2d7e7e876b09fd590f046ff9ab9. > > Reason for revert: Google3 roll failing like > > third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found > #include "../../../third_party/vulkan/SkiaVulkan.h" > > > Original change's description: > > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > This reverts commit 684b506f3589ecc78eebe8d92082be31a5fbe348. > > > > Reason for revert: Chrome change has landed to fix broken chrome roll. > > > > Original change's description: > > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > > > This reverts commit 6e2d607334cc57c22e3a52179743763828ea84b2. > > > > > > Reason for revert: chrome roll > > > > > > Original change's description: > > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN. > > > > > > > > This should allow a client to build a skia library that doesn't use vulkan but still > > > > has all the public headers defined so that they don't have to build two versions of > > > > their code. > > > > > > > > Bug: chromium:862144 > > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2 > > > > Reviewed-on: https://skia-review.googlesource.com/158661 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org > > > > > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: chromium:862144 > > > Reviewed-on: https://skia-review.googlesource.com/c/159000 > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > Commit-Queue: Mike Klein <mtklein@google.com> > > > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > > > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:862144 > > Reviewed-on: https://skia-review.googlesource.com/c/159145 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862144 > Reviewed-on: https://skia-review.googlesource.com/c/159155 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862144 Reviewed-on: https://skia-review.googlesource.com/159260 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:49 +00:00
#ifdef SK_VULKAN
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
fIsInitialized = true;
Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" This reverts commit a55e214bbe3942a098d97906a0f008d59dd1fafb. Reason for revert:google3 should be fixed now Original change's description: > Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" > > This reverts commit 55aea84baa53f2d7e7e876b09fd590f046ff9ab9. > > Reason for revert: Google3 roll failing like > > third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found > #include "../../../third_party/vulkan/SkiaVulkan.h" > > > Original change's description: > > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > This reverts commit 684b506f3589ecc78eebe8d92082be31a5fbe348. > > > > Reason for revert: Chrome change has landed to fix broken chrome roll. > > > > Original change's description: > > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > > > This reverts commit 6e2d607334cc57c22e3a52179743763828ea84b2. > > > > > > Reason for revert: chrome roll > > > > > > Original change's description: > > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN. > > > > > > > > This should allow a client to build a skia library that doesn't use vulkan but still > > > > has all the public headers defined so that they don't have to build two versions of > > > > their code. > > > > > > > > Bug: chromium:862144 > > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2 > > > > Reviewed-on: https://skia-review.googlesource.com/158661 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org > > > > > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: chromium:862144 > > > Reviewed-on: https://skia-review.googlesource.com/c/159000 > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > Commit-Queue: Mike Klein <mtklein@google.com> > > > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > > > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:862144 > > Reviewed-on: https://skia-review.googlesource.com/c/159145 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862144 > Reviewed-on: https://skia-review.googlesource.com/c/159155 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862144 Reviewed-on: https://skia-review.googlesource.com/159260 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:49 +00:00
#else
fIsInitialized = false;
Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" This reverts commit 55aea84baa53f2d7e7e876b09fd590f046ff9ab9. Reason for revert: Google3 roll failing like third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found #include "../../../third_party/vulkan/SkiaVulkan.h" Original change's description: > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > This reverts commit 684b506f3589ecc78eebe8d92082be31a5fbe348. > > Reason for revert: Chrome change has landed to fix broken chrome roll. > > Original change's description: > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > This reverts commit 6e2d607334cc57c22e3a52179743763828ea84b2. > > > > Reason for revert: chrome roll > > > > Original change's description: > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN. > > > > > > This should allow a client to build a skia library that doesn't use vulkan but still > > > has all the public headers defined so that they don't have to build two versions of > > > their code. > > > > > > Bug: chromium:862144 > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2 > > > Reviewed-on: https://skia-review.googlesource.com/158661 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org > > > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:862144 > > Reviewed-on: https://skia-review.googlesource.com/c/159000 > > Reviewed-by: Mike Klein <mtklein@google.com> > > Commit-Queue: Mike Klein <mtklein@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862144 > Reviewed-on: https://skia-review.googlesource.com/c/159145 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862144 Reviewed-on: https://skia-review.googlesource.com/c/159155 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-03 16:34:11 +00:00
#endif
Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" This reverts commit a55e214bbe3942a098d97906a0f008d59dd1fafb. Reason for revert:google3 should be fixed now Original change's description: > Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."" > > This reverts commit 55aea84baa53f2d7e7e876b09fd590f046ff9ab9. > > Reason for revert: Google3 roll failing like > > third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found > #include "../../../third_party/vulkan/SkiaVulkan.h" > > > Original change's description: > > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > This reverts commit 684b506f3589ecc78eebe8d92082be31a5fbe348. > > > > Reason for revert: Chrome change has landed to fix broken chrome roll. > > > > Original change's description: > > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN." > > > > > > This reverts commit 6e2d607334cc57c22e3a52179743763828ea84b2. > > > > > > Reason for revert: chrome roll > > > > > > Original change's description: > > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN. > > > > > > > > This should allow a client to build a skia library that doesn't use vulkan but still > > > > has all the public headers defined so that they don't have to build two versions of > > > > their code. > > > > > > > > Bug: chromium:862144 > > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2 > > > > Reviewed-on: https://skia-review.googlesource.com/158661 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org > > > > > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: chromium:862144 > > > Reviewed-on: https://skia-review.googlesource.com/c/159000 > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > Commit-Queue: Mike Klein <mtklein@google.com> > > > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > > > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:862144 > > Reviewed-on: https://skia-review.googlesource.com/c/159145 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org > > Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862144 > Reviewed-on: https://skia-review.googlesource.com/c/159155 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862144 Reviewed-on: https://skia-review.googlesource.com/159260 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:49 +00:00
}
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
// It is the creator's responsibility to ref the MTLEvent passed in here, via __bridge_retained.
// The other end will wrap this BackendSemaphore and take the ref, via __bridge_transfer.
void initMetal(GrMTLHandle event, uint64_t value) {
fBackend = GrBackendApi::kMetal;
fMtlEvent = event;
fMtlValue = value;
#ifdef SK_METAL
fIsInitialized = true;
#else
fIsInitialized = false;
#endif
}
bool isInitialized() const { return fIsInitialized; }
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
GrGLsync glSync() const {
if (!fIsInitialized || GrBackendApi::kOpenGL != fBackend) {
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
return 0;
}
return fGLSync;
}
VkSemaphore vkSemaphore() const {
if (!fIsInitialized || GrBackendApi::kVulkan != fBackend) {
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
return VK_NULL_HANDLE;
}
return fVkSemaphore;
}
GrMTLHandle mtlSemaphore() const {
if (!fIsInitialized || GrBackendApi::kMetal != fBackend) {
return nullptr;
}
return fMtlEvent;
}
uint64_t mtlValue() const {
if (!fIsInitialized || GrBackendApi::kMetal != fBackend) {
return 0;
}
return fMtlValue;
}
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
private:
GrBackendApi fBackend;
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
union {
GrGLsync fGLSync;
VkSemaphore fVkSemaphore;
GrMTLHandle fMtlEvent; // Expected to be an id<MTLEvent>
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
};
uint64_t fMtlValue;
Revert "Revert "Add API for flushing surfaces with gpu semaphores"" This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 13:45:32 +00:00
bool fIsInitialized;
};
#endif