}
if (this->isConfigTexturable(kRGBA_float_GrPixelConfig)) {
- fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
if (kGL_GrGLStandard == standard) {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
fConfigRenderSupport[kRGBA_float_GrPixelConfig][kYes_MSAA] = true;
} else {
- // for now we don't support float point MSAA on ES
+ if (ctxInfo.hasExtension("GL_EXT_color_buffer_float")) {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = true;
+ } else {
+ fConfigRenderSupport[kRGBA_float_GrPixelConfig][kNo_MSAA] = false;
+ }
+ // for now we don't support floating point MSAA on ES
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
}
}
if (this->isConfigTexturable(kAlpha_half_GrPixelConfig)) {
- fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
if (kGL_GrGLStandard == standard) {
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = true;
} else {
- // for now we don't support float point MSAA on ES
+ // in theory, check for "GL_EXT_color_buffer_half_float"
+ // for now we don't support half float alpha render target on ES
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = false;
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
}
}
bool hasFPTextures = version >= GR_GL_VER(3, 1);
if (!hasFPTextures) {
hasFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") ||
- (ctxInfo.hasExtension("OES_texture_float_linear") &&
+ (ctxInfo.hasExtension("GL_OES_texture_float_linear") &&
ctxInfo.hasExtension("GL_OES_texture_float"));
}
fConfigTextureSupport[kRGBA_float_GrPixelConfig] = hasFPTextures;
bool hasHalfFPTextures = version >= GR_GL_VER(3, 1);
if (!hasHalfFPTextures) {
hasHalfFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") ||
- (ctxInfo.hasExtension("OES_texture_half_float_linear") &&
+ (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") &&
ctxInfo.hasExtension("GL_OES_texture_half_float"));
}
fConfigTextureSupport[kAlpha_half_GrPixelConfig] = hasHalfFPTextures && fTextureRedSupport;
break;
case kAlpha_half_GrPixelConfig:
- if (this->glCaps().textureRedSupport()) {
+ if (kGLES_GrGLStandard == this->glStandard() && this->glVersion() < GR_GL_VER(3, 1)) {
+ *internalFormat = GR_GL_ALPHA;
+ *externalFormat = GR_GL_ALPHA;
+ *externalType = GR_GL_HALF_FLOAT_OES;
+ } else if (this->glCaps().textureRedSupport()) {
*internalFormat = GR_GL_R16F;
*externalFormat = GR_GL_RED;
- *externalType = (kGLES_GrGLStandard == this->glStandard()) ? GR_GL_HALF_FLOAT
- : GR_GL_HALF_FLOAT_OES;
+ *externalType = GR_GL_HALF_FLOAT;
} else {
*internalFormat = GR_GL_ALPHA16F;
*externalFormat = GR_GL_ALPHA;
- *externalType = (kGLES_GrGLStandard == this->glStandard()) ? GR_GL_HALF_FLOAT
- : GR_GL_HALF_FLOAT_OES;
+ *externalType = GR_GL_HALF_FLOAT;
}
break;
fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixelData, 0);
fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0);
for (int j = 0; j < HALF_CONTROL_ARRAY_SIZE; ++j) {
- SkASSERT(readBuffer[j] == controlPixelData[j]);
REPORTER_ASSERT(reporter, readBuffer[j] == controlPixelData[j]);
}
}