Commit 30b3cd5c authored by Ian Romanick's avatar Ian Romanick

Tests and framework for exercising the assembly shader compiler

parent 54562c7b
......@@ -5,6 +5,7 @@ add_subdirectory (fbo)
add_subdirectory (general)
add_subdirectory (glean)
add_subdirectory (glslparsertest)
add_subdirectory (asmparsertest)
add_subdirectory (mesa)
add_subdirectory (shaders)
add_subdirectory (texturing)
......@@ -328,11 +328,150 @@ glslparsertest['while1.frag'] = PlainExecTest([testBinDir + 'glslparsertest', 't
glslparsertest['while2.frag'] = PlainExecTest([testBinDir + 'glslparsertest', 'tests/glslparsertest/shaders/while2.frag', 'fail'])
glslparsertest['TernaryOp.frag'] = PlainExecTest([testBinDir + 'glslparsertest', 'tests/glslparsertest/shaders/TernaryOp.frag', 'fail'])
asmparsertest = Group()
asmparsertest['ARBfp1.0/abs.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/abs.txt'])
asmparsertest['ARBfp1.0/fog-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/fog-01.txt'])
asmparsertest['ARBfp1.0/fog-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/fog-02.txt'])
asmparsertest['ARBfp1.0/fog-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/fog-03.txt'])
asmparsertest['ARBfp1.0/fog-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/fog-04.txt'])
asmparsertest['ARBfp1.0/precision_hint-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/precision_hint-01.txt'])
asmparsertest['ARBfp1.0/precision_hint-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/precision_hint-02.txt'])
asmparsertest['ARBfp1.0/precision_hint-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/precision_hint-03.txt'])
asmparsertest['ARBfp1.0/precision_hint-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/precision_hint-04.txt'])
asmparsertest['ARBfp1.0/precision_hint-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/precision_hint-05.txt'])
asmparsertest['ARBfp1.0/result-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-01.txt'])
asmparsertest['ARBfp1.0/result-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-02.txt'])
asmparsertest['ARBfp1.0/result-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-03.txt'])
asmparsertest['ARBfp1.0/result-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-04.txt'])
asmparsertest['ARBfp1.0/result-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-05.txt'])
asmparsertest['ARBfp1.0/result-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-06.txt'])
asmparsertest['ARBfp1.0/result-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-07.txt'])
asmparsertest['ARBfp1.0/result-08.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-08.txt'])
asmparsertest['ARBfp1.0/result-09.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-09.txt'])
asmparsertest['ARBfp1.0/result-10.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-10.txt'])
asmparsertest['ARBfp1.0/result-11.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/result-11.txt'])
asmparsertest['ARBfp1.0/sincos-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/sincos-01.txt'])
asmparsertest['ARBfp1.0/sincos-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/sincos-02.txt'])
asmparsertest['ARBfp1.0/sincos-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/sincos-03.txt'])
asmparsertest['ARBfp1.0/sincos-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/sincos-04.txt'])
asmparsertest['ARBfp1.0/swz-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/swz-01.txt'])
asmparsertest['ARBfp1.0/swz-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/swz-02.txt'])
asmparsertest['ARBfp1.0/swz-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/swz-03.txt'])
asmparsertest['ARBfp1.0/swz-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/swz-04.txt'])
asmparsertest['ARBfp1.0/swz-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBfp1.0', 'tests/asmparsertest/shaders/ARBfp1.0/swz-05.txt'])
asmparsertest['ARBvp1.0/abs.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/abs.txt'])
asmparsertest['ARBvp1.0/address-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-01.txt'])
asmparsertest['ARBvp1.0/address-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-02.txt'])
asmparsertest['ARBvp1.0/address-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-03.txt'])
asmparsertest['ARBvp1.0/address-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-04.txt'])
asmparsertest['ARBvp1.0/address-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-05.txt'])
asmparsertest['ARBvp1.0/address-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-06.txt'])
asmparsertest['ARBvp1.0/address-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-07.txt'])
asmparsertest['ARBvp1.0/address-08.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-08.txt'])
asmparsertest['ARBvp1.0/address-09.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-09.txt'])
asmparsertest['ARBvp1.0/address-10.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-10.txt'])
asmparsertest['ARBvp1.0/address-11.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/address-11.txt'])
asmparsertest['ARBvp1.0/add.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/add.txt'])
asmparsertest['ARBvp1.0/alias-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/alias-01.txt'])
asmparsertest['ARBvp1.0/alias-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/alias-02.txt'])
asmparsertest['ARBvp1.0/all_state-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-01.txt'])
asmparsertest['ARBvp1.0/all_state-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-02.txt'])
asmparsertest['ARBvp1.0/all_state-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-03.txt'])
asmparsertest['ARBvp1.0/all_state-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-04.txt'])
asmparsertest['ARBvp1.0/all_state-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-05.txt'])
asmparsertest['ARBvp1.0/all_state-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-06.txt'])
asmparsertest['ARBvp1.0/all_state-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-07.txt'])
asmparsertest['ARBvp1.0/all_state-08.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-08.txt'])
asmparsertest['ARBvp1.0/all_state-09.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-09.txt'])
asmparsertest['ARBvp1.0/all_state-10.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-10.txt'])
asmparsertest['ARBvp1.0/all_state-11.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-11.txt'])
asmparsertest['ARBvp1.0/all_state-12.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-12.txt'])
asmparsertest['ARBvp1.0/all_state-13.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-13.txt'])
asmparsertest['ARBvp1.0/all_state-14.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-14.txt'])
asmparsertest['ARBvp1.0/all_state-15.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-15.txt'])
asmparsertest['ARBvp1.0/all_state-16.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-16.txt'])
asmparsertest['ARBvp1.0/all_state-17.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-17.txt'])
asmparsertest['ARBvp1.0/all_state-18.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/all_state-18.txt'])
asmparsertest['ARBvp1.0/arbfp.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/arbfp.txt'])
asmparsertest['ARBvp1.0/arl.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/arl.txt'])
asmparsertest['ARBvp1.0/array_range-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-01.txt'])
asmparsertest['ARBvp1.0/array_range-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-02.txt'])
asmparsertest['ARBvp1.0/array_range-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-03.txt'])
asmparsertest['ARBvp1.0/array_range-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-04.txt'])
asmparsertest['ARBvp1.0/array_range-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-05.txt'])
asmparsertest['ARBvp1.0/array_range-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-06.txt'])
asmparsertest['ARBvp1.0/array_range-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/array_range-07.txt'])
asmparsertest['ARBvp1.0/attrib-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/attrib-01.txt'])
asmparsertest['ARBvp1.0/attrib-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/attrib-02.txt'])
asmparsertest['ARBvp1.0/attrib-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/attrib-03.txt'])
asmparsertest['ARBvp1.0/attrib-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/attrib-04.txt'])
asmparsertest['ARBvp1.0/dp3.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/dp3.txt'])
asmparsertest['ARBvp1.0/dp4.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/dp4.txt'])
asmparsertest['ARBvp1.0/dph.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/dph.txt'])
asmparsertest['ARBvp1.0/dst.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/dst.txt'])
asmparsertest['ARBvp1.0/ex2.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/ex2.txt'])
asmparsertest['ARBvp1.0/flr.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/flr.txt'])
asmparsertest['ARBvp1.0/frc.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/frc.txt'])
asmparsertest['ARBvp1.0/issue-70.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/issue-70.txt'])
asmparsertest['ARBvp1.0/issue-74.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/issue-74.txt'])
asmparsertest['ARBvp1.0/issue-75.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/issue-75.txt'])
asmparsertest['ARBvp1.0/lg2.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/lg2.txt'])
asmparsertest['ARBvp1.0/lit.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/lit.txt'])
asmparsertest['ARBvp1.0/mad.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/mad.txt'])
asmparsertest['ARBvp1.0/matrix-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/matrix-01.txt'])
asmparsertest['ARBvp1.0/max.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/max.txt'])
asmparsertest['ARBvp1.0/min.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/min.txt'])
asmparsertest['ARBvp1.0/mov.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/mov.txt'])
asmparsertest['ARBvp1.0/mul.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/mul.txt'])
asmparsertest['ARBvp1.0/numbers-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-01.txt'])
asmparsertest['ARBvp1.0/numbers-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-02.txt'])
asmparsertest['ARBvp1.0/numbers-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-03.txt'])
asmparsertest['ARBvp1.0/numbers-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-04.txt'])
asmparsertest['ARBvp1.0/numbers-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-05.txt'])
asmparsertest['ARBvp1.0/numbers-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-06.txt'])
asmparsertest['ARBvp1.0/numbers-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/numbers-07.txt'])
asmparsertest['ARBvp1.0/output-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/output-01.txt'])
asmparsertest['ARBvp1.0/output-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/output-02.txt'])
asmparsertest['ARBvp1.0/param-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-01.txt'])
asmparsertest['ARBvp1.0/param-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-02.txt'])
asmparsertest['ARBvp1.0/param-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-03.txt'])
asmparsertest['ARBvp1.0/param-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-04.txt'])
asmparsertest['ARBvp1.0/param-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-05.txt'])
asmparsertest['ARBvp1.0/param-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-06.txt'])
asmparsertest['ARBvp1.0/param-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-07.txt'])
asmparsertest['ARBvp1.0/param-08.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/param-08.txt'])
asmparsertest['ARBvp1.0/position_invariant-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/position_invariant-01.txt'])
asmparsertest['ARBvp1.0/position_invariant-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/position_invariant-02.txt'])
asmparsertest['ARBvp1.0/pow.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/pow.txt'])
asmparsertest['ARBvp1.0/rcp-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-01.txt'])
asmparsertest['ARBvp1.0/rcp-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-02.txt'])
asmparsertest['ARBvp1.0/rcp-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-03.txt'])
asmparsertest['ARBvp1.0/rcp-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-04.txt'])
asmparsertest['ARBvp1.0/rcp-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-05.txt'])
asmparsertest['ARBvp1.0/rcp-06.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-06.txt'])
asmparsertest['ARBvp1.0/rcp-07.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rcp-07.txt'])
asmparsertest['ARBvp1.0/reserved_word-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/reserved_word-01.txt'])
asmparsertest['ARBvp1.0/result-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/result-01.txt'])
asmparsertest['ARBvp1.0/result-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/result-02.txt'])
asmparsertest['ARBvp1.0/rsq.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/rsq.txt'])
asmparsertest['ARBvp1.0/sge.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/sge.txt'])
asmparsertest['ARBvp1.0/slt.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/slt.txt'])
asmparsertest['ARBvp1.0/sub.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/sub.txt'])
asmparsertest['ARBvp1.0/swz-01.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/swz-01.txt'])
asmparsertest['ARBvp1.0/swz-02.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/swz-02.txt'])
asmparsertest['ARBvp1.0/swz-03.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/swz-03.txt'])
asmparsertest['ARBvp1.0/swz-04.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/swz-04.txt'])
asmparsertest['ARBvp1.0/swz-05.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/swz-05.txt'])
asmparsertest['ARBvp1.0/xpd.txt'] = PlainExecTest([testBinDir + 'asmparsertest', 'ARBvp1.0', 'tests/asmparsertest/shaders/ARBvp1.0/xpd.txt'])
profile.tests['bugs'] = bugs
profile.tests['general'] = general
profile.tests['fbo'] = fbo
profile.tests['glean'] = glean
profile.tests['glslparsertest'] = glslparsertest
profile.tests['asmparsertest'] = asmparsertest
profile.tests['mesa'] = mesa
profile.tests['shaders'] = shaders
profile.tests['texturing'] = texturing
......
include_directories(
${OPENGL_INCLUDE_PATH}
${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
${GLEW_INCLUDE_DIR}
)
link_directories (
${piglit_SOURCE_DIR}/tests/util
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${GLUT_glut_LIBRARY}
${GLEW_glew_LIBRARY}
)
add_executable (asmparsertest asmparsertest.c)
/*
* Copyright © 2009 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include "piglit-util.h"
#ifndef TRUE
#define FALSE 0
#define TRUE (!FALSE)
#endif
int automatic = FALSE;
void
compile(const char *filename, GLenum target, int use_ARB)
{
GLenum err;
GLuint prognum;
char *buf;
char *ptr;
unsigned sz;
int expected_fail;
if (!automatic) {
printf("%s:\n", filename);
}
buf = piglit_load_text_file(filename, &sz);
if (buf == NULL) {
piglit_report_result(PIGLIT_FAILURE);
}
/* Scan the program source looking for two different things. First,
* look for comments of the form '# FAIL'. This signals that the
* program is expected to fail compilation. Second, look for comments
* of the form '# REQUIRE GL_XXX_xxxx_xxxx'. This signals that the
* program will only compile if some OpenGL extension is available.
*/
expected_fail = (strstr(buf, "# FAIL") != NULL);
ptr = buf;
while (ptr != NULL) {
ptr = strstr(ptr, "# REQUIRE ");
if (ptr != NULL) {
char extension[128];
unsigned i;
ptr += strlen("# REQUIRE ");
for (i = 0; !isspace(ptr[i]) && (ptr[i] != '\0'); i++) {
extension[i] = ptr[i];
}
extension[i] = '\0';
if (!glutExtensionSupported(extension)) {
piglit_report_result(PIGLIT_SKIP);
free(buf);
return;
}
}
}
/* The use_ARB flag is used instead of the target because
* GL_VERTEX_PROGRAM_ARB and GL_VERTEX_PROGRAM_NV have the same value.
*/
if (use_ARB) {
glEnable(target);
glGenProgramsARB(1, &prognum);
glBindProgramARB(target, prognum);
glProgramStringARB(target, GL_PROGRAM_FORMAT_ASCII_ARB, sz,
(const GLubyte *) buf);
} else {
glGenProgramsNV(1, &prognum);
glBindProgramNV(target, prognum);
glLoadProgramNV(target, prognum, sz, (const GLubyte *) buf);
}
err = glGetError();
if (err != GL_NO_ERROR) {
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
if (!automatic) {
printf("glGetError = 0x%04x\n", err);
printf("errorpos: %d\n", errorpos);
printf("%s\n",
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
}
free(buf);
if ((err == GL_NO_ERROR) != (expected_fail == FALSE)) {
piglit_report_result(PIGLIT_FAILURE);
}
}
int
main(int argc, char **argv)
{
GLenum target;
unsigned i;
int use_ARB;
glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(250, 250);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
glutCreateWindow("assembler test");
glewInit();
i = 1;
if (((argc - 1) >= 1) && (strcmp(argv[i], "-auto") == 0)) {
automatic = TRUE;
i++;
}
if ((argc - i) < 2) {
piglit_report_result(PIGLIT_FAILURE);
}
use_ARB = 1;
if (strcmp(argv[1], "ARBvp1.0") == 0) {
target = GL_VERTEX_PROGRAM_ARB;
piglit_require_extension("GL_ARB_vertex_program");
} else if (strcmp(argv[1], "ARBfp1.0") == 0) {
target = GL_FRAGMENT_PROGRAM_ARB;
piglit_require_extension("GL_ARB_fragment_program");
} else if (strcmp(argv[1], "NVvp1.0") == 0) {
target = GL_VERTEX_PROGRAM_NV;
piglit_require_extension("GL_NV_vertex_program");
use_ARB = 0;
} else if (strcmp(argv[1], "NVfp1.0") == 0) {
target = GL_FRAGMENT_PROGRAM_NV;
piglit_require_extension("GL_NV_fragment_program");
use_ARB = 0;
} else {
piglit_report_result(PIGLIT_FAILURE);
}
for (i = 2; i < argc; i++) {
compile(argv[i], target, use_ARB);
}
piglit_report_result(PIGLIT_SUCCESS);
return 0;
}
!!ARBfp1.0
TEMP R0;
ADD R0, {0.5}.r, fragment.color;
ABS result.color, R0;
END
!!ARBfp1.0
OPTION ARB_fog_linear;
END
!!ARBfp1.0
OPTION ARB_fog_exp;
END
!!ARBfp1.0
OPTION ARB_fog_exp2;
END
!!ARBfp1.0
# FAIL
OPTION ARB_fog_exp;
OPTION ARB_fog_exp2;
END
!!ARBfp1.0
OPTION ARB_precision_hint_fastest;
END
!!ARBfp1.0
OPTION ARB_precision_hint_nicest;
END
!!ARBfp1.0
# FAIL
OPTION ARB_precision_hint_nicest;
OPTION ARB_precision_hint_nicest;
END
!!ARBfp1.0
# FAIL
OPTION ARB_precision_hint_fastest;
OPTION ARB_precision_hint_nicest;
END
!!ARBfp1.0
# FAIL
OPTION ARB_precision_hint_fastest;
OPTION ARB_precision_hint_fastest;
END
!!ARBfp1.0
TEMP R0;
MOV result.color, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.position, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.fogcoord, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.pointsize, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.texcoord, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.texcoord[0], R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.texcoord[1], R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.color.front, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.color.back, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.color.primary, R0;
END
!!ARBfp1.0
# FAIL
TEMP R0;
MOV result.color.secondary, R0;
END
!!ARBfp1.0
TEMP R0, R1;
SIN R0, R1.x;
SIN R0, R1.y;
SIN R0, R1.z;
SIN R0, R1.w;
COS R0, R1.x;
COS R0, R1.y;
COS R0, R1.z;
COS R0, R1.w;
SCS R0, R1.x;
SCS R0, R1.y;
SCS R0, R1.z;
SCS R0, R1.w;
END
!!ARBfp1.0
# FAIL
TEMP R0, R1;
SIN R0, R1;
END
!!ARBfp1.0
# FAIL
TEMP R0, R1;
COS R0, R1;
END
!!ARBfp1.0
# FAIL
TEMP R0, R1;
SCS R0, R1;
END
!!ARBfp1.0
MOV result.color, fragment.color.xxzx;
END
!!ARBfp1.0
SWZ result.color, fragment.color, 1,x,y,z;
END
!!ARBfp1.0
TEMP R0;
SWZ R0, fragment.color, x, y, z, w;
END
!!ARBfp1.0
# FAIL
# invalid extended swizzle selector
TEMP R0;
SWZ R0, fragment.color, xcellent, y, z, w;
END
!!ARBfp1.0
# FAIL
# invalid extended swizzle selector
TEMP R0;
SWZ R0, fragment.color, 0, 1, 2, -x;
END
!!ARBvp1.0
TEMP R0;
ADD R0, {0.5}.x, vertex.color;
ADD R0, vertex.position, vertex.color;
ABS result.color, R0;
MOV result.position, vertex.position;
END
!!ARBvp1.0
TEMP R0;
ADD R0, vertex.color, vertex.color;
ADD result.color, R0, R0;
MOV result.position, vertex.position;
END
!!ARBvp1.0
# Should compile successfully
ADDRESS A0;
TEMP R0;
ARL A0.x, R0.x;
END
!!ARBvp1.0
# FAIL
# due to variable redeclaration
ADDRESS A0;
TEMP A0, R0;
ARL A0.x, R0.x;
END