mesa: expose AMD_texture_texture4
authorMarek Olšák <marek.olsak@amd.com>
Mon, 6 Aug 2018 06:48:12 +0000 (02:48 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 4 Dec 2018 20:33:29 +0000 (15:33 -0500)
because the closed driver exposes it. Tested by piglit.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
docs/relnotes/19.0.0.html
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h
src/mesa/main/extensions_table.h

index 5a2e96e4eab20b5b116c7be1ba6724c0f2cbcb06..f4522b654c6fad4741cc8b201c0932be0e59d452 100644 (file)
@@ -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>
index b6018806865054d8f7b6a1340e63605acf584664..0f747b9475713a4f2fcd5a16cb131656d5175305 100644 (file)
@@ -418,6 +418,12 @@ texture_gather_cube_map_array(const _mesa_glsl_parse_state *state)
           state->OES_texture_cube_map_array_enable;
 }
 
+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)
 {
@@ -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),
index f9178d8c1078c1c8f3b0ec5ccf35d68b22fcad0c..2048a7f9006d654cc04e80229192a1711003d5f2 100644 (file)
@@ -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),
index 7ceee7469d8199aa6e5a6acc82c7ae18de686191..b17b5125e0b983e87b3d3ad9ed3882b48b0ae36d 100644 (file)
@@ -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;
index d6ab81ee689d3cfb20f10e33c82b23ff6985147e..7e45ffe4047c5892f9e9aaa2937871b47dcedf30 100644 (file)
@@ -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)