| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #include "GrVkPipeline.h" | 8 #include "GrVkPipeline.h" |
| 9 | 9 |
| 10 #include "GrGeometryProcessor.h" | 10 #include "GrGeometryProcessor.h" |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 pipelineCreateInfo.pColorBlendState = &colorBlendInfo; | 488 pipelineCreateInfo.pColorBlendState = &colorBlendInfo; |
| 489 pipelineCreateInfo.pDynamicState = &dynamicInfo; | 489 pipelineCreateInfo.pDynamicState = &dynamicInfo; |
| 490 pipelineCreateInfo.layout = layout; | 490 pipelineCreateInfo.layout = layout; |
| 491 pipelineCreateInfo.renderPass = renderPass.vkRenderPass(); | 491 pipelineCreateInfo.renderPass = renderPass.vkRenderPass(); |
| 492 pipelineCreateInfo.subpass = 0; | 492 pipelineCreateInfo.subpass = 0; |
| 493 pipelineCreateInfo.basePipelineHandle = VK_NULL_HANDLE; | 493 pipelineCreateInfo.basePipelineHandle = VK_NULL_HANDLE; |
| 494 pipelineCreateInfo.basePipelineIndex = -1; | 494 pipelineCreateInfo.basePipelineIndex = -1; |
| 495 | 495 |
| 496 VkPipeline vkPipeline; | 496 VkPipeline vkPipeline; |
| 497 VkResult err = GR_VK_CALL(gpu->vkInterface(), CreateGraphicsPipelines(gpu->d
evice(), | 497 VkResult err = GR_VK_CALL(gpu->vkInterface(), CreateGraphicsPipelines(gpu->d
evice(), |
| 498 nullpt
r, 1, | 498 VK_NUL
L_HANDLE, 1, |
| 499 &pipel
ineCreateInfo, | 499 &pipel
ineCreateInfo, |
| 500 nullpt
r, &vkPipeline)); | 500 nullpt
r, &vkPipeline)); |
| 501 if (err) { | 501 if (err) { |
| 502 return nullptr; | 502 return nullptr; |
| 503 } | 503 } |
| 504 | 504 |
| 505 return new GrVkPipeline(vkPipeline); | 505 return new GrVkPipeline(vkPipeline); |
| 506 } | 506 } |
| 507 | 507 |
| 508 void GrVkPipeline::freeGPUData(const GrVkGpu* gpu) const { | 508 void GrVkPipeline::freeGPUData(const GrVkGpu* gpu) const { |
| 509 GR_VK_CALL(gpu->vkInterface(), DestroyPipeline(gpu->device(), fPipeline, nul
lptr)); | 509 GR_VK_CALL(gpu->vkInterface(), DestroyPipeline(gpu->device(), fPipeline, nul
lptr)); |
| 510 } | 510 } |
| 511 | 511 |
| 512 | 512 |
| OLD | NEW |