summaryrefslogtreecommitdiff
path: root/tests/spec/arb_internalformat_query2
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2020-02-07 14:40:36 -0800
committerVinson Lee <vlee@freedesktop.org>2020-02-08 22:48:57 -0800
commite1a5383dbf8c75e65c3caed5133bfae066b77edc (patch)
treecb5a11705ebac8dca61858417a5d753cacd1a2c3 /tests/spec/arb_internalformat_query2
parent2d646d6d30bdc1fc4aca0f4d6f6122e5f5625ae7 (diff)
arb_internalformat_query2: Move global variable definitions to common.c.
This patch fixes these build errors with GCC 10. /usr/bin/ld: CMakeFiles/arb_internalformat_query2-internalformat-size-checks.dir/common.c.o:tests/spec/arb_internalformat_query2/common.h:304: multiple definition of `valid_internalformats'; CMakeFiles/arb_internalformat_query2-internalformat-size-checks.dir/internalformat-size-checks.c.o:tests/spec/arb_internalformat_query2/common.h:304: first defined here /usr/bin/ld: CMakeFiles/arb_internalformat_query2-internalformat-size-checks.dir/common.c.o:tests/spec/arb_internalformat_query2/common.h:305: multiple definition of `num_valid_internalformats'; CMakeFiles/arb_internalformat_query2-internalformat-size-checks.dir/internalformat-size-checks.c.o:tests/spec/arb_internalformat_query2/common.h:305: first defined here Fixes: 1e60f1499e5b ("arb_internalformat_query2: test new ARB_ES3_compatibility internalformats") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/piglit/merge_requests/217> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/merge_requests/217>
Diffstat (limited to 'tests/spec/arb_internalformat_query2')
-rw-r--r--tests/spec/arb_internalformat_query2/common.c3
-rw-r--r--tests/spec/arb_internalformat_query2/common.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 9e62f0d30..67f04b133 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -30,6 +30,9 @@ typedef void (APIENTRY *GetInternalformat)(GLenum target, GLenum internalformat,
GLenum pname, GLsizei bufsize,
void *params);
+GLenum *valid_internalformats;
+unsigned num_valid_internalformats;
+
/* This struct is intended to abstract the fact that there are two
* really similar methods, and two really similar params (just change
* the type). All the castings and decision about which method should
diff --git a/tests/spec/arb_internalformat_query2/common.h b/tests/spec/arb_internalformat_query2/common.h
index 86aa4c729..a388b7a1a 100644
--- a/tests/spec/arb_internalformat_query2/common.h
+++ b/tests/spec/arb_internalformat_query2/common.h
@@ -301,8 +301,8 @@ static const GLenum arb_es3_compatibility_valid_internalformats[] = {
GL_COMPRESSED_SIGNED_RG11_EAC,
};
-GLenum *valid_internalformats;
-unsigned num_valid_internalformats;
+extern GLenum *valid_internalformats;
+extern unsigned num_valid_internalformats;
typedef struct _test_data test_data;