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

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

Issue 2171283004: Remove asserts on scissor size in Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | 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 "GrVkPipeline.h" 8 #include "GrVkPipeline.h"
9 9
10 #include "GrGeometryProcessor.h" 10 #include "GrGeometryProcessor.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 scissor.extent.width = scissorState.rect().width(); 499 scissor.extent.width = scissorState.rect().width();
500 if (kTopLeft_GrSurfaceOrigin == target.origin()) { 500 if (kTopLeft_GrSurfaceOrigin == target.origin()) {
501 scissor.offset.y = scissorState.rect().fTop; 501 scissor.offset.y = scissorState.rect().fTop;
502 } else { 502 } else {
503 SkASSERT(kBottomLeft_GrSurfaceOrigin == target.origin()); 503 SkASSERT(kBottomLeft_GrSurfaceOrigin == target.origin());
504 scissor.offset.y = target.height() - scissorState.rect().fBottom; 504 scissor.offset.y = target.height() - scissorState.rect().fBottom;
505 } 505 }
506 scissor.extent.height = scissorState.rect().height(); 506 scissor.extent.height = scissorState.rect().height();
507 507
508 SkASSERT(scissor.offset.x >= 0); 508 SkASSERT(scissor.offset.x >= 0);
509 SkASSERT(scissor.offset.x + scissor.extent.width <= (uint32_t)target.wid th());
510 SkASSERT(scissor.offset.y >= 0); 509 SkASSERT(scissor.offset.y >= 0);
511 SkASSERT(scissor.offset.y + scissor.extent.height <= (uint32_t)target.he ight());
csmartdalton 2016/07/22 20:54:48 Ah, looks my change gave you grief. I also removed
512 } else { 510 } else {
513 scissor.extent.width = target.width(); 511 scissor.extent.width = target.width();
514 scissor.extent.height = target.height(); 512 scissor.extent.height = target.height();
515 scissor.offset.x = 0; 513 scissor.offset.x = 0;
516 scissor.offset.y = 0; 514 scissor.offset.y = 0;
517 } 515 }
518 cmdBuffer->setScissor(gpu, 0, 1, &scissor); 516 cmdBuffer->setScissor(gpu, 0, 1, &scissor);
519 } 517 }
520 518
521 void set_dynamic_viewport_state(GrVkGpu* gpu, 519 void set_dynamic_viewport_state(GrVkGpu* gpu,
(...skipping 27 matching lines...) Expand all
549 } 547 }
550 548
551 void GrVkPipeline::SetDynamicState(GrVkGpu* gpu, 549 void GrVkPipeline::SetDynamicState(GrVkGpu* gpu,
552 GrVkCommandBuffer* cmdBuffer, 550 GrVkCommandBuffer* cmdBuffer,
553 const GrPipeline& pipeline) { 551 const GrPipeline& pipeline) {
554 const GrRenderTarget& target = *pipeline.getRenderTarget(); 552 const GrRenderTarget& target = *pipeline.getRenderTarget();
555 set_dynamic_scissor_state(gpu, cmdBuffer, pipeline, target); 553 set_dynamic_scissor_state(gpu, cmdBuffer, pipeline, target);
556 set_dynamic_viewport_state(gpu, cmdBuffer, target); 554 set_dynamic_viewport_state(gpu, cmdBuffer, target);
557 set_dynamic_blend_constant_state(gpu, cmdBuffer, pipeline); 555 set_dynamic_blend_constant_state(gpu, cmdBuffer, pipeline);
558 } 556 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698