[Mesa-dev] [PATCH v2 08/10] glsl: A shader cannot redefine or overload built-in functions in GLSL ES 3.00
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Thu Feb 19 01:12:22 PST 2015
On Thursday 19 February 2015 00:59:56 Kenneth Graunke wrote:
> On Thursday, February 19, 2015 09:55:35 AM Samuel Iglesias Gonsalvez wrote:
> > Create a new search function to look for matching built-in functions by
> > name and use it for built-in function redefinition or overload in GLSL ES
> > 3.00.
> >
> > GLSL ES 3.0 spec, chapter 6.1 "Function Definitions", page 71
> >
> > "A shader cannot redefine or overload built-in functions."
> >
> > While in GLSL ES 1.0 specification, chapter 8 "Built-in Functions"
> >
> > "User code can overload the built-in functions but cannot redefine
> > them."
> >
> > So this check is specific to GLSL ES 3.00.
> >
> > This patch fixes the following dEQP tests:
> >
> > dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function_
> > vertex
> > dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function
> > _fragment
> > dEQP-GLES3.functional.shaders.functions.invalid.redefine_builtin_function
> > _vertex
> > dEQP-GLES3.functional.shaders.functions.invalid.redefine_builtin_function
> > _fragment
> >
> > No piglit regressions.
> >
> > Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> > ---
> >
> > src/glsl/ast_to_hir.cpp | 21 +++++++++++++++++++++
> > src/glsl/builtin_functions.cpp | 11 +++++++++++
> > src/glsl/ir.h | 4 ++++
> > 3 files changed, 36 insertions(+)
>
> This looks great - thanks!
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Thanks!! pushed!
Sam
-------------- 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/20150219/5c9107f0/attachment.sig>
More information about the mesa-dev
mailing list