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

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

Issue 2118733005: Fix vulkan image sampling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove debug 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 | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrVkGpu.h" 8 #include "GrVkGpu.h"
9 9
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 // We cannot generate mipmaps for images that are multisampled. 778 // We cannot generate mipmaps for images that are multisampled.
779 // TODO: does it even make sense for rendertargets in general? 779 // TODO: does it even make sense for rendertargets in general?
780 if (tex->asRenderTarget() && tex->asRenderTarget()->numColorSamples() > 1) { 780 if (tex->asRenderTarget() && tex->asRenderTarget()->numColorSamples() > 1) {
781 return; 781 return;
782 } 782 }
783 783
784 // determine if we can blit to and from this format 784 // determine if we can blit to and from this format
785 const GrVkCaps& caps = this->vkCaps(); 785 const GrVkCaps& caps = this->vkCaps();
786 if (!caps.configCanBeDstofBlit(tex->config(), false) || 786 if (!caps.configCanBeDstofBlit(tex->config(), false) ||
787 !caps.configCanBeSrcofBlit(tex->config(), false)) { 787 !caps.configCanBeSrcofBlit(tex->config(), false) ||
788 !caps.mipMapSupport()) {
788 return; 789 return;
789 } 790 }
egdaniel 2016/07/01 20:20:22 On Nvidia, there seems to be a driver bug in blitt
bsalomon 2016/07/02 00:50:12 I leave it to you whether you want to workaround t
jvanverth1 2016/07/06 15:19:42 I'm fine with landing this as is, and creating a s
790 791
791 // change the original image's layout 792 // change the original image's layout
792 tex->setImageLayout(this, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 793 tex->setImageLayout(this, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
793 VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_ BIT, false); 794 VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_ BIT, false);
794 795
795 // grab handle to the original image resource 796 // grab handle to the original image resource
796 const GrVkResource* oldResource = tex->resource(); 797 const GrVkResource* oldResource = tex->resource();
797 oldResource->ref(); 798 oldResource->ref();
798 VkImage oldImage = tex->image(); 799 VkImage oldImage = tex->image();
799 800
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 } 1510 }
1510 1511
1511 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment 1512 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment
1512 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment 1513 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment
1513 // which is always at the first attachment. 1514 // which is always at the first attachment.
1514 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true); 1515 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true);
1515 fCurrentCmdBuffer->executeCommands(this, buffer); 1516 fCurrentCmdBuffer->executeCommands(this, buffer);
1516 fCurrentCmdBuffer->endRenderPass(this); 1517 fCurrentCmdBuffer->endRenderPass(this);
1517 } 1518 }
1518 1519
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698