From 042eee2067dc937e8d7e9b54829c5c4b8706dc27 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 21 Mar 2017 12:42:47 +0100 Subject: [PATCH] glsl: add ARB_bindless_texture enable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This also adds the extension to the standalone GLSL compiler. Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle --- src/compiler/glsl/glsl_parser_extras.cpp | 1 + src/compiler/glsl/glsl_parser_extras.h | 7 +++++++ src/compiler/glsl/standalone_scaffolding.cpp | 1 + 3 files changed, 9 insertions(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index eb12efff8aa..b7303aba421 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -607,6 +607,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(ARB_ES3_1_compatibility), EXT(ARB_ES3_2_compatibility), EXT(ARB_arrays_of_arrays), + EXT(ARB_bindless_texture), EXT(ARB_compute_shader), EXT(ARB_compute_variable_group_size), EXT(ARB_conservative_depth), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 6c3bc8a9173..6045a6128e6 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -334,6 +334,11 @@ struct _mesa_glsl_parse_state { return ARB_shader_image_load_store_enable || is_version(420, 310); } + bool has_bindless() const + { + return ARB_bindless_texture_enable; + } + void process_version_directive(YYLTYPE *locp, int version, const char *ident); @@ -592,6 +597,8 @@ struct _mesa_glsl_parse_state { bool ARB_ES3_2_compatibility_warn; bool ARB_arrays_of_arrays_enable; bool ARB_arrays_of_arrays_warn; + bool ARB_bindless_texture_enable; + bool ARB_bindless_texture_warn; bool ARB_compute_shader_enable; bool ARB_compute_shader_warn; bool ARB_compute_variable_group_size_enable; diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/standalone_scaffolding.cpp index 5f1b2d0c312..d85650ab7ae 100644 --- a/src/compiler/glsl/standalone_scaffolding.cpp +++ b/src/compiler/glsl/standalone_scaffolding.cpp @@ -196,6 +196,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) ctx->Extensions.ARB_uniform_buffer_object = true; ctx->Extensions.ARB_viewport_array = true; ctx->Extensions.ARB_cull_distance = true; + ctx->Extensions.ARB_bindless_texture = true; ctx->Extensions.OES_EGL_image_external = true; ctx->Extensions.OES_standard_derivatives = true; -- 2.30.2