Lines Matching defs:format
1295 void GrGLCaps::getTexSubImageDefaultFormatTypeAndColorType(GrGLFormat format,
1299 const auto& info = this->getFormatInfo(format);
1331 void GrGLCaps::setStencilFormatIndexForFormat(GrGLFormat format, int index) {
1332 SkASSERT(!this->hasStencilFormatBeenDeterminedForFormat(format));
1333 this->getFormatInfo(format).fStencilFormatIndex =
1337 void GrGLCaps::setColorTypeFormat(GrColorType colorType, GrGLFormat format) {
1340 fColorTypeToFormatTable[idx] = format;
1641 // but does not have GL_ALPHA8 (and requires a sized internal format for glTexStorage).
1884 // We currently only use the renderbuffer format when allocating msaa renderbuffers, so we
1892 // format for the MSAA buffer. In the GL_EXT_texture_format_BGRA8888 case we can still
1898 // renderbuffer format to RGBA8 but disable MSAA unless we have the APPLE extension.
1907 // If BGRA is supported as an internal format it must always be specified to glTex[Sub]Image
1908 // as a base format. Which base format depends on which extension is used.
1911 // This extension adds GL_BGRA as an unsized internal format. However, it is
1918 // ES 2.0: the extension makes BGRA an external format but not an internal format.
1919 // ES 3.0: the extension explicitly states GL_BGRA8 is not a valid internal format
1924 // TexStorage requires using a sized internal format and BGRA8 is only supported if we have
1936 // without GL_EXT_texture_storage it does not allow the BGRA8 sized internal format.
1942 // This APPLE extension introduces complexity on ES2. It leaves the internal format
1943 // as RGBA, but allows BGRA as the external format. From testing, it appears that
1944 // the driver remembers the external format when the texture is created (with
2031 // 565 is not a sized internal format on desktop GL. So on desktop with
2032 // 565 we always use an unsized internal format to let the system pick
2033 // the best sized format to convert the 565 data to. Since TexStorage
2241 // GL_EXT_color_buffer_half_float might add this format to ES 2.0 but it is not entirely
2243 // neither adds the texture format explicitly.
2410 // a supported render buffer format. Since we usually use render buffers for MSAA on
2416 // 3.0 and the extension support this as a render buffer format.
2709 // We may modify the default external format below.
2731 // ES 2.0 requires that the external format matches the internal format.
2745 // WebGL 1.0 requires that the external format matches the internal format.
2788 // Thus, the external format is GL_RGBA. See below for note about ES2.0 and
2793 // <format> param to Tex(Sub)Image. ES 2.0 requires the <internalFormat> and
2794 // <format> params to match. Thus, on ES 2.0 we will use GL_SRGB_ALPHA as the
2795 // <format> param. On OpenGL and ES 3.0+ GL_SRGB_ALPHA does not work for the
2796 // <format> param to glTexImage.
2821 // There are no support GrColorTypes for this format
2835 // There are no support GrColorTypes for this format
2857 // There are no support GrColorTypes for this format
2871 // There are no support GrColorTypes for this format
2886 // There are no support GrColorTypes for this format
2901 // There are no support GrColorTypes for this format
2916 // There are no support GrColorTypes for this format
3150 // GL_EXT_color_buffer_half_float might add this format to ES 2.0 but it is not entirely
3152 // neither adds the texture format explicitly.
3337 // When it comes to format types and component sizes the gl spec is fairly complex as
3339 // a sized format or not). These affect the rules about which format types can be copied to
3363 // formats with CopyTexSubImage. Each base format can be copied to itself or formats with
3554 // Check for format issues with glCopyTexSubImage2D
4220 // internal format GL_LUMINANCE8 fails. However, it succeeds with glTexStorage2D().
4224 // an unsized internal format. We wouldn't normally do that but Chrome can limit us
4416 if (tex->target() == GR_GL_TEXTURE_EXTERNAL || GrGLFormatIsCompressed(tex->format())) {
4498 // Currently we just pick the first supported format that we find as our
4533 // Currently we just pick the first supported format that we find as our
4552 bool GrGLCaps::isFormatSRGB(const GrBackendFormat& format) const {
4553 return format.asGLFormat() == GrGLFormat::kSRGB8_ALPHA8;
4556 bool GrGLCaps::isFormatTexturable(const GrBackendFormat& format, GrTextureType textureType) const {
4560 return this->isFormatTexturable(format.asGLFormat());
4563 bool GrGLCaps::isFormatTexturable(GrGLFormat format) const {
4564 const FormatInfo& info = this->getFormatInfo(format);
4568 bool GrGLCaps::isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat& format,
4570 if (format.textureType() == GrTextureType::kRectangle && !this->rectangleTextureSupport()) {
4573 if (format.textureType() == GrTextureType::kExternal) {
4576 auto f = format.asGLFormat();
4585 bool GrGLCaps::isFormatRenderable(const GrBackendFormat& format, int sampleCount) const {
4586 if (format.textureType() == GrTextureType::kRectangle && !this->rectangleTextureSupport()) {
4589 if (format.textureType() == GrTextureType::kExternal) {
4592 return this->isFormatRenderable(format.asGLFormat(), sampleCount);
4595 int GrGLCaps::getRenderTargetSampleCount(int requestedCount, GrGLFormat format) const {
4596 const FormatInfo& info = this->getFormatInfo(format);
4619 int GrGLCaps::maxRenderTargetSampleCount(GrGLFormat format) const {
4620 const FormatInfo& info = this->getFormatInfo(format);
4632 bool GrGLCaps::canFormatBeFBOColorAttachment(GrGLFormat format) const {
4633 return SkToBool(this->getFormatInfo(format).fFlags & FormatInfo::kFBOColorAttachment_Flag);
4636 bool GrGLCaps::isFormatCopyable(const GrBackendFormat& format) const {
4641 return this->canFormatBeFBOColorAttachment(format.asGLFormat());
4644 bool GrGLCaps::formatSupportsTexStorage(GrGLFormat format) const {
4645 return SkToBool(this->getFormatInfo(format).fFlags & FormatInfo::kUseTexStorage_Flag);
4648 bool GrGLCaps::shouldQueryImplementationReadSupport(GrGLFormat format) const {
4649 const auto& formatInfo = const_cast<GrGLCaps*>(this)->getFormatInfo(format);
4670 void GrGLCaps::didQueryImplementationReadSupport(GrGLFormat format,
4673 auto& formatInfo = const_cast<GrGLCaps*>(this)->getFormatInfo(format);
4691 const GrBackendFormat& format) const {
4692 GrGLFormat glFormat = format.asGLFormat();
4703 auto format = this->getFormatFromColorType(ct);
4704 if (format == GrGLFormat::kUnknown) {
4707 return GrBackendFormat::MakeGL(GrGLFormatToEnum(format), GR_GL_TEXTURE_2D);
4716 // if ETC2 is available default to that format
4759 GrSwizzle GrGLCaps::onGetReadSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
4760 GrGLFormat glFormat = format.asGLFormat();
4768 SkDEBUGFAILF("Illegal color type (%d) and format (%d) combination.",
4773 GrSwizzle GrGLCaps::getWriteSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
4774 const auto& info = this->getFormatInfo(format.asGLFormat());
4781 SkDEBUGFAILF("Illegal color type (%d) and format (%d) combination.",
4782 (int)colorType, (int)format.asGLFormat());
4797 uint64_t GrGLCaps::computeFormatKey(const GrBackendFormat& format) const {
4798 auto glFormat = format.asGLFormat();