OLD | NEW |
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 Loading... |
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 |
OLD | NEW |