Skip to content

texturing: Move global variable definitions to common.c.

Vinson Lee requested to merge vlee/piglit:fix-gcc10-texturing into master

This patch fixes these build errors with GCC 10.

/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:38: multiple definition of `miplevels'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:38: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:41: multiple definition of `base_size'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:41: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:48: multiple definition of `level_size'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:48: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:79: multiple definition of `sampler'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:79: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:82: multiple definition of `swizzling'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:82: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `minx'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `miny'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `minz'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `maxx'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `maxy'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: multiple definition of `maxz'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:83: first defined here
/usr/bin/ld: CMakeFiles/textureSamples.dir/common.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:84: multiple definition of `sample_count'; CMakeFiles/textureSamples.dir/textureSamples.c.o:/home/vlee/workspace/piglit/tests/texturing/shaders/common.h:84: first defined here

Signed-off-by: Vinson Lee vlee@freedesktop.org

Edited by Eric Engestrom

Merge request reports