internalformat == GL_LUMINANCE_ALPHA ||
internalformat == GL_LUMINANCE || internalformat == GL_ALPHA ||
(_mesa_is_es3_color_renderable(internalformat) &&
- _mesa_is_es3_texture_filterable(internalformat));
+ _mesa_is_es3_texture_filterable(ctx, internalformat));
}
return (!_mesa_is_enum_format_integer(internalformat) &&
* is marked "Texture Filterable" in Table 8.10 of the ES 3.2 specification.
*/
bool
-_mesa_is_es3_texture_filterable(GLenum internal_format)
+_mesa_is_es3_texture_filterable(const struct gl_context *ctx,
+ GLenum internal_format)
{
switch (internal_format) {
case GL_R8:
case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
return true;
+ case GL_R32F:
+ case GL_RG32F:
+ case GL_RGB32F:
+ case GL_RGBA32F:
+ /* The OES_texture_float_linear spec says:
+ *
+ * "When implemented against OpenGL ES 3.0 or later versions, sized
+ * 32-bit floating-point formats become texture-filterable. This
+ * should be noted by, for example, checking the ``TF'' column of
+ * table 8.13 in the ES 3.1 Specification (``Correspondence of sized
+ * internal formats to base internal formats ... and use cases ...'')
+ * for the R32F, RG32F, RGB32F, and RGBA32F formats."
+ */
+ return ctx->Extensions.OES_texture_float_linear;
default:
return false;
}
_mesa_is_es3_color_renderable(GLenum internal_format);
extern bool
-_mesa_is_es3_texture_filterable(GLenum internal_format);
+_mesa_is_es3_texture_filterable(const struct gl_context *ctx,
+ GLenum internal_format);
#ifdef __cplusplus
}