mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
mesa/main: do not check for ARB_texture_buffer_object for GL 3.1
While OpenGL 3.1 does require texture buffer objects, the ARB spec for this requires support for texture buffers with alpha, luminance, luminance-alpha and intensity formats in addition to RGBA formats. The version of texture buffer objects that ended up in the OpenGL spec (even in the compatibility spec) does not require these formats. But, we don't even need to check this, because this is already included in the GLSL 1.40 requirement that's also checked. So this shouldn't make us expose GL 3.1 in cases where it isn't supported in the first place. Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
This commit is contained in:
parent
3039899d5b
commit
70f1603125
5 changed files with 13 additions and 6 deletions
|
|
@ -76,7 +76,7 @@ GL 3.1, GLSL 1.40 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe,
|
||||||
GL_ARB_copy_buffer (Buffer copying) DONE (v3d, vc4, lima, crocus)
|
GL_ARB_copy_buffer (Buffer copying) DONE (v3d, vc4, lima, crocus)
|
||||||
GL_NV_primitive_restart (Primitive restart) DONE (v3d, crocus)
|
GL_NV_primitive_restart (Primitive restart) DONE (v3d, crocus)
|
||||||
16 vertex texture image units DONE (v3d)
|
16 vertex texture image units DONE (v3d)
|
||||||
GL_ARB_texture_buffer_object (Texture buffer objs) DONE (v3d)
|
Texture buffer objs DONE (v3d)
|
||||||
GL_ARB_texture_rectangle (Rectangular textures) DONE (v3d, vc4, lima, crocus, etnaviv)
|
GL_ARB_texture_rectangle (Rectangular textures) DONE (v3d, vc4, lima, crocus, etnaviv)
|
||||||
GL_ARB_uniform_buffer_object (Uniform buffer objs) DONE (v3d, crocus)
|
GL_ARB_uniform_buffer_object (Uniform buffer objs) DONE (v3d, crocus)
|
||||||
GL_EXT_texture_snorm (Signed normalized textures) DONE (v3d, crocus, etnaviv/HALTI1)
|
GL_EXT_texture_snorm (Signed normalized textures) DONE (v3d, crocus, etnaviv/HALTI1)
|
||||||
|
|
@ -316,6 +316,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
|
||||||
GL_ARB_sparse_texture DONE (radeonsi/gfx9+, zink)
|
GL_ARB_sparse_texture DONE (radeonsi/gfx9+, zink)
|
||||||
GL_ARB_sparse_texture2 DONE (radeonsi/gfx9+, zink)
|
GL_ARB_sparse_texture2 DONE (radeonsi/gfx9+, zink)
|
||||||
GL_ARB_sparse_texture_clamp DONE (radeonsi/gfx9+, zink)
|
GL_ARB_sparse_texture_clamp DONE (radeonsi/gfx9+, zink)
|
||||||
|
GL_ARB_texture_buffer_object DONE (freedreno, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, virgl, zink, d3d12, panfrost, asahi, iris, crocus/gen6+, v3d)
|
||||||
GL_ARB_texture_filter_minmax DONE (freedreno/a6xx, iris/gen9+, llvmpipe, nvc0/gm200+, zink)
|
GL_ARB_texture_filter_minmax DONE (freedreno/a6xx, iris/gen9+, llvmpipe, nvc0/gm200+, zink)
|
||||||
GL_ARM_shader_framebuffer_fetch_depth_stencil DONE (llvmpipe)
|
GL_ARM_shader_framebuffer_fetch_depth_stencil DONE (llvmpipe)
|
||||||
GL_EXT_shader_framebuffer_fetch DONE (freedreno/a6xx, iris/gen9+, llvmpipe, panfrost, virgl, zink, asahi, v3d)
|
GL_EXT_shader_framebuffer_fetch DONE (freedreno/a6xx, iris/gen9+, llvmpipe, panfrost, virgl, zink, asahi, v3d)
|
||||||
|
|
|
||||||
|
|
@ -487,7 +487,8 @@ static inline bool
|
||||||
_mesa_has_texture_buffer_object(const struct gl_context *ctx)
|
_mesa_has_texture_buffer_object(const struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
return _mesa_has_ARB_texture_buffer_object(ctx) ||
|
return _mesa_has_ARB_texture_buffer_object(ctx) ||
|
||||||
_mesa_has_OES_texture_buffer(ctx);
|
_mesa_has_OES_texture_buffer(ctx) ||
|
||||||
|
(_mesa_is_desktop_gl(ctx) && ctx->Version >= 31);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,7 @@ enum value_extra {
|
||||||
EXTRA_EXT_FB_NO_ATTACH_GS,
|
EXTRA_EXT_FB_NO_ATTACH_GS,
|
||||||
EXTRA_EXT_ES_GS,
|
EXTRA_EXT_ES_GS,
|
||||||
EXTRA_EXT_PROVOKING_VERTEX_32,
|
EXTRA_EXT_PROVOKING_VERTEX_32,
|
||||||
|
EXTRA_EXT_TBO,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NO_EXTRA NULL
|
#define NO_EXTRA NULL
|
||||||
|
|
@ -379,7 +380,7 @@ static const int extra_GLSL_130_es3_gpushader4[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int extra_texture_buffer_object[] = {
|
static const int extra_texture_buffer_object[] = {
|
||||||
EXT(ARB_texture_buffer_object),
|
EXTRA_EXT_TBO,
|
||||||
EXTRA_END
|
EXTRA_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1582,6 +1583,11 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
|
||||||
if (_mesa_is_desktop_gl_compat(ctx) || version == 32)
|
if (_mesa_is_desktop_gl_compat(ctx) || version == 32)
|
||||||
api_found = ctx->Extensions.EXT_provoking_vertex;
|
api_found = ctx->Extensions.EXT_provoking_vertex;
|
||||||
break;
|
break;
|
||||||
|
case EXTRA_EXT_TBO:
|
||||||
|
api_check = GL_TRUE;
|
||||||
|
if (_mesa_has_texture_buffer_object(ctx))
|
||||||
|
api_found = GL_TRUE;
|
||||||
|
break;
|
||||||
case EXTRA_END:
|
case EXTRA_END:
|
||||||
break;
|
break;
|
||||||
default: /* *e is a offset into the extension struct */
|
default: /* *e is a offset into the extension struct */
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,6 @@ compute_version(const struct gl_extensions *extensions,
|
||||||
const bool ver_3_1 = (ver_3_0 &&
|
const bool ver_3_1 = (ver_3_0 &&
|
||||||
consts->GLSLVersion >= 140 &&
|
consts->GLSLVersion >= 140 &&
|
||||||
extensions->ARB_draw_instanced &&
|
extensions->ARB_draw_instanced &&
|
||||||
extensions->ARB_texture_buffer_object &&
|
|
||||||
extensions->ARB_uniform_buffer_object &&
|
extensions->ARB_uniform_buffer_object &&
|
||||||
extensions->EXT_texture_snorm &&
|
extensions->EXT_texture_snorm &&
|
||||||
extensions->NV_primitive_restart &&
|
extensions->NV_primitive_restart &&
|
||||||
|
|
|
||||||
|
|
@ -1567,7 +1567,7 @@ void st_init_extensions(struct pipe_screen *screen,
|
||||||
screen->caps.buffer_sampler_view_rgba_only)
|
screen->caps.buffer_sampler_view_rgba_only)
|
||||||
extensions->ARB_texture_buffer_object = GL_FALSE;
|
extensions->ARB_texture_buffer_object = GL_FALSE;
|
||||||
|
|
||||||
if (extensions->ARB_texture_buffer_object) {
|
if (screen->caps.texture_buffer_objects) {
|
||||||
consts->MaxTextureBufferSize =
|
consts->MaxTextureBufferSize =
|
||||||
screen->caps.max_texel_buffer_elements;
|
screen->caps.max_texel_buffer_elements;
|
||||||
consts->TextureBufferOffsetAlignment =
|
consts->TextureBufferOffsetAlignment =
|
||||||
|
|
@ -1583,7 +1583,7 @@ void st_init_extensions(struct pipe_screen *screen,
|
||||||
|
|
||||||
extensions->OES_texture_buffer =
|
extensions->OES_texture_buffer =
|
||||||
consts->Program[MESA_SHADER_COMPUTE].MaxImageUniforms &&
|
consts->Program[MESA_SHADER_COMPUTE].MaxImageUniforms &&
|
||||||
extensions->ARB_texture_buffer_object &&
|
screen->caps.texture_buffer_objects &&
|
||||||
extensions->ARB_texture_buffer_range &&
|
extensions->ARB_texture_buffer_range &&
|
||||||
extensions->ARB_texture_buffer_object_rgb32;
|
extensions->ARB_texture_buffer_object_rgb32;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue