[Mesa-dev] [PATCH] glsl: enable conservative depth, AoA, ssbo based on GLSL version
Timothy Arceri
t_arceri at yahoo.com.au
Fri Jul 24 19:25:45 PDT 2015
On Fri, 2015-07-24 at 18:49 -0400, Ilia Mirkin wrote:
> Add in missed version checks in the GLSL parser
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/glsl/glsl_parser.yy | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 4cce5b8..9ddf5ed 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1166,7 +1166,8 @@ layout_qualifier_id:
> /* Layout qualifiers for AMD/ARB_conservative_depth. */
> if (!$$.flags.i &&
> (state->AMD_conservative_depth_enable ||
> - state->ARB_conservative_depth_enable)) {
> + state->ARB_conservative_depth_enable ||
> + state->is_version(420, 0))) {
> if (match_layout_qualifier($1, "depth_any", state) == 0) {
> $$.flags.q.depth_any = 1;
> } else if (match_layout_qualifier($1, "depth_greater", state) ==
> 0) {
> @@ -1460,7 +1461,7 @@ layout_qualifier_id:
>
> if ((state->has_420pack() ||
> state->has_atomic_counters() ||
> - state->ARB_shader_storage_buffer_object_enable) &&
> + state->has_shader_storage_buffer_objects()) &&
> match_layout_qualifier("binding", $1, state) == 0) {
> $$.flags.q.explicit_binding = 1;
> $$.binding = $3;
> @@ -1962,7 +1963,7 @@ array_specifier:
> {
> $$ = $1;
>
> - if (!state->ARB_arrays_of_arrays_enable) {
> + if (!state->ARB_arrays_of_arrays_enable && !state->is_version(430,
> 310)) {
> _mesa_glsl_error(& @1, state,
> "GL_ARB_arrays_of_arrays "
> "required for defining arrays of arrays");
> @@ -1976,7 +1977,7 @@ array_specifier:
> {
> $$ = $1;
>
> - if (!state->ARB_arrays_of_arrays_enable) {
> + if (!state->ARB_arrays_of_arrays_enable && !state->is_version(430,
> 310)) {
> _mesa_glsl_error(& @1, state,
> "GL_ARB_arrays_of_arrays "
> "required for defining arrays of arrays");
I would rather push this patch for AoA I can push it if you are happy with it:
http://lists.freedesktop.org/archives/mesa-dev/2015-July/089178.html
More information about the mesa-dev
mailing list