[Piglit] [PATCH] Remove #version from variable indexing shader tests.

Stuart Abercrombie sabercrombie at chromium.org
Sun Dec 16 17:22:01 PST 2012


>> Has shader_runner been modified to insert #version?  Without that all of the '#version 120' tests will fail.

Yeah, I made this change a while back.  I verified that these tests still pass.

>> As is, none of these tests will work as ES shaders because they all use built-in variables that don't exist in ES.

That is the next problem I planned to look at once the #version issue
was solved.  We talked about some different approaches.  I was
thinking of abstracting built-in variables in some way, such that
regular GL would be able to run with either built-ins or user-defined
versions, and GLES would always use user-defined ones.

>> I think some of these tests might try variable indexing kinds of arrays that ES does not require be indexable.  See part 5 of appendix A in the GLSL ES 1.00 specification.

Thanks for pointing that out.  It does look as if GL GLSL 1.10
mandates more dynamic index support than GLES GLSL 1.00 does.

>> I think the first step is to modify this generator to generate '#version 100' shaders that will work.  Then we can think about unifying ES and desktop.

>From the start it's been my assumption that some of the shader_runner
tests will not run with GLSL ES.  There are obviously several steps
needed to get there for ones that can be adapted to GLES.  All I'm
looking at here is removing one barrier, which is the non-trivial
mapping between GL and GLES GLSL versions.  I can't see a reason to
keep explicit #version declarations, however many of the tests end up
running with GLES.

Stuart


More information about the Piglit mailing list