[Mesa-dev] [PATCH 1/6] Scaffolding for ARB_shader_bit_encoding.
Kenneth Graunke
kenneth at whitecape.org
Mon Apr 30 13:20:52 PDT 2012
On 04/30/2012 04:19 AM, Olivier Galibert wrote:
> That adds support for activating the extension. It doesn't actually
> *do* anything yet, of course.
>
> Signed-off-by: Olivier Galibert<galibert at pobox.com>
> ---
> src/glsl/builtins/tools/generate_builtins.py | 1 +
> src/glsl/glcpp/glcpp-parse.y | 3 +++
> src/glsl/glsl_parser_extras.cpp | 1 +
> src/glsl/glsl_parser_extras.h | 2 ++
> src/glsl/standalone_scaffolding.cpp | 1 +
> src/mesa/main/extensions.c | 1 +
> src/mesa/main/mtypes.h | 1 +
> src/mesa/main/version.c | 1 +
> src/mesa/state_tracker/st_extensions.c | 4 ++++
> 9 files changed, 15 insertions(+)
>
[snip]
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 1b4bca6..0cfe962 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -592,6 +592,10 @@ void st_init_extensions(struct st_context *st)
> ctx->Extensions.S3_s3tc = GL_FALSE;
> }
>
> + if (ctx->Const.NativeIntegers) {
> + ctx->Extensions.ARB_shader_bit_encoding = GL_TRUE;
> + }
> +
> if (screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY,
> PIPE_SHADER_CAP_MAX_INSTRUCTIONS)> 0) {
> #if 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */
I believe this hunk cause Gallium drivers which support native integers
to advertise ARB_shader_bit_encoding. (Someone please correct me if I'm
wrong...) We usually move the "advertise the extension" patch to the
end, once everything's done.
Otherwise, this patch looks good!
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list