[Mesa-dev] [PATCH 5/6] glsl: Plumb through UBO array indexing expressions

Kenneth Graunke kenneth at whitecape.org
Tue Jul 15 10:59:54 PDT 2014


On Sunday, July 13, 2014 01:52:00 PM Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  src/glsl/lower_ubo_reference.cpp | 50 
++++++++++++++++++++++++----------------
>  1 file changed, 30 insertions(+), 20 deletions(-)
> 
> diff --git a/src/glsl/lower_ubo_reference.cpp 
b/src/glsl/lower_ubo_reference.cpp
> index c49ae34..80edd93 100644
> --- a/src/glsl/lower_ubo_reference.cpp
> +++ b/src/glsl/lower_ubo_reference.cpp
> @@ -69,9 +69,10 @@ public:
>   * \c UniformBlocks array.
>   */
>  static const char *
> -interface_field_name(void *mem_ctx, char *base_name, ir_dereference *d)
> +interface_field_name(void *mem_ctx, char *base_name, ir_dereference *d, 
ir_rvalue **array_index)

Maybe call this nonconst_block_index or nonconst_array_index or such?
It doesn't seem to be set in the constant-indexed case, and the caller uses 
whether it was set to determine whether there was a non-constant array index.

Whatever you think is best.

This series looks good to me:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

However, you might ping Ian - I know he's been working on a bunch of bug fixes 
in the lower_ubo_reference code.  He's also more familiar with this code than 
I am.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140715/c37d7b33/attachment-0001.sig>


More information about the mesa-dev mailing list