[Mesa-dev] [PATCH 4/8] glsl: add ARB_vertex_attrib_64bit support.
Ian Romanick
idr at freedesktop.org
Mon May 4 16:40:30 PDT 2015
On 04/29/2015 06:13 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Just more boilerplate stuff.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/glsl/ast_to_hir.cpp | 3 +++
> src/glsl/glcpp/glcpp-parse.y | 3 +++
> src/glsl/glsl_parser_extras.cpp | 1 +
> src/glsl/glsl_parser_extras.h | 2 ++
> 4 files changed, 9 insertions(+)
>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 18b82e3..d1a5eaf 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -3537,6 +3537,9 @@ ast_declarator_list::hir(exec_list *instructions,
> switch (check_type->base_type) {
> case GLSL_TYPE_FLOAT:
> break;
> + case GLSL_TYPE_DOUBLE:
> + if (state->is_version(410, 0) || state->ARB_vertex_attrib_64bit_enable)
> + break;
If you fall through here, it will bail from the state->is_version(120,
300) below. That's not right.
> case GLSL_TYPE_UINT:
> case GLSL_TYPE_INT:
> if (state->is_version(120, 300))
> diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
> index cfceca6..a11b6b2 100644
> --- a/src/glsl/glcpp/glcpp-parse.y
> +++ b/src/glsl/glcpp/glcpp-parse.y
> @@ -2448,6 +2448,9 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
> if (extensions->ARB_gpu_shader_fp64)
> add_builtin_define(parser, "GL_ARB_gpu_shader_fp64", 1);
>
> + if (extensions->ARB_vertex_attrib_64bit)
> + add_builtin_define(parser, "GL_ARB_vertex_attrib_64bit", 1);
> +
> if (extensions->AMD_vertex_shader_layer)
> add_builtin_define(parser, "GL_AMD_vertex_shader_layer", 1);
>
> diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
> index 0aa3c54..67c0f58 100644
> --- a/src/glsl/glsl_parser_extras.cpp
> +++ b/src/glsl/glsl_parser_extras.cpp
> @@ -565,6 +565,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
> EXT(ARB_texture_query_lod, true, false, ARB_texture_query_lod),
> EXT(ARB_texture_rectangle, true, false, dummy_true),
> EXT(ARB_uniform_buffer_object, true, false, ARB_uniform_buffer_object),
> + EXT(ARB_vertex_attrib_64bit, true, false, ARB_vertex_attrib_64bit),
> EXT(ARB_viewport_array, true, false, ARB_viewport_array),
>
> /* KHR extensions go here, sorted alphabetically.
> diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
> index dae7864..c3b9098 100644
> --- a/src/glsl/glsl_parser_extras.h
> +++ b/src/glsl/glsl_parser_extras.h
> @@ -458,6 +458,8 @@ struct _mesa_glsl_parse_state {
> bool ARB_texture_rectangle_warn;
> bool ARB_uniform_buffer_object_enable;
> bool ARB_uniform_buffer_object_warn;
> + bool ARB_vertex_attrib_64bit_enable;
> + bool ARB_vertex_attrib_64bit_warn;
> bool ARB_viewport_array_enable;
> bool ARB_viewport_array_warn;
>
>
More information about the mesa-dev
mailing list