mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
mesa/main: validate half-float types
Half-float textures got a bit strange in GLES2; they were added by the OES_texture_float extension, but that added a *different* enum with a *different* value than what ended up in ARB_half_float_pixel and GLES3. So, we need to check separately for these. The former one is only supported on GLES. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
This commit is contained in:
parent
63a2f94962
commit
71cc56e1f7
1 changed files with 9 additions and 0 deletions
|
|
@ -1820,6 +1820,15 @@ valid_texture_type_enum(const struct gl_context *ctx, GLenum type)
|
|||
case GL_FLOAT:
|
||||
return _mesa_is_desktop_gl(ctx) || _mesa_has_OES_texture_float(ctx);
|
||||
|
||||
case GL_HALF_FLOAT:
|
||||
return _mesa_has_ARB_half_float_pixel(ctx) || _mesa_is_gles3(ctx);
|
||||
|
||||
case GL_HALF_FLOAT_OES:
|
||||
/* This is a different enum than the above, that only applies to this
|
||||
* extension
|
||||
*/
|
||||
return _mesa_has_OES_texture_half_float(ctx);
|
||||
|
||||
case GL_BITMAP:
|
||||
return _mesa_is_desktop_gl_compat(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue