Rename GrTextureBufferSampler to GrBufferSampler
Just a simple renaming to reinforce the Ganesh notion that a buffer access is not related to a texture. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4879 Change-Id: I3f12b6eccff744e246618be0a7abf41c4a1228a1 Reviewed-on: https://skia-review.googlesource.com/4879 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
2a51de82ce
commit
2245803fcd
@ -31,7 +31,7 @@ enum GrSLType {
|
||||
kITexture2DSampler_GrSLType,
|
||||
kTextureExternalSampler_GrSLType,
|
||||
kTexture2DRectSampler_GrSLType,
|
||||
kTextureBufferSampler_GrSLType,
|
||||
kBufferSampler_GrSLType,
|
||||
kTexture2D_GrSLType,
|
||||
kSampler_GrSLType,
|
||||
};
|
||||
@ -97,7 +97,7 @@ static inline bool GrSLTypeIsFloatType(GrSLType type) {
|
||||
case kITexture2DSampler_GrSLType:
|
||||
case kTextureExternalSampler_GrSLType:
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
case kBool_GrSLType:
|
||||
case kInt_GrSLType:
|
||||
case kUint_GrSLType:
|
||||
@ -125,7 +125,7 @@ static inline bool GrSLTypeIs2DCombinedSamplerType(GrSLType type) {
|
||||
case kMat22f_GrSLType:
|
||||
case kMat33f_GrSLType:
|
||||
case kMat44f_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
case kInt_GrSLType:
|
||||
case kUint_GrSLType:
|
||||
case kBool_GrSLType:
|
||||
@ -143,7 +143,7 @@ static inline bool GrSLTypeIsCombinedSamplerType(GrSLType type) {
|
||||
case kITexture2DSampler_GrSLType:
|
||||
case kTextureExternalSampler_GrSLType:
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
return true;
|
||||
|
||||
case kVoid_GrSLType:
|
||||
@ -180,7 +180,7 @@ static inline bool GrSLTypeAcceptsPrecision(GrSLType type) {
|
||||
case kITexture2DSampler_GrSLType:
|
||||
case kTextureExternalSampler_GrSLType:
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
case kTexture2D_GrSLType:
|
||||
case kSampler_GrSLType:
|
||||
return true;
|
||||
|
@ -19,7 +19,7 @@ static uint16_t sampler_key(GrSLType samplerType, GrPixelConfig config, GrShader
|
||||
const GrGLSLCaps& caps) {
|
||||
enum {
|
||||
kFirstSamplerType = kTexture2DSampler_GrSLType,
|
||||
kLastSamplerType = kTextureBufferSampler_GrSLType,
|
||||
kLastSamplerType = kBufferSampler_GrSLType,
|
||||
kSamplerTypeKeyBits = 4
|
||||
};
|
||||
GR_STATIC_ASSERT(kLastSamplerType - kFirstSamplerType < (1 << kSamplerTypeKeyBits));
|
||||
@ -51,7 +51,7 @@ 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(kTextureBufferSampler_GrSLType, access.texelConfig(),
|
||||
k16[i] = sampler_key(kBufferSampler_GrSLType, access.texelConfig(),
|
||||
access.visibility(), caps);
|
||||
}
|
||||
// zero the last 16 bits if the number of samplers is odd.
|
||||
|
@ -134,7 +134,7 @@ static inline const char* GrGLSLTypeString(GrSLType t) {
|
||||
return "samplerExternalOES";
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
return "sampler2DRect";
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
return "samplerBuffer";
|
||||
case kBool_GrSLType:
|
||||
return "bool";
|
||||
|
@ -266,7 +266,7 @@ void GrGLSLProgramBuilder::emitSamplers(const GrProcessor& processor,
|
||||
for (int b = 0; b < numBuffers; ++b) {
|
||||
const GrBufferAccess& access = processor.bufferAccess(b);
|
||||
name.printf("BufferSampler_%d", outBufferSamplers->count());
|
||||
this->emitSampler(kTextureBufferSampler_GrSLType, access.texelConfig(), name.c_str(),
|
||||
this->emitSampler(kBufferSampler_GrSLType, access.texelConfig(), name.c_str(),
|
||||
access.visibility(), outBufferSamplers);
|
||||
texelBufferVisibility |= access.visibility();
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ uint32_t grsltype_to_alignment_mask(GrSLType type) {
|
||||
case kITexture2DSampler_GrSLType:
|
||||
case kTextureExternalSampler_GrSLType:
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
case kTexture2D_GrSLType:
|
||||
case kSampler_GrSLType:
|
||||
break;
|
||||
@ -83,7 +83,7 @@ static inline uint32_t grsltype_to_vk_size(GrSLType type) {
|
||||
case kITexture2DSampler_GrSLType:
|
||||
case kTextureExternalSampler_GrSLType:
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
case kTexture2D_GrSLType:
|
||||
case kSampler_GrSLType:
|
||||
break;
|
||||
|
@ -35,7 +35,7 @@ static inline int grsltype_to_location_size(GrSLType type) {
|
||||
return 0;
|
||||
case kTexture2DRectSampler_GrSLType:
|
||||
return 0;
|
||||
case kTextureBufferSampler_GrSLType:
|
||||
case kBufferSampler_GrSLType:
|
||||
return 0;
|
||||
case kBool_GrSLType:
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user