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

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

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gyp 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
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 8
9 #ifndef GrVkProgram_DEFINED 9 #ifndef GrVkProgram_DEFINED
10 #define GrVkProgram_DEFINED 10 #define GrVkProgram_DEFINED
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // However, they will only be freed by the descriptor pool. Thus by simply k eeping the 153 // However, they will only be freed by the descriptor pool. Thus by simply k eeping the
154 // descriptor pool alive through the draw, the descritor sets will also stay alive. Thus we do 154 // descriptor pool alive through the draw, the descritor sets will also stay alive. Thus we do
155 // not need a GrVkResource versions of VkDescriptorSet. We hold on to these in the program since 155 // not need a GrVkResource versions of VkDescriptorSet. We hold on to these in the program since
156 // we update the descriptor sets and bind them at separate times; 156 // we update the descriptor sets and bind them at separate times;
157 VkDescriptorSet fDescriptorSets[2]; 157 VkDescriptorSet fDescriptorSets[2];
158 158
159 // Meta data so we know which descriptor sets we are using and need to bind. 159 // Meta data so we know which descriptor sets we are using and need to bind.
160 int fStartDS; 160 int fStartDS;
161 int fDSCount; 161 int fDSCount;
162 162
163 SkAutoTDelete<GrVkUniformBuffer> fVertexUniformBuffer; 163 SkAutoTUnref<GrVkUniformBuffer> fVertexUniformBuffer;
164 SkAutoTDelete<GrVkUniformBuffer> fFragmentUniformBuffer; 164 SkAutoTUnref<GrVkUniformBuffer> fFragmentUniformBuffer;
165 165
166 // GrVkResources used for sampling textures 166 // GrVkResources used for sampling textures
167 SkTDArray<GrVkSampler*> fSamplers; 167 SkTDArray<GrVkSampler*> fSamplers;
168 SkTDArray<const GrVkImageView*> fTextureViews; 168 SkTDArray<const GrVkImageView*> fTextureViews;
169 SkTDArray<const GrVkImage::Resource*> fTextures; 169 SkTDArray<const GrVkImage::Resource*> fTextures;
170 170
171 // Tracks the current render target uniforms stored in the vertex buffer. 171 // Tracks the current render target uniforms stored in the vertex buffer.
172 RenderTargetState fRenderTargetState; 172 RenderTargetState fRenderTargetState;
173 BuiltinUniformHandles fBuiltinUniformHandles; 173 BuiltinUniformHandles fBuiltinUniformHandles;
174 174
175 // Processors in the program 175 // Processors in the program
176 SkAutoTDelete<GrGLSLPrimitiveProcessor> fGeometryProcessor; 176 SkAutoTDelete<GrGLSLPrimitiveProcessor> fGeometryProcessor;
177 SkAutoTDelete<GrGLSLXferProcessor> fXferProcessor; 177 SkAutoTDelete<GrGLSLXferProcessor> fXferProcessor;
178 GrGLSLFragProcs fFragmentProcessors; 178 GrGLSLFragProcs fFragmentProcessors;
179 179
180 GrVkProgramDataManager fProgramDataManager; 180 GrVkProgramDataManager fProgramDataManager;
181 181
182 DescriptorPoolManager fSamplerPoolManager; 182 DescriptorPoolManager fSamplerPoolManager;
183 DescriptorPoolManager fUniformPoolManager; 183 DescriptorPoolManager fUniformPoolManager;
184 184
185 #ifdef SK_DEBUG 185 #ifdef SK_DEBUG
186 int fNumSamplers; 186 int fNumSamplers;
187 #endif 187 #endif
188 188
189 friend class GrVkProgramBuilder; 189 friend class GrVkProgramBuilder;
190 }; 190 };
191 191
192 #endif 192 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698