Index: src/gpu/vk/GrVkImageView.cpp |
diff --git a/src/gpu/vk/GrVkImageView.cpp b/src/gpu/vk/GrVkImageView.cpp |
index 1ab2475f1cba34c441735356588fbefa46cd34a5..d94aeeccb66076e5dc39e645c6332fdc17e508f2 100644 |
--- a/src/gpu/vk/GrVkImageView.cpp |
+++ b/src/gpu/vk/GrVkImageView.cpp |
@@ -9,8 +9,8 @@ |
#include "GrVkGpu.h" |
#include "GrVkUtil.h" |
-const GrVkImageView* GrVkImageView::Create(GrVkGpu* gpu, VkImage image, VkFormat format, |
- Type viewType) { |
+const GrVkImageView* GrVkImageView::Create(const GrVkGpu* gpu, VkImage image, VkFormat format, |
+ Type viewType, uint32_t miplevels) { |
VkImageView imageView; |
// Create the VkImageView |
@@ -23,7 +23,7 @@ const GrVkImageView* GrVkImageView::Create(GrVkGpu* gpu, VkImage image, VkFormat |
format, // format |
{ VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, |
VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }, // components |
- { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 }, // subresourceRange |
+ { VK_IMAGE_ASPECT_COLOR_BIT, 0, miplevels, 0, 1 }, // subresourceRange |
}; |
if (kStencil_Type == viewType) { |
viewInfo.components.r = VK_COMPONENT_SWIZZLE_ZERO; |