[Piglit] [PATCH] Add "#version 300 es" by glShaderSource when the shader is based on GLSL ES30, and the shader it self do not contained the token "#version 300 es"

Kenneth Graunke kenneth at whitecape.org
Mon Nov 17 17:58:39 PST 2014


On Monday, November 17, 2014 08:41:20 AM Wang, Shuo wrote:
> Because the token "#version 300 es " is necessary with the current 
infrastructure during a GLSL ES30 shader test is added.
> 
> This patch is used to make it more automation, and the infrastructure can 
now adding "#version 300 es" itself, when the GLSL ES30 shader do not include 
the token.
> 
> Signed-off-by: Wang Shuo <shuo.wang at intel.com>
> ---
>  tests/glslparsertest/glslparsertest.c | 26 +++++++++++++++++++-------
>  1 file changed, 19 insertions(+), 7 deletions(-)

For what it's worth, I don't like this plan.

Currently, glslparsertest doesn't add a #version for you implicitly - you have 
to write it as the first line of the shader.  I like this, because there's no 
magic - you write what you mean.  The .vert or .frag file contains a complete 
shader that could be parsed by any tools.  All of our tests already specify 
"#version 300 es" explicitly.

shader_runner does implicitly add a #version for you, but glslparsertest never 
has.

--Ken
-------------- 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/piglit/attachments/20141117/0f0dc838/attachment.sig>


More information about the Piglit mailing list