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

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

Issue 1846963004: Infer sampler precision from pixel config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ... and gcc doesn't like the enums Created 4 years, 8 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/GrVkCaps.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/GrVkProgramDesc.cpp
diff --git a/src/gpu/vk/GrVkProgramDesc.cpp b/src/gpu/vk/GrVkProgramDesc.cpp
index 74e6bbb59d0c72b929cf30a7bf311150b7de6e66..f4bd2bf506b1bc99dd33020808bfdceb29f641ed 100644
--- a/src/gpu/vk/GrVkProgramDesc.cpp
+++ b/src/gpu/vk/GrVkProgramDesc.cpp
@@ -22,7 +22,7 @@
static void add_texture_key(GrProcessorKeyBuilder* b, const GrProcessor& proc,
const GrGLSLCaps& caps) {
int numTextures = proc.numTextures();
- // Need two bytes per key (swizzle and target).
+ // Need two bytes per key (swizzle, sampler type, and precision).
int word32Count = (proc.numTextures() + 1) / 2;
if (0 == word32Count) {
return;
@@ -31,7 +31,8 @@ static void add_texture_key(GrProcessorKeyBuilder* b, const GrProcessor& proc,
for (int i = 0; i < numTextures; ++i) {
const GrTextureAccess& access = proc.textureAccess(i);
GrTexture* texture = access.getTexture();
- k16[i] = SkToU16(caps.configTextureSwizzle(texture->config()).asKey());
+ k16[i] = SkToU16(caps.configTextureSwizzle(texture->config()).asKey() |
+ (caps.samplerPrecision(texture->config(), access.getVisibility()) << 8));
}
// zero the last 16 bits if the number of textures is odd.
if (numTextures & 0x1) {
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698