Index: src/gpu/vk/GrVkGpu.cpp |
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp |
index a8525223ed15980ef86b740ec3d1c3938402d981..da245505157528732bc96e0e53f37f053624d42f 100644 |
--- a/src/gpu/vk/GrVkGpu.cpp |
+++ b/src/gpu/vk/GrVkGpu.cpp |
@@ -493,7 +493,6 @@ bool GrVkGpu::uploadTexDataOptimal(GrVkTexture* tex, |
VkPipelineStageFlags dstStageMask = VK_PIPELINE_STAGE_TRANSFER_BIT; |
VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask(layout); |
VkAccessFlags dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; |
- // TODO: change layout of all the subresources |
tex->setImageLayout(this, |
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, |
srcAccessMask, |
@@ -727,7 +726,6 @@ void GrVkGpu::generateMipmap(GrVkTexture* tex) const { |
VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask(origSrcLayout); |
VkAccessFlags dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; |
- // TODO: change layout of all the subresources |
tex->setImageLayout(this, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, |
srcAccessMask, dstAccessMask, srcStageMask, dstStageMask, false); |
@@ -750,13 +748,8 @@ void GrVkGpu::generateMipmap(GrVkTexture* tex) const { |
srcAccessMask = GrVkMemory::LayoutToSrcAccessMask(origDstLayout); |
dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; |
- tex->setImageLayout(this, |
- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, |
- srcAccessMask, |
- dstAccessMask, |
- srcStageMask, |
- dstStageMask, |
- false); |
+ tex->setImageLayout(this, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, |
+ srcAccessMask, dstAccessMask, srcStageMask, dstStageMask, false); |
// Blit original image |
int width = tex->width(); |
@@ -790,6 +783,7 @@ void GrVkGpu::generateMipmap(GrVkTexture* tex) const { |
blitRegion.dstOffsets[1] = { width/2, height/2, 0 }; |
// TODO: insert image barrier to wait on previous blit |
+ // TODO: change layout of src subresource to TRANSFER_SRC_OPTIMAL |
fCurrentCmdBuffer->blitImage(this, |
tex->resource(), |
@@ -968,6 +962,7 @@ GrBackendObject GrVkGpu::createTestingOnlyBackendTexture(void* srcData, int w, i |
info->fImageTiling = imageTiling; |
info->fImageLayout = initialLayout; |
info->fFormat = pixelFormat; |
+ info->fLevelCount = 1; |
return (GrBackendObject)info; |
} |