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

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

Issue 2358843002: Conditionally insert gl_PointSize into shaders. (Closed)
Patch Set: minor Created 4 years, 3 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/instanced/GLInstancedRendering.cpp ('k') | no next file » | 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 "GrVkPipelineState.h" 8 #include "GrVkPipelineState.h"
9 9
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 key |= (blendInfo.fEquation << (kBlendWriteShift + 2 * kBlendCoeffShift)); 480 key |= (blendInfo.fEquation << (kBlendWriteShift + 2 * kBlendCoeffShift));
481 481
482 return key; 482 return key;
483 } 483 }
484 484
485 bool GrVkPipelineState::Desc::Build(Desc* desc, 485 bool GrVkPipelineState::Desc::Build(Desc* desc,
486 const GrPrimitiveProcessor& primProc, 486 const GrPrimitiveProcessor& primProc,
487 const GrPipeline& pipeline, 487 const GrPipeline& pipeline,
488 GrPrimitiveType primitiveType, 488 GrPrimitiveType primitiveType,
489 const GrGLSLCaps& caps) { 489 const GrGLSLCaps& caps) {
490 if (!INHERITED::Build(desc, primProc, pipeline, caps)) { 490 if (!INHERITED::Build(desc, primProc, primitiveType == kPoints_GrPrimitiveTy pe, pipeline,
491 caps)) {
491 return false; 492 return false;
492 } 493 }
493 494
494 GrProcessorKeyBuilder b(&desc->key()); 495 GrProcessorKeyBuilder b(&desc->key());
495 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget(); 496 GrVkRenderTarget* vkRT = (GrVkRenderTarget*)pipeline.getRenderTarget();
496 vkRT->simpleRenderPass()->genKey(&b); 497 vkRT->simpleRenderPass()->genKey(&b);
497 498
498 pipeline.getStencil().genKey(&b); 499 pipeline.getStencil().genKey(&b);
499 500
500 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); 501 SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t));
501 b.add32((int32_t)pipeline.getDrawFace()); 502 b.add32((int32_t)pipeline.getDrawFace());
502 503
503 b.add32(get_blend_info_key(pipeline)); 504 b.add32(get_blend_info_key(pipeline));
504 505
505 b.add32(primitiveType); 506 b.add32(primitiveType);
506 507
507 return true; 508 return true;
508 } 509 }
OLDNEW
« no previous file with comments | « src/gpu/instanced/GLInstancedRendering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698