[Mesa-dev] [PATCH] glsl: Fix variable_referenced() for vector_{extract,insert} expressions

Markus Wick markus at selfnet.de
Mon Oct 5 11:25:53 PDT 2015

Am 2015-10-05 11:42, schrieb Iago Toral Quiroga:
> We get these when we operate on vector variables with array accessors
> (i.e. things like a[0] where 'a' is a vec4). When we call 
> variable_referenced()
> on these expressions we want to return a reference to 'a' instead of 
> This fixes a problem where we pass a[0] as the first argument to an 
> atomic
> SSBO function that expects a buffer variable. In order to check this, 
> we use
> variable_referenced(), but that is currently returning NULL in this 
> case, since
> the underlying rvalue is a vector_extract expression.
> ---
>  src/glsl/ir.cpp | 16 ++++++++++++++++
>  src/glsl/ir.h   |  2 ++
>  2 files changed, 18 insertions(+)

Tested-by: Markus Wick <markus at selfnet.de>

This fixes my last issue with SSBO on dolphin-emu.


More information about the mesa-dev mailing list