Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: src/gpu/vk/GrVkUtil.h

Issue 1832613003: Revise layer, extension and feature setup for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove extra def of ENABLE_VK_LAYERS Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkInterface.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrVkUtil_DEFINED 8 #ifndef GrVkUtil_DEFINED
9 #define GrVkUtil_DEFINED 9 #define GrVkUtil_DEFINED
10 10
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrTypes.h" 12 #include "GrTypes.h"
13 #include "vk/GrVkInterface.h" 13 #include "vk/GrVkInterface.h"
14 14
15 #include "vulkan/vulkan.h" 15 #include "vulkan/vulkan.h"
16 16
17 // the minimum version of Vulkan supported
18 const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 3);
19
20 // makes a Vk call on the interface 17 // makes a Vk call on the interface
21 #define GR_VK_CALL(IFACE, X) (IFACE)->fFunctions.f##X; 18 #define GR_VK_CALL(IFACE, X) (IFACE)->fFunctions.f##X;
22 // same as GR_VK_CALL but checks for success 19 // same as GR_VK_CALL but checks for success
23 #ifdef SK_DEBUG 20 #ifdef SK_DEBUG
24 #define GR_VK_CALL_ERRCHECK(IFACE, X) \ 21 #define GR_VK_CALL_ERRCHECK(IFACE, X) \
25 VkResult SK_MACRO_APPEND_LINE(ret) = GR_VK_CALL(IFACE, X); \ 22 VkResult SK_MACRO_APPEND_LINE(ret) = GR_VK_CALL(IFACE, X); \
26 SkASSERT(VK_SUCCESS == SK_MACRO_APPEND_LINE(ret)); 23 SkASSERT(VK_SUCCESS == SK_MACRO_APPEND_LINE(ret));
27 #else 24 #else
28 #define GR_VK_CALL_ERRCHECK(IFACE, X) (void) GR_VK_CALL(IFACE, X); 25 #define GR_VK_CALL_ERRCHECK(IFACE, X) (void) GR_VK_CALL(IFACE, X);
29 #endif 26 #endif
30 27
31 /** 28 /**
32 * Returns the vulkan texture format for the given GrPixelConfig 29 * Returns the vulkan texture format for the given GrPixelConfig
33 */ 30 */
34 bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format); 31 bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format);
35 32
36 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam ples); 33 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam ples);
37 34
38 #endif 35 #endif
39 36
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkInterface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698