glsl: Add and use has_texture_cube_map_array helper

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick 2016-08-17 10:13:24 +01:00
parent c879dbc4e4
commit ef5bad09c4
2 changed files with 8 additions and 4 deletions

View File

@ -334,15 +334,13 @@ static bool
fs_texture_cube_map_array(const _mesa_glsl_parse_state *state)
{
return state->stage == MESA_SHADER_FRAGMENT &&
(state->is_version(400, 0) ||
state->ARB_texture_cube_map_array_enable);
state->has_texture_cube_map_array();
}
static bool
texture_cube_map_array(const _mesa_glsl_parse_state *state)
{
return state->is_version(400, 0) ||
state->ARB_texture_cube_map_array_enable;
return state->has_texture_cube_map_array();
}
static bool

View File

@ -317,6 +317,12 @@ struct _mesa_glsl_parse_state {
MESA_shader_framebuffer_fetch_non_coherent_enable;
}
bool has_texture_cube_map_array() const
{
return ARB_texture_cube_map_array_enable ||
is_version(400, 0);
}
void process_version_directive(YYLTYPE *locp, int version,
const char *ident);