[Mesa-dev] [PATCH 2/2] mesa: enable ARB_gpu_shader5 in compat
Benedikt Schemmer
ben at besd.de
Fri May 18 17:27:03 UTC 2018
Am I on the right track to assume that Timothy's patch should read
+EXT(ARB_gpu_shader5 , ARB_gpu_shader5 , 32, 40, x , x , 2010)
to give GL_ARB_gpu_shader5 a minimum required legacy OpenGL version of 3.2 and core 4.0 as per spec?
I wanted to ask: is ctx->Version >= ext->version[ctx->API] evaluated every time a context is created or just once at boot time?
But it seems to be evaluated every time a context is created and this is actually more like what I expect from the
version override
MESA_GL_VERSION_OVERRIDE=4.0 glxinfo | grep shader5
GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, GL_ARB_gpu_shader_int64,
GL_ARB_gpu_shader5, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex,
GL_EXT_gpu_shader5, GL_EXT_map_buffer_range, GL_EXT_memory_object,
GL_OES_get_program_binary, GL_OES_gpu_shader5, GL_OES_mapbuffer,
MESA_GL_VERSION_OVERRIDE=3.2 glxinfo | grep shader5
GL_ARB_gpu_shader5, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex,
GL_EXT_gpu_shader5, GL_EXT_map_buffer_range, GL_EXT_memory_object,
GL_OES_get_program_binary, GL_OES_gpu_shader5, GL_OES_mapbuffer,
MESA_GL_VERSION_OVERRIDE=3.0 glxinfo | grep shader5
GL_EXT_gpu_shader5, GL_EXT_map_buffer_range, GL_EXT_memory_object,
GL_OES_get_program_binary, GL_OES_gpu_shader5, GL_OES_mapbuffer,
---
from extensions.h:
/** Checks if the context supports a user-facing extension */
#define EXT(name_str, driver_cap, ...) \
static inline bool \
_mesa_has_##name_str(const struct gl_context *ctx) \
{ \
return ctx->Extensions.driver_cap && (ctx->Extensions.Version >= \ // equal to ctx->Version
_mesa_extension_table[MESA_EXTENSION_##name_str].version[ctx->API]); \
}
#include "extensions_table.h"
#undef EXT
Am 18.05.2018 um 14:35 schrieb Ilia Mirkin:
> On Fri, May 18, 2018 at 8:20 AM, Benedikt Schemmer <ben at besd.de> wrote:
>> Indeed it does, I've written a little test program where I can request specific OpenGL versions.
>> I think that used to work, now if I request anything <= 3.1 I get 3.1 if request >= 3.2 I get 4.5.
>> GL_ARB_gpu_shader5 is available in all of them.
>>
>> If I force the GL version the version string changes and I actually have to request a version lower than that.
>> Still GL_ARB_gpu_shader5 is available in all of them.
>>
>> If I force the GLSL version to anything lower than 400, GL_ARB_gpu_shader5 goes missing.
>>
>> That's not the intended behavior is it?
>
> Forcing versions via env vars isn't well-supported, esp around the
> edges like this. Feel free to send patches to fix it.
>
More information about the mesa-dev
mailing list