mesa: expose AMD_texture_texture4

because the closed driver exposes it. Tested by piglit.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
Marek Olšák
2018-08-06 02:48:12 -04:00
parent 908f817918
commit 1660f3aa05
5 changed files with 15 additions and 0 deletions
+10
View 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),