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

Unified Diff: src/gpu/vk/GrVkImageView.cpp

Issue 2115903002: Fix vulkan ImageView swizzling to match spec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698