Bump actions/checkout from 4.1.3 to 4.1.4
[glslang.git] / Test / runtests
blob00c2babdaa8ed35e2717d5f616388c45f6e52c4a
1 #!/usr/bin/env bash
3 # Arguments:
4 # 1- TargetDirectory, where to write test results and intermediary files
5 # 2- Path to glslang
6 # 3- Path to spirv-remap
8 TARGETDIR=${1:-localResults}
9 BASEDIR=baseResults
10 EXE=${2:-../build/install/bin/glslang}
11 REMAPEXE=${3:-../build/install/bin/spirv-remap}
12 HASERROR=0
13 mkdir -p "$TARGETDIR"
15 LIBPATH="$(cd "$(dirname "$(dirname "$EXE")")" && pwd)/lib"
16 if [ -d "${LIBPATH}" ]; then
17 export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
20 function run {
21 "$EXE" "$@"
22 result=$?
23 case "$result" in
24 [0-6]) # Valid success and error codes
25 return
28 echo "$EXE returned $result"
29 HASERROR=1
30 esac
33 if [ -a localtestlist ]
34 then
35 while read t; do
36 echo Running $t...
37 b=`basename $t`
38 run -i -l $t > "$TARGETDIR/$b.out"
39 diff -b $BASEDIR/$b.out "$TARGETDIR/$b.out" || HASERROR=1
40 done < localtestlist
43 rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
46 # special tests
49 run badMacroArgs.frag > "$TARGETDIR/badMacroArgs.frag.out"
50 diff -b $BASEDIR/badMacroArgs.frag.out "$TARGETDIR/badMacroArgs.frag.out" || HASERROR=1
52 run gl_samplemask_array_size.frag gl_MaxSamples_32.conf -i > "$TARGETDIR/gl_samplemask_array_size_32.frag.out"
53 diff -b $BASEDIR/gl_samplemask_array_size_32.frag.out "$TARGETDIR/gl_samplemask_array_size_32.frag.out" || HASERROR=1
54 run gl_samplemask_array_size.frag gl_MaxSamples_64.conf -i > "$TARGETDIR/gl_samplemask_array_size_64.frag.out"
55 diff -b $BASEDIR/gl_samplemask_array_size_64.frag.out "$TARGETDIR/gl_samplemask_array_size_64.frag.out" || HASERROR=1
57 # reflection tests
59 echo Running reflection...
60 run -l -q -C reflection.vert > "$TARGETDIR/reflection.vert.out"
61 diff -b $BASEDIR/reflection.vert.out "$TARGETDIR/reflection.vert.out" || HASERROR=1
62 run -l -q -C --reflect-strict-array-suffix --reflect-basic-array-suffix --reflect-intermediate-io --reflect-separate-buffers --reflect-all-block-variables --reflect-unwrap-io-blocks --reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo reflection.options.vert > "$TARGETDIR/reflection.options.vert.out"
63 diff -b $BASEDIR/reflection.options.vert.out "$TARGETDIR/reflection.options.vert.out" || HASERROR=1
64 run -l -q -C reflection.frag > "$TARGETDIR/reflection.frag.out"
65 diff -b $BASEDIR/reflection.frag.out "$TARGETDIR/reflection.frag.out" || HASERROR=1
66 run -l -q -C --reflect-strict-array-suffix --reflect-basic-array-suffix --reflect-intermediate-io --reflect-separate-buffers --reflect-all-block-variables --reflect-unwrap-io-blocks --reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo reflection.frag > "$TARGETDIR/reflection.options.frag.out"
67 diff -b $BASEDIR/reflection.options.frag.out "$TARGETDIR/reflection.options.frag.out" || HASERROR=1
68 run -l -q -C --reflect-strict-array-suffix --reflect-basic-array-suffix --reflect-intermediate-io --reflect-separate-buffers --reflect-all-block-variables --reflect-unwrap-io-blocks --reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo reflection.options.geom > "$TARGETDIR/reflection.options.geom.out"
69 diff -b $BASEDIR/reflection.options.geom.out "$TARGETDIR/reflection.options.geom.out" || HASERROR=1
70 run -l -q -C reflection.linked.vert reflection.linked.frag > "$TARGETDIR/reflection.linked.out"
71 diff -b $BASEDIR/reflection.linked.out "$TARGETDIR/reflection.linked.out" || HASERROR=1
72 run -l -q -C --reflect-strict-array-suffix --reflect-basic-array-suffix --reflect-intermediate-io --reflect-separate-buffers --reflect-all-block-variables --reflect-unwrap-io-blocks --reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo reflection.linked.vert reflection.linked.frag > "$TARGETDIR/reflection.linked.options.out"
73 diff -b $BASEDIR/reflection.linked.options.out "$TARGETDIR/reflection.linked.options.out" || HASERROR=1
74 run -D -Od -e flizv -l -q -C -V -Od hlsl.reflection.vert > "$TARGETDIR/hlsl.reflection.vert.out"
75 diff -b $BASEDIR/hlsl.reflection.vert.out "$TARGETDIR/hlsl.reflection.vert.out" || HASERROR=1
76 run -D -Od -e main -l -q -C -V -Od hlsl.reflection.binding.frag > "$TARGETDIR/hlsl.reflection.binding.frag.out"
77 diff -b $BASEDIR/hlsl.reflection.binding.frag.out "$TARGETDIR/hlsl.reflection.binding.frag.out" || HASERROR=1
78 run -D -Od -e main -l -q --hlsl-iomap --auto-map-bindings --stb 10 --sbb 20 --ssb 30 --suavb 40 --scb 50 -D -V -e main -Od hlsl.automap.frag > "$TARGETDIR/hlsl.automap.frag.out"
79 diff -b $BASEDIR/hlsl.automap.frag.out "$TARGETDIR/hlsl.automap.frag.out" || HASERROR=1
82 # multi-threaded test
84 echo Comparing single thread to multithread for all tests in current directory...
85 run -i -C *.vert *.geom *.frag *.tesc *.tese *.comp > "$TARGETDIR/singleThread.out"
86 run -i -C *.vert *.geom *.frag *.tesc *.tese *.comp -t > "$TARGETDIR/multiThread.out"
87 diff "$TARGETDIR/singleThread.out" "$TARGETDIR/multiThread.out" || HASERROR=1
88 if [ $HASERROR -eq 0 ]
89 then
90 rm "$TARGETDIR/singleThread.out"
91 rm "$TARGETDIR/multiThread.out"
95 # entry point renaming tests
97 echo Running entry-point renaming tests
98 run -i -H -V -D -Od --entry-point main_in_spv --ku --source-entrypoint main -Od hlsl.entry.rename.frag > "$TARGETDIR/hlsl.entry.rename.frag.out"
99 diff -b $BASEDIR/hlsl.entry.rename.frag.out "$TARGETDIR/hlsl.entry.rename.frag.out" || HASERROR=1
102 # Testing ill-defined uncalled function
104 echo Running ill-defined uncalled function
105 run -D -Od -e main -H -Od hlsl.deadFunctionMissingBody.vert > "$TARGETDIR/hlsl.deadFunctionMissingBody.vert.out"
106 diff -b $BASEDIR/hlsl.deadFunctionMissingBody.vert.out "$TARGETDIR/hlsl.deadFunctionMissingBody.vert.out" || HASERROR=1
108 if [ $HASERROR -eq 0 ]
109 then
110 echo Tests Succeeded.
111 else
112 echo Tests Failed.
116 # Testing -S and compound suffixes
118 echo Running explicit stage test and compound suffix tests
119 run -Od -i -S vert nosuffix > "$TARGETDIR/nosuffix.out"
120 diff -b $BASEDIR/nosuffix.out "$TARGETDIR/nosuffix.out" || HASERROR=1
121 run -Od -i compoundsuffix.vert.glsl > "$TARGETDIR/compoundsuffix.vert.glsl"
122 diff -b $BASEDIR/compoundsuffix.vert.glsl "$TARGETDIR/compoundsuffix.vert.glsl" || HASERROR=1
123 run -Od -e main -H compoundsuffix.frag.hlsl > "$TARGETDIR/compoundsuffix.frag.hlsl"
124 diff -b $BASEDIR/compoundsuffix.frag.hlsl "$TARGETDIR/compoundsuffix.frag.hlsl" || HASERROR=1
127 # Testing --hlsl-offsets
129 echo Running hlsl offsets
130 run -i --hlsl-offsets -H spv.hlslOffsets.vert > "$TARGETDIR/spv.hlslOffsets.vert.out"
131 diff -b $BASEDIR/spv.hlslOffsets.vert.out "$TARGETDIR/spv.hlslOffsets.vert.out" || HASERROR=1
133 echo Running hlsl offsets
134 run -i --hlsl-offsets -D -Od -e main -H -Od hlsl.hlslOffset.vert > "$TARGETDIR/hlsl.hlslOffset.vert.out"
135 diff -b $BASEDIR/hlsl.hlslOffset.vert.out "$TARGETDIR/hlsl.hlslOffset.vert.out" || HASERROR=1
138 # Testing --resource-set-binding
140 echo Configuring HLSL descriptor set and binding number manually
141 run -V -D -Od -e main -H -Od hlsl.multiDescriptorSet.frag --rsb frag t0 0 0 t1 1 0 s0 0 1 s1 1 1 b0 2 0 b1 2 1 b2 2 2 > "$TARGETDIR/hlsl.multiDescriptorSet.frag.out"
142 diff -b $BASEDIR/hlsl.multiDescriptorSet.frag.out "$TARGETDIR/hlsl.multiDescriptorSet.frag.out" || HASERROR=1
144 run -V -D -Od -e main -H -Od hlsl.explicitDescriptorSet.frag --hlsl-iomap --amb --ssb 10 --stb 20 --rsb 4 > "$TARGETDIR/hlsl.explicitDescriptorSet.frag.out"
145 diff -b $BASEDIR/hlsl.explicitDescriptorSet.frag.out "$TARGETDIR/hlsl.explicitDescriptorSet.frag.out" || HASERROR=1
147 run -V -D -Od -e main -H -Od hlsl.explicitDescriptorSet.frag --hlsl-iomap --amb --ssb 10 --stb 20 --rsb frag 3 > "$TARGETDIR/hlsl.explicitDescriptorSet-2.frag.out"
148 diff -b $BASEDIR/hlsl.explicitDescriptorSet-2.frag.out "$TARGETDIR/hlsl.explicitDescriptorSet-2.frag.out" || HASERROR=1
151 # Testing per-descriptor-set IO map shift
153 echo 'Testing per-descriptor-set IO map shift'
154 run -e main --hlsl-iomap --ssb 10 1 15 2 --stb 20 --stb 25 2 --stb 70 6 --suavb 30 --suavb 40 2 --sub 50 6 -i -q -D -Od -V hlsl.shift.per-set.frag > "$TARGETDIR/hlsl.shift.per-set.frag.out" || HASERROR=1
155 diff -b $BASEDIR/hlsl.shift.per-set.frag.out "$TARGETDIR/hlsl.shift.per-set.frag.out" || HASERROR=1
158 # Testing location error
160 echo Testing SPV no location
161 run -V -C spv.noLocation.vert > "$TARGETDIR/spv.noLocation.vert.out"
162 diff -b $BASEDIR/spv.noLocation.vert.out "$TARGETDIR/spv.noLocation.vert.out" || HASERROR=1
163 run -G -H --aml spv.noBuiltInLoc.vert > "$TARGETDIR/spv.noBuiltInLoc.vert.out"
164 diff -b $BASEDIR/spv.noBuiltInLoc.vert.out "$TARGETDIR/spv.noBuiltInLoc.vert.out" || HASERROR=1
165 run -G spv.looseUniformNoLoc.vert > "$TARGETDIR/spv.looseUniformNoLoc.vert.out"
166 diff -b $BASEDIR/spv.looseUniformNoLoc.vert.out "$TARGETDIR/spv.looseUniformNoLoc.vert.out" || HASERROR=1
169 # Testing debug information
171 echo Testing SPV Debug Information
172 run -g --relaxed-errors --suppress-warnings --aml --amb --hlsl-offsets --nsf --spirv-val \
173 -G -H spv.debugInfo.frag --rsb frag 3 > "$TARGETDIR/spv.debugInfo.frag.out"
174 diff -b $BASEDIR/spv.debugInfo.frag.out "$TARGETDIR/spv.debugInfo.frag.out" || HASERROR=1
175 run -g -Od --target-env vulkan1.1 --relaxed-errors --suppress-warnings --aml --amb --hlsl-offsets --nsf --spirv-val \
176 -V -H spv.debugInfo.frag --rsb frag 3 > "$TARGETDIR/spv.debugInfo.1.1.frag.out"
177 diff -b $BASEDIR/spv.debugInfo.1.1.frag.out "$TARGETDIR/spv.debugInfo.1.1.frag.out" || HASERROR=1
178 run -g -D -Od -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --spirv-val --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \
179 --sep origMain -H -Od spv.hlslDebugInfo.vert --rsb vert t0 0 0 > "$TARGETDIR/spv.hlslDebugInfo.frag.out"
180 diff -b $BASEDIR/spv.hlslDebugInfo.frag.out "$TARGETDIR/spv.hlslDebugInfo.frag.out" || HASERROR=1
183 # Testing Includer
185 echo Testing Includer
186 run -D -Od -e main -H -Od ../Test/hlsl.include.vert > "$TARGETDIR/hlsl.include.vert.out"
187 diff -b $BASEDIR/hlsl.include.vert.out "$TARGETDIR/hlsl.include.vert.out" || HASERROR=1
188 run -D -Od -e main -H -Od hlsl.includeNegative.vert > "$TARGETDIR/hlsl.includeNegative.vert.out"
189 diff -b $BASEDIR/hlsl.includeNegative.vert.out "$TARGETDIR/hlsl.includeNegative.vert.out" || HASERROR=1
190 run -l -i include.vert > "$TARGETDIR/include.vert.out"
191 diff -b $BASEDIR/include.vert.out "$TARGETDIR/include.vert.out" || HASERROR=1
192 run -D -Od -e main -H -Od -Iinc1/path1 -Iinc1/path2 hlsl.dashI.vert > "$TARGETDIR/hlsl.dashI.vert.out"
193 diff -b $BASEDIR/hlsl.dashI.vert.out "$TARGETDIR/hlsl.dashI.vert.out" || HASERROR=1
194 run -D -Od -e MainPs -H -Od -g hlsl.pp.line3.frag > "$TARGETDIR/hlsl.pp.line3.frag.out"
195 diff -b $BASEDIR/hlsl.pp.line3.frag.out "$TARGETDIR/hlsl.pp.line3.frag.out" || HASERROR=1
198 # Testing --depfile
201 echo "Testing --depfile"
202 run -D -Od -e main -H --depfile "$TARGETDIR/hlsl.include.vert.d.out" -Od ../Test/hlsl.include.vert > "$TARGETDIR/hlsl.include.vert.out"
203 diff -b $BASEDIR/hlsl.include.vert.d.out "$TARGETDIR/hlsl.include.vert.d.out" || HASERROR=1
204 run -D -Od -e main -H --depfile "$TARGETDIR/hlsl.dashI.vert.d.out" -Od -Iinc1/path1 -Iinc1/path2 hlsl.dashI.vert > "$TARGETDIR/hlsl.dashI.vert.out"
205 diff -b $BASEDIR/hlsl.dashI.vert.d.out "$TARGETDIR/hlsl.dashI.vert.d.out" || HASERROR=1
208 # Testing -D, -U and -P
210 echo "Testing -D, -U and -P"
211 run -DUNDEFED -UIN_SHADER -DFOO=200 -i -l --U UNDEFED --define-macro MUL=FOO*2 glsl.-D-U.frag > "$TARGETDIR/glsl.-D-U.frag.out"
212 diff -b $BASEDIR/glsl.-D-U.frag.out "$TARGETDIR/glsl.-D-U.frag.out" || HASERROR=1
213 run -D -Od -e main -V -i -DUNDEFED -UIN_SHADER --D FOO=200 --undef-macro UNDEFED -Od hlsl.-D-U.frag > "$TARGETDIR/hlsl.-D-U.frag.out"
214 diff -b $BASEDIR/hlsl.-D-U.frag.out "$TARGETDIR/hlsl.-D-U.frag.out" || HASERROR=1
215 run -P"#define TEST1" -i -l --preamble-text "#define TEST2" --p "#define TEST3" glsl.-P.frag > "$TARGETDIR/glsl.-P.frag.out"
216 diff -b $BASEDIR/glsl.-P.frag.out "$TARGETDIR/glsl.-P.frag.out" || HASERROR=1
217 run -i -l --preamble-text "vec4 getColor() { return vec4(1.0); }" glsl.-P.function.frag > "$TARGETDIR/glsl.-P.function.frag.out"
218 diff -b $BASEDIR/glsl.-P.function.frag.out "$TARGETDIR/glsl.-P.function.frag.out" || HASERROR=1
219 run -i -l --preamble-text "#extension GL_GOOGLE_include_directive : require" -I. glsl.-P.include.frag > "$TARGETDIR/glsl.-P.include.frag.out"
220 diff -b $BASEDIR/glsl.-P.include.frag.out "$TARGETDIR/glsl.-P.include.frag.out" || HASERROR=1
223 # Test --client and --target-env
225 echo "Testing --client and --target-env"
226 run --client vulkan100 spv.targetVulkan.vert || HASERROR=1
227 run --client opengl100 spv.targetOpenGL.vert || HASERROR=1
228 run --target-env vulkan1.0 spv.targetVulkan.vert || HASERROR=1
229 run --target-env vulkan1.1 spv.targetVulkan.vert || HASERROR=1
230 run --target-env vulkan1.2 spv.targetVulkan.vert || HASERROR=1
231 run --target-env opengl spv.targetOpenGL.vert || HASERROR=1
232 run -V100 spv.targetVulkan.vert || HASERROR=1
233 run -G100 spv.targetOpenGL.vert || HASERROR=1
234 run --target-env spirv1.2 -V spv.targetVulkan.vert || HASERROR=1
237 # Testing GLSL entry point rename
239 echo "Testing GLSL entry point rename"
240 run -H -e foo --source-entrypoint main glsl.entryPointRename.vert > "$TARGETDIR/glsl.entryPointRename.vert.out"
241 diff -b $BASEDIR/glsl.entryPointRename.vert.out "$TARGETDIR/glsl.entryPointRename.vert.out" || HASERROR=1
242 run -H -e foo --source-entrypoint bar glsl.entryPointRename.vert > "$TARGETDIR/glsl.entryPointRename.vert.bad.out"
243 diff -b $BASEDIR/glsl.entryPointRename.vert.bad.out "$TARGETDIR/glsl.entryPointRename.vert.bad.out" || HASERROR=1
244 run -H -e foo --source-entrypoint main glsl.entryPointRename2.vert > "$TARGETDIR/glsl.entryPointRename2.vert.out"
245 diff -b $BASEDIR/glsl.entryPointRename2.vert.out "$TARGETDIR/glsl.entryPointRename2.vert.out" || HASERROR=1
248 # Testing remapper error handling
250 echo "Testing remapper error handling"
251 "$REMAPEXE" --do-everything -i remap.invalid-spirv-1.spv -o "$TARGETDIR" > "$TARGETDIR/remap.invalid-spirv-1.out" && HASERROR=1
252 diff -b $BASEDIR/remap.invalid-spirv-1.out "$TARGETDIR/remap.invalid-spirv-1.out" || HASERROR=1
253 "$REMAPEXE" --do-everything -i remap.invalid-spirv-2.spv -o "$TARGETDIR" > "$TARGETDIR/remap.invalid-spirv-2.out" && HASERROR=1
254 diff -b $BASEDIR/remap.invalid-spirv-2.out "$TARGETDIR/remap.invalid-spirv-2.out" || HASERROR=1
257 # Testing position Y inversion
259 echo "Testing position Y inversion"
260 run -H -e main -V -D -Od -H -i --iy hlsl.y-negate-1.vert > "$TARGETDIR/hlsl.y-negate-1.vert.out"
261 diff -b $BASEDIR/hlsl.y-negate-1.vert.out "$TARGETDIR/hlsl.y-negate-1.vert.out" || HASERROR=1
262 run -H -e main -V -D -Od -H -i --invert-y hlsl.y-negate-2.vert > "$TARGETDIR/hlsl.y-negate-2.vert.out"
263 diff -b $BASEDIR/hlsl.y-negate-2.vert.out "$TARGETDIR/hlsl.y-negate-2.vert.out" || HASERROR=1
264 run -H -e main -V -D -Od -H -i --invert-y hlsl.y-negate-3.vert > "$TARGETDIR/hlsl.y-negate-3.vert.out"
265 diff -b $BASEDIR/hlsl.y-negate-3.vert.out "$TARGETDIR/hlsl.y-negate-3.vert.out" || HASERROR=1
268 # Testing position W reciprocal
270 echo "Testing position W reciprocal"
271 run -H -e main -V -D -Od -H -i --hlsl-dx-position-w hlsl.w-recip.frag > "$TARGETDIR/hlsl.w-recip.frag.out"
272 diff -b $BASEDIR/hlsl.w-recip.frag.out "$TARGETDIR/hlsl.w-recip.frag.out" || HASERROR=1
273 run -H -e main -V -D -Od -H -i --hlsl-dx-position-w hlsl.w-recip2.frag > "$TARGETDIR/hlsl.w-recip2.frag.out"
274 diff -b $BASEDIR/hlsl.w-recip2.frag.out "$TARGETDIR/hlsl.w-recip2.frag.out" || HASERROR=1
277 # Testing hlsl_functionality1
279 echo "Testing hlsl_functionality1"
280 run -H -e main -D -Od -fhlsl_functionality1 hlsl.structbuffer.incdec.frag > \
281 "$TARGETDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out"
282 diff -b $BASEDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out "$TARGETDIR/hlsl.structbuffer.incdec.frag.hlslfun1.out" || HASERROR=1
283 run -H -e main -D -Od -fhlsl_functionality1 hlsl.noSemantic.functionality1.comp > \
284 "$TARGETDIR/hlsl.noSemantic.functionality1.comp.out"
285 diff -b $BASEDIR/hlsl.noSemantic.functionality1.comp.out "$TARGETDIR/hlsl.noSemantic.functionality1.comp.out" || HASERROR=1
288 # Testing HLSL-specific PP feature expansion
290 echo "Testing HLSL-specific PP feature expansion"
291 run -D -E hlsl.pp.expand.frag > "$TARGETDIR/hlsl.pp.expand.frag.out" 2> "$TARGETDIR/hlsl.pp.expand.frag.err"
292 diff -b $BASEDIR/hlsl.pp.expand.frag.out "$TARGETDIR/hlsl.pp.expand.frag.out" || HASERROR=1
293 diff -b $BASEDIR/hlsl.pp.expand.frag.err "$TARGETDIR/hlsl.pp.expand.frag.err" || HASERROR=1
296 # Test --nan-clamp
298 echo "Testing nan-clamp"
299 run --nan-clamp -H --aml --amb spv.400.frag > "$TARGETDIR/spv.400.frag.nanclamp.out"
300 diff -b $BASEDIR/spv.400.frag.nanclamp.out "$TARGETDIR/spv.400.frag.nanclamp.out" || HASERROR=1
303 # Test --auto-sampled-textures
305 echo "Testing auto-sampled-textures"
306 run --auto-sampled-textures -H -Od -e MainPs -D -S frag hlsl.autosampledtextures.frag > "$TARGETDIR/hlsl.autosampledtextures.frag.out"
307 diff -b $BASEDIR/hlsl.autosampledtextures.frag.out "$TARGETDIR/hlsl.autosampledtextures.frag.out" || HASERROR=1
308 run --auto-sampled-textures -H -Od -S frag glsl.autosampledtextures.frag > "$TARGETDIR/glsl.autosampledtextures.frag.out"
309 diff -b $BASEDIR/glsl.autosampledtextures.frag.out "$TARGETDIR/glsl.autosampledtextures.frag.out" || HASERROR=1
311 # Test --glsl-version
313 echo "Testing --glsl-version"
314 run --glsl-version 410 -V -S vert glsl.versionOverride.vert > "$TARGETDIR/glsl.versionOverride.vert.out"
315 diff -b $BASEDIR/glsl.versionOverride.vert.out "$TARGETDIR/glsl.versionOverride.vert.out" || HASERROR=1
316 run --glsl-version 420 -V -S frag glsl.versionOverride.frag > "$TARGETDIR/glsl.versionOverride.frag.out"
317 diff -b $BASEDIR/glsl.versionOverride.frag.out "$TARGETDIR/glsl.versionOverride.frag.out" || HASERROR=1
318 run --glsl-version 430 -V -S geom glsl.versionOverride.geom > "$TARGETDIR/glsl.versionOverride.geom.out"
319 diff -b $BASEDIR/glsl.versionOverride.geom.out "$TARGETDIR/glsl.versionOverride.geom.out" || HASERROR=1
320 run --glsl-version 440 -V -S tesc glsl.versionOverride.tesc > "$TARGETDIR/glsl.versionOverride.tesc.out"
321 diff -b $BASEDIR/glsl.versionOverride.tesc.out "$TARGETDIR/glsl.versionOverride.tesc.out" || HASERROR=1
322 run --glsl-version 450 -V -S tese glsl.versionOverride.tese > "$TARGETDIR/glsl.versionOverride.tese.out"
323 diff -b $BASEDIR/glsl.versionOverride.tese.out "$TARGETDIR/glsl.versionOverride.tese.out" || HASERROR=1
324 run --glsl-version 460 -V -S comp glsl.versionOverride.comp > "$TARGETDIR/glsl.versionOverride.comp.out"
325 diff -b $BASEDIR/glsl.versionOverride.comp.out "$TARGETDIR/glsl.versionOverride.comp.out" || HASERROR=1
328 # Test --enhanced-msgs
331 echo "Testing enhanced-msgs"
332 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.0.frag > "$TARGETDIR/enhanced.0.frag.out"
333 diff -b $BASEDIR/enhanced.0.frag.out "$TARGETDIR/enhanced.0.frag.out" || HASERROR=1
334 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.1.frag > "$TARGETDIR/enhanced.1.frag.out"
335 diff -b $BASEDIR/enhanced.1.frag.out "$TARGETDIR/enhanced.1.frag.out" || HASERROR=1
336 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.2.frag > "$TARGETDIR/enhanced.2.frag.out"
337 diff -b $BASEDIR/enhanced.2.frag.out "$TARGETDIR/enhanced.2.frag.out" || HASERROR=1
338 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.3.vert enhanced.3.frag > "$TARGETDIR/enhanced.3.link.out"
339 diff -b $BASEDIR/enhanced.3.link.out "$TARGETDIR/enhanced.3.link.out" || HASERROR=1
340 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.4.vert enhanced.4.frag > "$TARGETDIR/enhanced.4.link.out"
341 diff -b $BASEDIR/enhanced.4.link.out "$TARGETDIR/enhanced.4.link.out" || HASERROR=1
342 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.5.vert enhanced.5.frag > "$TARGETDIR/enhanced.5.link.out"
343 diff -b $BASEDIR/enhanced.5.link.out "$TARGETDIR/enhanced.5.link.out" || HASERROR=1
344 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.6.vert enhanced.6.frag > "$TARGETDIR/enhanced.6.link.out"
345 diff -b $BASEDIR/enhanced.6.link.out "$TARGETDIR/enhanced.6.link.out" || HASERROR=1
346 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml enhanced.7.vert enhanced.7.frag > "$TARGETDIR/enhanced.7.link.out"
347 diff -b $BASEDIR/enhanced.7.link.out "$TARGETDIR/enhanced.7.link.out" || HASERROR=1
348 run --enhanced-msgs -V --target-env vulkan1.2 --amb --aml spv.textureError.frag > "$TARGETDIR/spv.textureError.frag.out"
349 diff -b $BASEDIR/spv.textureError.frag.out "$TARGETDIR/spv.textureError.frag.out" || HASERROR=1
352 # Test UTF8BOM
354 echo "Testing UTF8BOM"
355 run --glsl-version 410 -V -S vert UTF8BOM.vert > $TARGETDIR/UTF8BOM.vert.out
356 diff -b $BASEDIR/UTF8BOM.vert.out $TARGETDIR/UTF8BOM.vert.out || HASERROR=1
359 # Final checking
361 if [ $HASERROR -eq 0 ]
362 then
363 echo Tests Succeeded.
364 else
365 echo Tests Failed.
368 rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
370 exit $HASERROR