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

Side by Side Diff: src/gpu/vk/GrVkPipeline.cpp

Issue 2184413002: Merge ProgramDesc's for GL and Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@minorPerf
Patch Set: typo Created 4 years, 4 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/glsl/GrGLSLProgramDesc.cpp ('k') | src/gpu/vk/GrVkPipelineState.h » ('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 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
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 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramDesc.cpp ('k') | src/gpu/vk/GrVkPipelineState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698