aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-06 02:48:12 -0400
committerMarek Olšák <[email protected]>2018-12-04 15:33:29 -0500
commit1660f3aa05f9cdc62787972d7f1905e00580e011 (patch)
treeb3cba1cf79fafd2bac8ed78d47f29422b77125d9
parent908f817918fb14a12887f942b8358a5c648b3f92 (diff)
mesa: expose AMD_texture_texture4
because the closed driver exposes it. Tested by piglit. Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--docs/relnotes/19.0.0.html1
-rw-r--r--src/compiler/glsl/builtin_functions.cpp10
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp1
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h2
-rw-r--r--src/mesa/main/extensions_table.h1
5 files changed, 15 insertions, 0 deletions
diff --git a/docs/relnotes/19.0.0.html b/docs/relnotes/19.0.0.html
index 5a2e96e4eab..f4522b654c6 100644
--- a/docs/relnotes/19.0.0.html
+++ b/docs/relnotes/19.0.0.html
@@ -39,6 +39,7 @@ TBD.
<h2>New features</h2>
<ul>
+<li>GL_AMD_texture_texture4 on all GL 4.0 drivers.</li>
<li>GL_EXT_shader_implicit_conversions on all drivers (ES extension).</li>
<li>GL_EXT_texture_compression_bptc on all GL 4.0 drivers (ES extension).</li>
<li>GL_EXT_texture_compression_rgtc on all GL 3.0 drivers (ES extension).</li>
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index b6018806865..0f747b94757 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -419,6 +419,12 @@ texture_gather_cube_map_array(const _mesa_glsl_parse_state *state)
}
static bool
+texture_texture4(const _mesa_glsl_parse_state *state)
+{
+ return state->AMD_texture_texture4_enable;
+}
+
+static bool
texture_gather_or_es31(const _mesa_glsl_parse_state *state)
{
return state->is_version(400, 310) ||
@@ -2891,6 +2897,10 @@ builtin_builder::create_builtins()
_texture(ir_txd, shader_texture_lod_and_rect, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec4_type, TEX_PROJECT),
NULL);
+ add_function("texture4",
+ _texture(ir_tg4, texture_texture4, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
+ NULL);
+
add_function("textureGather",
_texture(ir_tg4, texture_gather_or_es31, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type),
_texture(ir_tg4, texture_gather_or_es31, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index f9178d8c107..2048a7f9006 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -706,6 +706,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(AMD_gpu_shader_int64),
EXT(AMD_shader_stencil_export),
EXT(AMD_shader_trinary_minmax),
+ EXT(AMD_texture_texture4),
EXT(AMD_vertex_shader_layer),
EXT(AMD_vertex_shader_viewport_index),
EXT(ANDROID_extension_pack_es31a),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 7ceee7469d8..b17b5125e0b 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -786,6 +786,8 @@ struct _mesa_glsl_parse_state {
bool AMD_shader_stencil_export_warn;
bool AMD_shader_trinary_minmax_enable;
bool AMD_shader_trinary_minmax_warn;
+ bool AMD_texture_texture4_enable;
+ bool AMD_texture_texture4_warn;
bool AMD_vertex_shader_layer_enable;
bool AMD_vertex_shader_layer_warn;
bool AMD_vertex_shader_viewport_index_enable;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index d6ab81ee689..7e45ffe4047 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -20,6 +20,7 @@ EXT(AMD_query_buffer_object , ARB_query_buffer_object
EXT(AMD_seamless_cubemap_per_texture , AMD_seamless_cubemap_per_texture , GLL, GLC, x , x , 2009)
EXT(AMD_shader_stencil_export , ARB_shader_stencil_export , GLL, GLC, x , x , 2009)
EXT(AMD_shader_trinary_minmax , dummy_true , GLL, GLC, x , x , 2012)
+EXT(AMD_texture_texture4 , ARB_texture_gather , GLL, GLC, x , x , 2008)
EXT(AMD_vertex_shader_layer , AMD_vertex_shader_layer , GLL, GLC, x , x , 2012)
EXT(AMD_vertex_shader_viewport_index , AMD_vertex_shader_viewport_index , GLL, GLC, x , x , 2012)