texturing: Move global variable definitions to common.c

Graphics / Mesa 3D Graphics Library / Piglit - Vinson Lee [freedesktop.org] - 1 February 2020 21:22 UTC

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

e06a2e92f texturing: Move global variable definitions to common.c.
tests/texturing/shaders/common.c | 7 +++++++
tests/texturing/shaders/common.h | 15 ++++++++-------
2 files changed, 15 insertions(+), 7 deletions(-)

Upstream: cgit.freedesktop.org


  • Share