Index: src/gpu/vk/GrVkImageView.cpp |
diff --git a/src/gpu/vk/GrVkImageView.cpp b/src/gpu/vk/GrVkImageView.cpp |
index d94aeeccb66076e5dc39e645c6332fdc17e508f2..b737df5f961902f132a1cbb1d6a6d1dec30de4cf 100644 |
--- a/src/gpu/vk/GrVkImageView.cpp |
+++ b/src/gpu/vk/GrVkImageView.cpp |
@@ -21,15 +21,13 @@ const GrVkImageView* GrVkImageView::Create(const GrVkGpu* gpu, VkImage image, Vk |
image, // image |
VK_IMAGE_VIEW_TYPE_2D, // viewType |
format, // format |
- { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, |
- VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }, // components |
+ { VK_COMPONENT_SWIZZLE_IDENTITY, |
+ VK_COMPONENT_SWIZZLE_IDENTITY, |
+ VK_COMPONENT_SWIZZLE_IDENTITY, |
+ VK_COMPONENT_SWIZZLE_IDENTITY }, // components |
{ VK_IMAGE_ASPECT_COLOR_BIT, 0, miplevels, 0, 1 }, // subresourceRange |
}; |
if (kStencil_Type == viewType) { |
- viewInfo.components.r = VK_COMPONENT_SWIZZLE_ZERO; |
- viewInfo.components.g = VK_COMPONENT_SWIZZLE_ZERO; |
- viewInfo.components.b = VK_COMPONENT_SWIZZLE_ZERO; |
- viewInfo.components.a = VK_COMPONENT_SWIZZLE_ZERO; |
viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT; |
} |