<div dir="ltr">On 26 November 2013 00:02, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">No opaque types may be statically initialized in the shader, all<br>
opaque variables must be declared uniform or be part of an "in"<br>
function parameter declaration, no opaque types may be used as the<br>
return type of a function.<br>
---<br>
src/glsl/ast_to_hir.cpp | 45 ++++++++++++++++++++++++++-------------------<br>
1 file changed, 26 insertions(+), 19 deletions(-)<br></blockquote><div><br></div><div>I found two other places that need to be changed to use contains_opaque() instead of contains_sampler():<br><br>- 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.<br>
<br>- 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.<br>
<br></div><div>With those additional changes, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div></div></div></div>