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

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

Issue 2355493002: Move vulkan spir-v compile call to GrVkUtil (Closed)
Patch Set: Created 4 years, 3 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/GrVkPipelineStateBuilder.cpp ('k') | src/gpu/vk/GrVkUtil.cpp » ('j') | 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/GrVkDefines.h"
13 #include "vk/GrVkInterface.h" 14 #include "vk/GrVkInterface.h"
14 15
15 #include "vk/GrVkDefines.h" 16 class GrVkGpu;
16 17
17 // makes a Vk call on the interface 18 // makes a Vk call on the interface
18 #define GR_VK_CALL(IFACE, X) (IFACE)->fFunctions.f##X; 19 #define GR_VK_CALL(IFACE, X) (IFACE)->fFunctions.f##X;
19 // same as GR_VK_CALL but checks for success 20 // same as GR_VK_CALL but checks for success
20 #ifdef SK_DEBUG 21 #ifdef SK_DEBUG
21 #define GR_VK_CALL_ERRCHECK(IFACE, X) \ 22 #define GR_VK_CALL_ERRCHECK(IFACE, X) \
22 VkResult SK_MACRO_APPEND_LINE(ret) = GR_VK_CALL(IFACE, X); \ 23 VkResult SK_MACRO_APPEND_LINE(ret) = GR_VK_CALL(IFACE, X); \
23 SkASSERT(VK_SUCCESS == SK_MACRO_APPEND_LINE(ret)); 24 SkASSERT(VK_SUCCESS == SK_MACRO_APPEND_LINE(ret));
24 #else 25 #else
25 #define GR_VK_CALL_ERRCHECK(IFACE, X) (void) GR_VK_CALL(IFACE, X); 26 #define GR_VK_CALL_ERRCHECK(IFACE, X) (void) GR_VK_CALL(IFACE, X);
(...skipping 10 matching lines...) Expand all
36 bool GrVkFormatToPixelConfig(VkFormat format, GrPixelConfig* config); 37 bool GrVkFormatToPixelConfig(VkFormat format, GrPixelConfig* config);
37 38
38 /** 39 /**
39 * Returns true if the given vulkan texture format is sRGB encoded. 40 * Returns true if the given vulkan texture format is sRGB encoded.
40 * Also provides the non-sRGB version, if there is one. 41 * Also provides the non-sRGB version, if there is one.
41 */ 42 */
42 bool GrVkFormatIsSRGB(VkFormat format, VkFormat* linearFormat); 43 bool GrVkFormatIsSRGB(VkFormat format, VkFormat* linearFormat);
43 44
44 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam ples); 45 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam ples);
45 46
47 bool GrCompileVkShaderModule(const GrVkGpu* gpu,
48 const char* shaderString,
49 VkShaderStageFlagBits stage,
50 VkShaderModule* shaderModule,
51 VkPipelineShaderStageCreateInfo* stageInfo);
52
46 #endif 53 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateBuilder.cpp ('k') | src/gpu/vk/GrVkUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698