| 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" |
| 11 #include "GrPipeline.h" | 11 #include "GrPipeline.h" |
| 12 #include "GrVkCommandBuffer.h" | 12 #include "GrVkCommandBuffer.h" |
| 13 #include "GrVkGpu.h" | 13 #include "GrVkGpu.h" |
| 14 #include "GrVkProgramDesc.h" | |
| 15 #include "GrVkRenderTarget.h" | 14 #include "GrVkRenderTarget.h" |
| 16 #include "GrVkUtil.h" | 15 #include "GrVkUtil.h" |
| 17 | 16 |
| 18 static inline const VkFormat& attrib_type_to_vkformat(GrVertexAttribType type) { | 17 static inline const VkFormat& attrib_type_to_vkformat(GrVertexAttribType type) { |
| 19 SkASSERT(type >= 0 && type < kGrVertexAttribTypeCount); | 18 SkASSERT(type >= 0 && type < kGrVertexAttribTypeCount); |
| 20 static const VkFormat kFormats[kGrVertexAttribTypeCount] = { | 19 static const VkFormat kFormats[kGrVertexAttribTypeCount] = { |
| 21 VK_FORMAT_R32_SFLOAT, // kFloat_GrVertexAttribType | 20 VK_FORMAT_R32_SFLOAT, // kFloat_GrVertexAttribType |
| 22 VK_FORMAT_R32G32_SFLOAT, // kVec2f_GrVertexAttribType | 21 VK_FORMAT_R32G32_SFLOAT, // kVec2f_GrVertexAttribType |
| 23 VK_FORMAT_R32G32B32_SFLOAT, // kVec3f_GrVertexAttribType | 22 VK_FORMAT_R32G32B32_SFLOAT, // kVec3f_GrVertexAttribType |
| 24 VK_FORMAT_R32G32B32A32_SFLOAT, // kVec4f_GrVertexAttribType | 23 VK_FORMAT_R32G32B32A32_SFLOAT, // kVec4f_GrVertexAttribType |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 547 } |
| 549 | 548 |
| 550 void GrVkPipeline::SetDynamicState(GrVkGpu* gpu, | 549 void GrVkPipeline::SetDynamicState(GrVkGpu* gpu, |
| 551 GrVkCommandBuffer* cmdBuffer, | 550 GrVkCommandBuffer* cmdBuffer, |
| 552 const GrPipeline& pipeline) { | 551 const GrPipeline& pipeline) { |
| 553 const GrRenderTarget& target = *pipeline.getRenderTarget(); | 552 const GrRenderTarget& target = *pipeline.getRenderTarget(); |
| 554 set_dynamic_scissor_state(gpu, cmdBuffer, pipeline, target); | 553 set_dynamic_scissor_state(gpu, cmdBuffer, pipeline, target); |
| 555 set_dynamic_viewport_state(gpu, cmdBuffer, target); | 554 set_dynamic_viewport_state(gpu, cmdBuffer, target); |
| 556 set_dynamic_blend_constant_state(gpu, cmdBuffer, pipeline); | 555 set_dynamic_blend_constant_state(gpu, cmdBuffer, pipeline); |
| 557 } | 556 } |
| OLD | NEW |