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

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

Issue 2146103002: Update RT views and framebuffer in vulkan after mipmaping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits 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 | « src/gpu/vk/GrVkGpu.h ('k') | 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 info); 763 info);
764 if (tgt && wrapDesc.fStencilBits) { 764 if (tgt && wrapDesc.fStencilBits) {
765 if (!createStencilAttachmentForRenderTarget(tgt, desc.fWidth, desc.fHeig ht)) { 765 if (!createStencilAttachmentForRenderTarget(tgt, desc.fWidth, desc.fHeig ht)) {
766 tgt->unref(); 766 tgt->unref();
767 return nullptr; 767 return nullptr;
768 } 768 }
769 } 769 }
770 return tgt; 770 return tgt;
771 } 771 }
772 772
773 void GrVkGpu::generateMipmap(GrVkTexture* tex) const { 773 void GrVkGpu::generateMipmap(GrVkTexture* tex) {
774 // don't do anything for linearly tiled textures (can't have mipmaps) 774 // don't do anything for linearly tiled textures (can't have mipmaps)
775 if (tex->isLinearTiled()) { 775 if (tex->isLinearTiled()) {
776 SkDebugf("Trying to create mipmap for linear tiled texture"); 776 SkDebugf("Trying to create mipmap for linear tiled texture");
777 return; 777 return;
778 } 778 }
779 779
780 // We cannot generate mipmaps for images that are multisampled. 780 // We cannot generate mipmaps for images that are multisampled.
781 // TODO: does it even make sense for rendertargets in general? 781 // TODO: does it even make sense for rendertargets in general?
782 if (tex->asRenderTarget() && tex->asRenderTarget()->numColorSamples() > 1) { 782 if (tex->asRenderTarget() && tex->asRenderTarget()->numColorSamples() > 1) {
783 return; 783 return;
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 } 1557 }
1558 1558
1559 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment 1559 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment
1560 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment 1560 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment
1561 // which is always at the first attachment. 1561 // which is always at the first attachment.
1562 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true); 1562 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true);
1563 fCurrentCmdBuffer->executeCommands(this, buffer); 1563 fCurrentCmdBuffer->executeCommands(this, buffer);
1564 fCurrentCmdBuffer->endRenderPass(this); 1564 fCurrentCmdBuffer->endRenderPass(this);
1565 } 1565 }
1566 1566
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.h ('k') | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698