aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-07-02 20:16:44 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-11 18:20:28 +0000
commit37329b33326ef50e4279404df10037dccf5d9cba (patch)
tree5c8e7f9b740c5907bd057f4e0eb58a8278437872 /src/gpu
parentff19c8f5e7156a016b16180552e12119c823e6a9 (diff)
Reland "Reland "Move Vulkan DebugCallback code into tools.""
This reverts commit 3148f802af419297c466e6bf5efc003b6c498f0a. Reason for revert: hopefully fuchsia is fixed Original change's description: > Revert "Reland "Move Vulkan DebugCallback code into tools."" > > This reverts commit be0ab883e796b190cd20a4b1cfaedea932f9e0bf. > > Reason for revert: fuchsia change reverted > > Original change's description: > > Reland "Move Vulkan DebugCallback code into tools." > > > > This reverts commit 05d3fe3f100b794abe3f99a770734057960d7da5. > > > > Reason for revert: relanding after fuchsia fixes are in > > > > Original change's description: > > > Revert "Move Vulkan DebugCallback code into tools." > > > > > > This reverts commit d4b2adeaa929edd1664754ac6621ec524992ef03. > > > > > > Reason for revert: Need to revert earlier changes cause of fucshia > > > > > > Original change's description: > > > > Move Vulkan DebugCallback code into tools. > > > > > > > > Bug: skia: > > > > Change-Id: Ib356200e86e54f9ff0ba16396874e6fd10cf0465 > > > > Reviewed-on: https://skia-review.googlesource.com/137424 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com > > > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > > > Bug: skia: > > > Change-Id: I38d4e71dc29c6503f92712be54e22c58956498c5 > > > Reviewed-on: https://skia-review.googlesource.com/137902 > > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > Bug: skia: > > Change-Id: Idb88f21018b9c0e23b62f0a5b12f0fab60373921 > > Reviewed-on: https://skia-review.googlesource.com/138300 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com > > Change-Id: I40d5ba1067248066403f843c0739b885a2bfc834 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/138421 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I5d24bb2df3bd9ecf6bb3870886114ef98478dc7a Reviewed-on: https://skia-review.googlesource.com/139001 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/vk/GrVkGpu.cpp54
-rw-r--r--src/gpu/vk/GrVkGpu.h5
2 files changed, 0 insertions, 59 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 771be2e208..e576480129 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -49,30 +49,6 @@
#define VK_CALL_RET(RET, X) GR_VK_CALL_RET(this->vkInterface(), RET, X)
#define VK_CALL_ERRCHECK(X) GR_VK_CALL_ERRCHECK(this->vkInterface(), X)
-#ifdef SK_ENABLE_VK_LAYERS
-VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(
- VkDebugReportFlagsEXT flags,
- VkDebugReportObjectTypeEXT objectType,
- uint64_t object,
- size_t location,
- int32_t messageCode,
- const char* pLayerPrefix,
- const char* pMessage,
- void* pUserData) {
- if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
- SkDebugf("Vulkan error [%s]: code: %d: %s\n", pLayerPrefix, messageCode, pMessage);
- return VK_TRUE; // skip further layers
- } else if (flags & VK_DEBUG_REPORT_WARNING_BIT_EXT) {
- SkDebugf("Vulkan warning [%s]: code: %d: %s\n", pLayerPrefix, messageCode, pMessage);
- } else if (flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) {
- SkDebugf("Vulkan perf warning [%s]: code: %d: %s\n", pLayerPrefix, messageCode, pMessage);
- } else {
- SkDebugf("Vulkan info/debug [%s]: code: %d: %s\n", pLayerPrefix, messageCode, pMessage);
- }
- return VK_FALSE;
-}
-#endif
-
sk_sp<GrGpu> GrVkGpu::Make(const GrVkBackendContext& backendContext,
const GrContextOptions& options, GrContext* context) {
if (backendContext.fInstance == VK_NULL_HANDLE ||
@@ -102,27 +78,6 @@ GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options,
, fResourceProvider(this)
, fDisconnected(false) {
SkASSERT(!backendContext.fOwnsInstanceAndDevice);
-#ifdef SK_ENABLE_VK_LAYERS
- fCallback = VK_NULL_HANDLE;
- if (backendContext.fExtensions & kEXT_debug_report_GrVkExtensionFlag) {
- // Setup callback creation information
- VkDebugReportCallbackCreateInfoEXT callbackCreateInfo;
- callbackCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT;
- callbackCreateInfo.pNext = nullptr;
- callbackCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT |
- VK_DEBUG_REPORT_WARNING_BIT_EXT |
- //VK_DEBUG_REPORT_INFORMATION_BIT_EXT |
- //VK_DEBUG_REPORT_DEBUG_BIT_EXT |
- VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
- callbackCreateInfo.pfnCallback = &DebugReportCallback;
- callbackCreateInfo.pUserData = nullptr;
-
- // Register the callback
- GR_VK_CALL_ERRCHECK(this->vkInterface(),
- CreateDebugReportCallbackEXT(backendContext.fInstance,
- &callbackCreateInfo, nullptr, &fCallback));
- }
-#endif
if (!fMemoryAllocator) {
// We were not given a memory allocator at creation
@@ -204,12 +159,6 @@ void GrVkGpu::destroyResources() {
VK_CALL(DestroyCommandPool(fDevice, fCmdPool, nullptr));
}
-#ifdef SK_ENABLE_VK_LAYERS
- if (fCallback) {
- VK_CALL(DestroyDebugReportCallbackEXT(fInstance, fCallback, nullptr));
- }
-#endif
-
fMemoryAllocator.reset();
fQueue = VK_NULL_HANDLE;
@@ -245,9 +194,6 @@ void GrVkGpu::disconnect(DisconnectType type) {
}
fSemaphoresToWaitOn.reset();
fSemaphoresToSignal.reset();
-#ifdef SK_ENABLE_VK_LAYERS
- fCallback = VK_NULL_HANDLE;
-#endif
fCurrentCmdBuffer = nullptr;
fCmdPool = VK_NULL_HANDLE;
fDisconnected = true;
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h
index f506d28b0e..266c916cad 100644
--- a/src/gpu/vk/GrVkGpu.h
+++ b/src/gpu/vk/GrVkGpu.h
@@ -244,11 +244,6 @@ private:
GrVkCopyManager fCopyManager;
-#ifdef SK_ENABLE_VK_LAYERS
- // For reporting validation layer errors
- VkDebugReportCallbackEXT fCallback;
-#endif
-
// compiler used for compiling sksl into spirv. We only want to create the compiler once since
// there is significant overhead to the first compile of any compiler.
SkSL::Compiler* fCompiler;