[Mesa-dev] [PATCH] glsl: make ssbo predicate return true when in a GLSL 430 or ESSL 310 shader

Iago Toral itoral at igalia.com
Mon Apr 4 14:13:06 UTC 2016


Instead of doing this, I think we should just call
state->has_shader_storage_buffer_objects(), which does exactly the same.

With that change:

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Sat, 2016-04-02 at 21:51 -0400, Ilia Mirkin wrote:
> I can't tell whether this actually matters, but we're creating function
> signatures with this predicate, so it should probably match when SSBO's
> are available.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/compiler/glsl/lower_ubo_reference.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp
> index d6269f7..3155ab6 100644
> --- a/src/compiler/glsl/lower_ubo_reference.cpp
> +++ b/src/compiler/glsl/lower_ubo_reference.cpp
> @@ -372,7 +372,8 @@ lower_ubo_reference_visitor::ubo_load(void *mem_ctx,
>  static bool
>  shader_storage_buffer_object(const _mesa_glsl_parse_state *state)
>  {
> -   return state->ARB_shader_storage_buffer_object_enable;
> +   return state->ARB_shader_storage_buffer_object_enable ||
> +      state->is_version(430, 310);
>  }
>  
>  uint32_t




More information about the mesa-dev mailing list