On 26 November 2013 00:02, Francisco Jerez <curroje...@riseup.net> wrote:

> No opaque types may be statically initialized in the shader, all
> opaque variables must be declared uniform or be part of an "in"
> function parameter declaration, no opaque types may be used as the
> return type of a function.
> ---
>  src/glsl/ast_to_hir.cpp | 45 ++++++++++++++++++++++++++-------------------
>  1 file changed, 26 insertions(+), 19 deletions(-)
>

I found two other places that need to be changed to use contains_opaque()
instead of contains_sampler():

- ast_process_structure_or_interface_block() contains a call to
contains_sampler() to make sure that samplers aren't used in interface
blocks.  GLSL 4.40 4.3.9 "Interface Blocks" says that opaque types are not
allowed inside interface blocks.

- ir_dereference::is_lvalue() contains a call to contains_sampler() to make
sure that types containing samplers aren't considered L-values.  GLSL 4.40
4.1.7 "Opaque Types" says that opaque variables cannot be treated as
L-values.

With those additional changes, this patch is:

Reviewed-by: Paul Berry <stereotype...@gmail.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to