summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2016-05-02 14:43:37 +0200
committerAlejandro Piñeiro <apinheiro@igalia.com>2016-05-03 10:55:38 +0200
commit342a77bd48e15e6913829b127b715f1b4295312c (patch)
tree2749d90e04e1efba1b1f5dcd719437b1bd67b059
parent5fece51da7eef4893ae6c2fd6d642c41a4ed4e59 (diff)
arb_internalformat_query2: use PRIi64 instead of PRIu64 macro
As all the values we are printing are 64 bit integers, not unsigned integers. In general this is not relevant, as no query for a supported combination of pname,target and internalformat will return a negative value. But for pnames like SAMPLES, if not supported, params should remain unmodified. So if the buffer were initialized to a negative value for some reason, the value would be wrongly printed. Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
-rw-r--r--tests/spec/arb_internalformat_query2/common.c6
-rw-r--r--tests/spec/arb_internalformat_query2/max-dimensions.c2
-rw-r--r--tests/spec/arb_internalformat_query2/minmax.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 94268a7d2..1d60abb7b 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -252,10 +252,10 @@ void print_failing_case_full(const GLenum target, const GLenum internalformat,
piglit_get_gl_enum_name(internalformat));
if (expected_value >= 0)
- fprintf(stderr, "expected value = (%" PRIu64 "), ",
+ fprintf(stderr, "expected value = (%" PRIi64 "), ",
expected_value);
- fprintf(stderr, "params[0] = (%" PRIu64 ",%s), "
+ fprintf(stderr, "params[0] = (%" PRIi64 ",%s), "
"supported=%i\n",
current_value,
piglit_get_gl_enum_name(current_value),
@@ -541,7 +541,7 @@ test_data_check_against_get_tex_level_parameter(test_data *data,
if (!result) {
fprintf(stderr, "\tError comparing glGetInternalformat "
- "and glGetTexLevelParameter, params value=%" PRIu64 ", "
+ "and glGetTexLevelParameter, params value=%" PRIi64 ", "
"expected value=%i\n",
test_data_value_at_index(data, 0), param);
}
diff --git a/tests/spec/arb_internalformat_query2/max-dimensions.c b/tests/spec/arb_internalformat_query2/max-dimensions.c
index e3369be92..7721c4e80 100644
--- a/tests/spec/arb_internalformat_query2/max-dimensions.c
+++ b/tests/spec/arb_internalformat_query2/max-dimensions.c
@@ -424,7 +424,7 @@ check_params_against_dimension(test_data *data,
result = test_data_equal_at_index(data, local_data, 0);
if (!result)
- fprintf(stderr, "%s value different to %s value (%" PRIu64 " != %" PRIu64 ")\n",
+ fprintf(stderr, "%s value different to %s value (%" PRIi64 " != %" PRIi64 ")\n",
piglit_get_gl_enum_name(GL_MAX_LAYERS),
piglit_get_gl_enum_name(dimension_pname),
test_data_value_at_index(data, 0),
diff --git a/tests/spec/arb_internalformat_query2/minmax.c b/tests/spec/arb_internalformat_query2/minmax.c
index 550ac44c8..680fc9c5c 100644
--- a/tests/spec/arb_internalformat_query2/minmax.c
+++ b/tests/spec/arb_internalformat_query2/minmax.c
@@ -170,7 +170,7 @@ real_try(GLenum target, GLenum format, GLint max_samples,
if (test_data_value_at_index(data_samples, i) <= 0) {
ERROR_HEADER(data_samples);
fprintf(stderr,
- "Invalid sample count [%u] = %" PRIu64 " returned "
+ "Invalid sample count [%u] = %" PRIi64 " returned "
"for %s/%s (num sample counts = %i)\n",
i, test_data_value_at_index(data_samples, i),
piglit_get_gl_enum_name(target),
@@ -182,7 +182,7 @@ real_try(GLenum target, GLenum format, GLint max_samples,
if (previous == test_data_value_at_index(data_samples, i)) {
ERROR_HEADER(data_samples);
fprintf(stderr,
- "Duplicate values [%u] = [%u] = %" PRIu64 " returned "
+ "Duplicate values [%u] = [%u] = %" PRIi64 " returned "
"for %s/%s (num sample counts = %i)\n",
i - 1, i, test_data_value_at_index(data_samples, i),
piglit_get_gl_enum_name(target),
@@ -195,7 +195,7 @@ real_try(GLenum target, GLenum format, GLint max_samples,
ERROR_HEADER(data_samples);
fprintf(stderr,
"Values not in descending order "
- "([%u] = %d) < ([%u] = %" PRIu64 ") returned "
+ "([%u] = %d) < ([%u] = %" PRIi64 ") returned "
"for %s/%s (num sample counts = %i)\n",
i - 1, previous,
i, test_data_value_at_index(data_samples, i),
@@ -229,7 +229,7 @@ real_try(GLenum target, GLenum format, GLint max_samples,
if (test_data_value_at_index(data_samples, 0) < max_samples) {
ERROR_HEADER(data_samples);
fprintf(stderr,
- "GL_SAMPLES (%" PRIu64 ") smaller than %s (%d) "
+ "GL_SAMPLES (%" PRIi64 ") smaller than %s (%d) "
"for %s/%s\n",
test_data_value_at_index(data_samples, 0),
max_samples_name,