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

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

Issue 1847963003: Update vulkan format features in caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review nits Created 4 years, 9 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 | « src/gpu/vk/GrVkImage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkSampler.cpp
diff --git a/src/gpu/vk/GrVkSampler.cpp b/src/gpu/vk/GrVkSampler.cpp
index fb8dacae878ecfea1b153920393bdb6006c4a235..75c2ee80d6bd7e1993ac406d8375a9510753e76c 100644
--- a/src/gpu/vk/GrVkSampler.cpp
+++ b/src/gpu/vk/GrVkSampler.cpp
@@ -52,6 +52,11 @@ GrVkSampler* GrVkSampler::Create(const GrVkGpu* gpu, const GrTextureParams& para
createInfo.maxAnisotropy = 1.0f;
createInfo.compareEnable = VK_FALSE;
createInfo.compareOp = VK_COMPARE_OP_NEVER;
+ // Vulkan doesn't have a direct mapping of GL's nearest or linear filters for minFilter since
+ // there is always a mipmapMode. To get the same effect as GL we can set minLod = maxLod = 0.0.
+ // This works since our min and mag filters are the same (this forces us to use mag on the 0
+ // level mip). If the filters weren't the same we could set min = 0 and max = 0.25 to force
+ // the minFilter on mip level 0.
createInfo.minLod = 0.0f;
createInfo.maxLod = 0.0f;
createInfo.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
« no previous file with comments | « src/gpu/vk/GrVkImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698