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

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

Issue 1782583002: Add support for vertex and geometry shader textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: better rebase 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/glsl/GrGLSLShaderBuilder.h ('k') | src/gpu/vk/GrVkCaps.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 GrVkCaps_DEFINED 8 #ifndef GrVkCaps_DEFINED
9 #define GrVkCaps_DEFINED 9 #define GrVkCaps_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 /** 60 /**
61 * Gets an array of legal stencil formats. These formats are not guaranteed to be supported by 61 * Gets an array of legal stencil formats. These formats are not guaranteed to be supported by
62 * the driver but are legal VK_TEXTURE_FORMATs. 62 * the driver but are legal VK_TEXTURE_FORMATs.
63 */ 63 */
64 const SkTArray<StencilFormat, true>& linearStencilFormats() const { 64 const SkTArray<StencilFormat, true>& linearStencilFormats() const {
65 return fLinearStencilFormats; 65 return fLinearStencilFormats;
66 } 66 }
67 67
68 /**
69 * Returns the max number of sampled textures we can use in a program. This number is the max of
70 * max samplers and max sampled images. This number is technically the max s ampled textures we
71 * can have per stage, but we'll use it for the whole program since for now we only do texture
72 * lookups in the fragment shader.
73 */
74 int maxSampledTextures() const {
75 return fMaxSampledTextures;
76 }
77
78
79 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); } 68 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); }
80 69
81 private: 70 private:
82 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface, 71 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface,
83 VkPhysicalDevice device); 72 VkPhysicalDevice device);
84 void initGrCaps(const VkPhysicalDeviceProperties&, 73 void initGrCaps(const VkPhysicalDeviceProperties&,
85 const VkPhysicalDeviceFeatures&, 74 const VkPhysicalDeviceFeatures&,
86 const VkPhysicalDeviceMemoryProperties&); 75 const VkPhysicalDeviceMemoryProperties&);
87 void initGLSLCaps(const VkPhysicalDeviceFeatures& features); 76 void initGLSLCaps(const VkPhysicalDeviceFeatures&, const VkPhysicalDevicePro perties&);
88 void initSampleCount(const VkPhysicalDeviceProperties& properties); 77 void initSampleCount(const VkPhysicalDeviceProperties& properties);
89 void initConfigRenderableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev); 78 void initConfigRenderableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev);
90 void initConfigTexturableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev); 79 void initConfigTexturableTable(const GrVkInterface* interface, VkPhysicalDev ice physDev);
91 void initStencilFormats(const GrVkInterface* interface, VkPhysicalDevice phy sDev); 80 void initStencilFormats(const GrVkInterface* interface, VkPhysicalDevice phy sDev);
92 81
93 82
94 bool fConfigTextureSupport[kGrPixelConfigCnt]; 83 bool fConfigTextureSupport[kGrPixelConfigCnt];
95 // 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)
96 bool fConfigLinearTextureSupport[kGrPixelConfigCnt]; 85 bool fConfigLinearTextureSupport[kGrPixelConfigCnt];
97 86
98 // 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.
99 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 88 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
100 // 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.
101 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2]; 90 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2];
102 91
103 SkTArray<StencilFormat, true> fLinearStencilFormats; 92 SkTArray<StencilFormat, true> fLinearStencilFormats;
104 SkTArray<StencilFormat, true> fStencilFormats; 93 SkTArray<StencilFormat, true> fStencilFormats;
105 94
106 int fMaxSampledTextures;
107
108 typedef GrCaps INHERITED; 95 typedef GrCaps INHERITED;
109 }; 96 };
110 97
111 #endif 98 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.h ('k') | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698