aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkGpuCommandBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/vk/GrVkGpuCommandBuffer.cpp')
-rw-r--r--src/gpu/vk/GrVkGpuCommandBuffer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
index 91adb5a778..63ebba0f25 100644
--- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
@@ -305,7 +305,7 @@ void GrVkGpuRTCommandBuffer::onClearStencilClip(const GrFixedClip& clip, bool in
VkClearRect clearRect;
// Flip rect if necessary
SkIRect vkRect;
- if (!clip.scissorEnabled()) {
+ if (clip.scissorTest() == GrScissorTest::kDisabled) {
vkRect.setXYWH(0, 0, fRenderTarget->width(), fRenderTarget->height());
} else if (kBottomLeft_GrSurfaceOrigin != fOrigin) {
vkRect = clip.scissorRect();
@@ -333,7 +333,7 @@ void GrVkGpuRTCommandBuffer::onClearStencilClip(const GrFixedClip& clip, bool in
cbInfo.fIsEmpty = false;
// Update command buffer bounds
- if (!clip.scissorEnabled()) {
+ if (clip.scissorTest() == GrScissorTest::kDisabled) {
cbInfo.fBounds.join(fRenderTarget->getBoundsRect());
} else {
cbInfo.fBounds.join(SkRect::Make(clip.scissorRect()));
@@ -351,7 +351,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) {
VkClearColorValue vkColor;
GrColorToRGBAFloat(color, vkColor.float32);
- if (cbInfo.fIsEmpty && !clip.scissorEnabled()) {
+ if (cbInfo.fIsEmpty && clip.scissorTest() == GrScissorTest::kDisabled) {
// Change the render pass to do a clear load
GrVkRenderPass::LoadStoreOps vkColorOps(VK_ATTACHMENT_LOAD_OP_CLEAR,
VK_ATTACHMENT_STORE_OP_STORE);
@@ -390,7 +390,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) {
VkClearRect clearRect;
// Flip rect if necessary
SkIRect vkRect;
- if (!clip.scissorEnabled()) {
+ if (clip.scissorTest() == GrScissorTest::kDisabled) {
vkRect.setXYWH(0, 0, fRenderTarget->width(), fRenderTarget->height());
} else if (kBottomLeft_GrSurfaceOrigin != fOrigin) {
vkRect = clip.scissorRect();
@@ -416,7 +416,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) {
cbInfo.fIsEmpty = false;
// Update command buffer bounds
- if (!clip.scissorEnabled()) {
+ if (clip.scissorTest() == GrScissorTest::kDisabled) {
cbInfo.fBounds.join(fRenderTarget->getBoundsRect());
} else {
cbInfo.fBounds.join(SkRect::Make(clip.scissorRect()));
@@ -591,7 +591,7 @@ GrVkPipelineState* GrVkGpuRTCommandBuffer::prepareDrawState(
GrRenderTarget* rt = pipeline.renderTarget();
- if (!pipeline.isScissorEnabled()) {
+ if (pipeline.scissorTest() == GrScissorTest::kDisabled) {
GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(),
rt, pipeline.proxy()->origin(),
SkIRect::MakeWH(rt->width(), rt->height()));
@@ -663,8 +663,8 @@ void GrVkGpuRTCommandBuffer::onDraw(const GrPrimitiveProcessor& primProc,
return;
}
- bool dynamicScissor =
- pipeline.isScissorEnabled() && dynamicStateArrays && dynamicStateArrays->fScissorRects;
+ bool dynamicScissor = (pipeline.scissorTest() == GrScissorTest::kEnabled) &&
+ dynamicStateArrays && dynamicStateArrays->fScissorRects;
for (int i = 0; i < meshCount; ++i) {
const GrMesh& mesh = meshes[i];