| 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 #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 "GrVkCaps.h" | 13 #include "GrVkCaps.h" |
| 14 #include "GrVkIndexBuffer.h" | 14 #include "GrVkIndexBuffer.h" |
| 15 #include "GrVkProgram.h" | |
| 16 #include "GrVkResourceProvider.h" | 15 #include "GrVkResourceProvider.h" |
| 17 #include "GrVkVertexBuffer.h" | 16 #include "GrVkVertexBuffer.h" |
| 18 #include "GrVkUtil.h" | 17 #include "GrVkUtil.h" |
| 19 | 18 |
| 20 #include "shaderc/shaderc.h" | 19 #include "shaderc/shaderc.h" |
| 21 #include "vulkan/vulkan.h" | 20 #include "vulkan/vulkan.h" |
| 22 | 21 |
| 23 class GrPipeline; | 22 class GrPipeline; |
| 24 class GrNonInstancedMesh; | 23 class GrNonInstancedMesh; |
| 25 | 24 |
| 26 class GrVkBufferImpl; | 25 class GrVkBufferImpl; |
| 27 class GrVkCommandBuffer; | 26 class GrVkCommandBuffer; |
| 28 class GrVkPipeline; | 27 class GrVkPipeline; |
| 28 class GrVkPipelineState; |
| 29 class GrVkRenderPass; | 29 class GrVkRenderPass; |
| 30 class GrVkTexture; | 30 class GrVkTexture; |
| 31 struct GrVkInterface; | 31 struct GrVkInterface; |
| 32 | 32 |
| 33 #ifdef SK_DEBUG | 33 #ifdef SK_DEBUG |
| 34 #define ENABLE_VK_LAYERS | 34 #define ENABLE_VK_LAYERS |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 class GrVkGpu : public GrGpu { | 37 class GrVkGpu : public GrGpu { |
| 38 public: | 38 public: |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 void onResolveRenderTarget(GrRenderTarget* target) override { | 179 void onResolveRenderTarget(GrRenderTarget* target) override { |
| 180 SkDebugf("onResolveRenderTarget not yet implemented for Vulkan\n"); | 180 SkDebugf("onResolveRenderTarget not yet implemented for Vulkan\n"); |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool prepareDrawState(const GrPipeline&, | 183 bool prepareDrawState(const GrPipeline&, |
| 184 const GrPrimitiveProcessor&, | 184 const GrPrimitiveProcessor&, |
| 185 GrPrimitiveType, | 185 GrPrimitiveType, |
| 186 const GrVkRenderPass&, | 186 const GrVkRenderPass&, |
| 187 GrVkProgram** program); | 187 GrVkPipelineState** pipelineState); |
| 188 | 188 |
| 189 // Bind vertex and index buffers | 189 // Bind vertex and index buffers |
| 190 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&); | 190 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&); |
| 191 | 191 |
| 192 // Ends and submits the current command buffer to the queue and then creates
a new command | 192 // Ends and submits the current command buffer to the queue and then creates
a new command |
| 193 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi
ll wait for all | 193 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi
ll wait for all |
| 194 // work in the queue to finish before returning. | 194 // work in the queue to finish before returning. |
| 195 void submitCommandBuffer(SyncQueue sync); | 195 void submitCommandBuffer(SyncQueue sync); |
| 196 | 196 |
| 197 void copySurfaceAsCopyImage(GrSurface* dst, | 197 void copySurfaceAsCopyImage(GrSurface* dst, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 shaderc_compiler_t fCompiler; | 230 shaderc_compiler_t fCompiler; |
| 231 | 231 |
| 232 // This is only for our current testing and building. The client should be h
olding on to the | 232 // This is only for our current testing and building. The client should be h
olding on to the |
| 233 // VkInstance. | 233 // VkInstance. |
| 234 VkInstance fVkInstance; | 234 VkInstance fVkInstance; |
| 235 | 235 |
| 236 typedef GrGpu INHERITED; | 236 typedef GrGpu INHERITED; |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 #endif | 239 #endif |
| OLD | NEW |