[Piglit] [PATCH 4/6] ARB_shader_texture_lod: Replace shell generator with python generator
Kenneth Graunke
kenneth at whitecape.org
Fri May 9 15:31:26 PDT 2014
On 05/09/2014 01:21 PM, Dylan Baker wrote:
> This patch removes tests/spec/ARB_shader_texture_lod/compiler/*, which
> is a shell script that generates a number of tests, and 47 generated
> glsl parser tests.
>
> It replaces them with a python generator (require less code than the
> bash generator), that is run at build time by cmake. That means we don't
> need to check these simple generated tests in VCS.
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
Hi Dylan,
The new generator has a few bugs, and produces different results than
before:
1. get_extensions(mode) typos ARB:
+def get_extensions(mode):
+ """ If this test uses GL_ARB_texture_rectangle add it"""
+ if 'Rect' in mode:
+ return 'GL_ARG_shader_texture_lod GL_ARB_texture_rectangle'
+ return 'GL_ARG_shader_texture_lod'
ARG! :)
2. The config block typos the extension directive:
Your new Python code generates:
* require_extension: ...
While the correct directive is:
* require_extensions: ...
3. coord and lod became uniforms instead of varyings.
I don't think varying vs. uniform should make much of a difference for
these compiler tests, but it appears to be an unintentional change in
behavior.
You can check for differences by:
1. Copying over your script.
2. Changing it to output to arb_shader_texture_lod directories instead
of ARB_shader_texture_lod directories.
3. git checkout f18b916157483fd05faab228058d6225e9c2c0ee~
(the commit prior to this patch)
4. cd tests; python2 ../generated_tests/gen_texture_lod_tests.py
5. git diff
(basically, make your generator overwrite the old tests, then diff.)
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140509/2f927b9b/attachment.sig>
More information about the Piglit
mailing list