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

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

Issue 1834903003: Add WSI functions to GrVkInterface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add Android and Xlib Created 4 years, 8 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
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 GrVkCaps_DEFINED 8 #ifndef GrVkCaps_DEFINED
9 #define GrVkCaps_DEFINED 9 #define GrVkCaps_DEFINED
10 10
11 #include "GrCaps.h" 11 #include "GrCaps.h"
12 #include "GrVkStencilAttachment.h" 12 #include "GrVkStencilAttachment.h"
13 #include "vulkan/vulkan.h" 13 #include "vk/GrVkDefines.h"
14 14
15 struct GrVkInterface; 15 struct GrVkInterface;
16 class GrGLSLCaps; 16 class GrGLSLCaps;
17 17
18 /** 18 /**
19 * Stores some capabilities of a Vk backend. 19 * Stores some capabilities of a Vk backend.
20 */ 20 */
21 class GrVkCaps : public GrCaps { 21 class GrVkCaps : public GrCaps {
22 public: 22 public:
23 typedef GrVkStencilAttachment::Format StencilFormat; 23 typedef GrVkStencilAttachment::Format StencilFormat;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); } 68 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); }
69 69
70 private: 70 private:
71 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface, 71 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface,
72 VkPhysicalDevice device, uint32_t featureFlags); 72 VkPhysicalDevice device, uint32_t featureFlags);
73 void initGrCaps(const VkPhysicalDeviceProperties&, 73 void initGrCaps(const VkPhysicalDeviceProperties&,
74 const VkPhysicalDeviceMemoryProperties&, 74 const VkPhysicalDeviceMemoryProperties&,
75 uint32_t featureFlags); 75 uint32_t featureFlags);
76 void initGLSLCaps(const VkPhysicalDeviceProperties&, uint32_t featureFlags); 76 void initGLSLCaps(const VkPhysicalDeviceProperties&, uint32_t featureFlags);
77 void initSampleCount(const VkPhysicalDeviceProperties& properties); 77 void initSampleCount(const VkPhysicalDeviceProperties& properties);
78 void initConfigRenderableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev); 78 void initConfigRenderableTable(const GrVkInterface* iface, VkPhysicalDevice physDev);
79 void initConfigTexturableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev); 79 void initConfigTexturableTable(const GrVkInterface* iface, VkPhysicalDevice physDev);
80 void initStencilFormats(const GrVkInterface* interface, VkPhysicalDevice phy sDev); 80 void initStencilFormats(const GrVkInterface* iface, VkPhysicalDevice physDev );
81 81
82 82
83 bool fConfigTextureSupport[kGrPixelConfigCnt]; 83 bool fConfigTextureSupport[kGrPixelConfigCnt];
84 // For Vulkan we track whether a config is supported linearly (without need for swizzling) 84 // For Vulkan we track whether a config is supported linearly (without need for swizzling)
85 bool fConfigLinearTextureSupport[kGrPixelConfigCnt]; 85 bool fConfigLinearTextureSupport[kGrPixelConfigCnt];
86 86
87 // The first entry for each config is without msaa and the second is with. 87 // The first entry for each config is without msaa and the second is with.
88 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 88 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
89 // The first entry for each config is without msaa and the second is with. 89 // The first entry for each config is without msaa and the second is with.
90 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2]; 90 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2];
91 91
92 SkTArray<StencilFormat, true> fLinearStencilFormats; 92 SkTArray<StencilFormat, true> fLinearStencilFormats;
93 SkTArray<StencilFormat, true> fStencilFormats; 93 SkTArray<StencilFormat, true> fStencilFormats;
94 94
95 typedef GrCaps INHERITED; 95 typedef GrCaps INHERITED;
96 }; 96 };
97 97
98 #endif 98 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698