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

Unified Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 2143143002: Add Texture2D and Sampler GrSLTypes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits Created 4 years, 5 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/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLSampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 801224c9b6744b61c3af3af9947c89dba8775f6b..695a46d24003b0c487b340bb210f0b3b8e7b83dd 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -20,8 +20,8 @@
static uint16_t sampler_key(GrSLType samplerType, GrPixelConfig config, GrShaderFlags visibility,
const GrGLSLCaps& caps) {
enum {
- kFirstSamplerType = kSampler2D_GrSLType,
- kLastSamplerType = kSamplerBuffer_GrSLType,
+ kFirstSamplerType = kTexture2DSampler_GrSLType,
+ kLastSamplerType = kTextureBufferSampler_GrSLType,
kSamplerTypeKeyBits = 4
};
GR_STATIC_ASSERT(kLastSamplerType - kFirstSamplerType < (1 << kSamplerTypeKeyBits));
@@ -52,8 +52,8 @@ static void add_sampler_keys(GrProcessorKeyBuilder* b, const GrProcessor& proc,
}
for (; i < numSamplers; ++i) {
const GrBufferAccess& access = proc.bufferAccess(i - numTextures);
- k16[i] = sampler_key(kSamplerBuffer_GrSLType, access.texelConfig(), access.visibility(),
- caps);
+ k16[i] = sampler_key(kTextureBufferSampler_GrSLType, access.texelConfig(),
+ access.visibility(), caps);
}
// zero the last 16 bits if the number of samplers is odd.
if (numSamplers & 0x1) {
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698