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

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

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: 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/vk/GrVkCommandBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.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 GrVkGpu_DEFINED 8 #ifndef GrVkGpu_DEFINED
9 #define GrVkGpu_DEFINED 9 #define GrVkGpu_DEFINED
10 10
11 #include "GrGpu.h" 11 #include "GrGpu.h"
12 #include "GrGpuFactory.h" 12 #include "GrGpuFactory.h"
13 #include "vk/GrVkBackendContext.h" 13 #include "vk/GrVkBackendContext.h"
14 #include "GrVkCaps.h" 14 #include "GrVkCaps.h"
15 #include "GrVkIndexBuffer.h" 15 #include "GrVkIndexBuffer.h"
16 #include "GrVkProgram.h"
17 #include "GrVkResourceProvider.h" 16 #include "GrVkResourceProvider.h"
18 #include "GrVkVertexBuffer.h" 17 #include "GrVkVertexBuffer.h"
19 #include "GrVkUtil.h" 18 #include "GrVkUtil.h"
20 19
21 #include "shaderc/shaderc.h" 20 #include "shaderc/shaderc.h"
22 #include "vulkan/vulkan.h" 21 #include "vulkan/vulkan.h"
23 22
24 class GrPipeline; 23 class GrPipeline;
25 class GrNonInstancedMesh; 24 class GrNonInstancedMesh;
26 25
27 class GrVkBufferImpl; 26 class GrVkBufferImpl;
28 class GrVkCommandBuffer; 27 class GrVkCommandBuffer;
29 class GrVkPipeline; 28 class GrVkPipeline;
29 class GrVkPipelineState;
30 class GrVkRenderPass; 30 class GrVkRenderPass;
31 class GrVkTexture; 31 class GrVkTexture;
32 struct GrVkInterface; 32 struct GrVkInterface;
33 33
34 #ifdef SK_DEBUG 34 #ifdef SK_DEBUG
35 #define ENABLE_VK_LAYERS 35 #define ENABLE_VK_LAYERS
36 #endif 36 #endif
37 37
38 class GrVkGpu : public GrGpu { 38 class GrVkGpu : public GrGpu {
39 public: 39 public:
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 180
181 void onResolveRenderTarget(GrRenderTarget* target) override { 181 void onResolveRenderTarget(GrRenderTarget* target) override {
182 SkDebugf("onResolveRenderTarget not yet implemented for Vulkan\n"); 182 SkDebugf("onResolveRenderTarget not yet implemented for Vulkan\n");
183 } 183 }
184 184
185 bool prepareDrawState(const GrPipeline&, 185 bool prepareDrawState(const GrPipeline&,
186 const GrPrimitiveProcessor&, 186 const GrPrimitiveProcessor&,
187 GrPrimitiveType, 187 GrPrimitiveType,
188 const GrVkRenderPass&, 188 const GrVkRenderPass&,
189 GrVkProgram** program); 189 GrVkPipelineState** pipelineState);
190 190
191 // Bind vertex and index buffers 191 // Bind vertex and index buffers
192 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&); 192 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&);
193 193
194 // Ends and submits the current command buffer to the queue and then creates a new command 194 // Ends and submits the current command buffer to the queue and then creates a new command
195 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi ll wait for all 195 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi ll wait for all
196 // work in the queue to finish before returning. 196 // work in the queue to finish before returning.
197 void submitCommandBuffer(SyncQueue sync); 197 void submitCommandBuffer(SyncQueue sync);
198 198
199 void copySurfaceAsCopyImage(GrSurface* dst, 199 void copySurfaceAsCopyImage(GrSurface* dst,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once 236 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once
237 // since there is significant overhead to the first compile of any compiler. 237 // since there is significant overhead to the first compile of any compiler.
238 shaderc_compiler_t fCompiler; 238 shaderc_compiler_t fCompiler;
239 239
240 240
241 typedef GrGpu INHERITED; 241 typedef GrGpu INHERITED;
242 }; 242 };
243 243
244 #endif 244 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkCommandBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698