mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
mesa: fix conditions for fp16 render format eligibility
GLES3 adds all of these, but they're also available in GLES2 with an ext. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4400 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9441>
This commit is contained in:
parent
12f1e42ed3
commit
a8044e87e7
1 changed files with 23 additions and 4 deletions
|
|
@ -800,11 +800,12 @@ is_format_color_renderable(const struct gl_context *ctx, mesa_format format,
|
|||
(_mesa_has_EXT_color_buffer_half_float(ctx) &&
|
||||
_mesa_has_EXT_texture_rg(ctx));
|
||||
case GL_RGBA16F:
|
||||
return _mesa_is_gles3(ctx) ||
|
||||
_mesa_has_EXT_color_buffer_half_float(ctx);
|
||||
case GL_RGBA32F:
|
||||
return _mesa_has_EXT_color_buffer_float(ctx);
|
||||
case GL_RGB16F:
|
||||
return _mesa_has_EXT_color_buffer_half_float(ctx) &&
|
||||
_mesa_has_OES_texture_half_float(ctx);
|
||||
return _mesa_has_EXT_color_buffer_half_float(ctx);
|
||||
case GL_RGB32F:
|
||||
case GL_RGB32I:
|
||||
case GL_RGB32UI:
|
||||
|
|
@ -2316,6 +2317,13 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat)
|
|||
? GL_INTENSITY : 0;
|
||||
|
||||
case GL_R16F:
|
||||
return ((_mesa_is_desktop_gl(ctx) &&
|
||||
ctx->Extensions.ARB_texture_rg &&
|
||||
ctx->Extensions.ARB_texture_float) ||
|
||||
_mesa_is_gles3(ctx) /* EXT_color_buffer_float */ ||
|
||||
(_mesa_has_EXT_color_buffer_half_float(ctx) &&
|
||||
_mesa_has_EXT_texture_rg(ctx)))
|
||||
? GL_RED : 0;
|
||||
case GL_R32F:
|
||||
return ((_mesa_is_desktop_gl(ctx) &&
|
||||
ctx->Extensions.ARB_texture_rg &&
|
||||
|
|
@ -2323,6 +2331,13 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat)
|
|||
_mesa_is_gles3(ctx) /* EXT_color_buffer_float */ )
|
||||
? GL_RED : 0;
|
||||
case GL_RG16F:
|
||||
return ((_mesa_is_desktop_gl(ctx) &&
|
||||
ctx->Extensions.ARB_texture_rg &&
|
||||
ctx->Extensions.ARB_texture_float) ||
|
||||
_mesa_is_gles3(ctx) /* EXT_color_buffer_float */ ||
|
||||
(_mesa_has_EXT_color_buffer_half_float(ctx) &&
|
||||
_mesa_has_EXT_texture_rg(ctx)))
|
||||
? GL_RG : 0;
|
||||
case GL_RG32F:
|
||||
return ((_mesa_is_desktop_gl(ctx) &&
|
||||
ctx->Extensions.ARB_texture_rg &&
|
||||
|
|
@ -2330,13 +2345,17 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat)
|
|||
_mesa_is_gles3(ctx) /* EXT_color_buffer_float */ )
|
||||
? GL_RG : 0;
|
||||
case GL_RGB16F:
|
||||
return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_float) ||
|
||||
(_mesa_is_gles(ctx) && _mesa_has_EXT_color_buffer_half_float(ctx))
|
||||
return (_mesa_has_ARB_texture_float(ctx) ||
|
||||
_mesa_has_EXT_color_buffer_half_float(ctx))
|
||||
? GL_RGB : 0;
|
||||
case GL_RGB32F:
|
||||
return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_float)
|
||||
? GL_RGB : 0;
|
||||
case GL_RGBA16F:
|
||||
return (_mesa_has_ARB_texture_float(ctx) ||
|
||||
_mesa_is_gles3(ctx) ||
|
||||
_mesa_has_EXT_color_buffer_half_float(ctx))
|
||||
? GL_RGBA : 0;
|
||||
case GL_RGBA32F:
|
||||
return ((_mesa_is_desktop_gl(ctx) &&
|
||||
ctx->Extensions.ARB_texture_float) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue