[Piglit] [PATCH 06/12] arb_internalformat_query2: 0 is a valid value for NUM_SAMPLE_COUNTS
Alejandro PiƱeiro
apinheiro at igalia.com
Fri May 13 15:26:07 UTC 2016
minmax is testing that the implementation fulfill the minimum values
stablished by the spec. Copied from the equivalent arb_internalformat_query1
test, it was returning error if any of the tested formats returned 0 for
NUM_SAMPLE_COUNTS, as the minimum value was 1. That is not a restriction
for arb_internalformat_query2 anymore, where 0 is a valid value. Error on
negative values are still being tested.
Acked-by: Eduardo Lima <elima at igalia.com>
Acked-by: Antia Puentes <apuentes at igalia.com>
---
tests/spec/arb_internalformat_query2/minmax.c | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/tests/spec/arb_internalformat_query2/minmax.c b/tests/spec/arb_internalformat_query2/minmax.c
index 3658bb9..2bbb202 100644
--- a/tests/spec/arb_internalformat_query2/minmax.c
+++ b/tests/spec/arb_internalformat_query2/minmax.c
@@ -137,30 +137,15 @@ real_try(GLenum target, GLenum format, GLint max_samples,
buffer_size_in_elements = test_data_value_at_index(data_counts, 0);
pass = piglit_check_gl_error(0)
+ && (buffer_size_in_elements >= 0)
&& pass;
- /* The GL_ARB_internalformat_query spec says:
- *
- * "Add new table 6.X Internalformat-specific
- * Implementation Dependent Values after 6.52"
- *
- * Minimum
- * Get Value Type Get Command Value
- * --------- ---- ----------- -------
- * SAMPLES 0*xZ+ GetInternalformativ fn1
- * NUM_SAMPLE_COUNTS Z+ GetInternalformativ 1
- *
- * fn1: see section 6.X."
+ /* For ARB_internalformat_query2, 0 is a valid value for
+ * NUM_SAMPLE_COUNTS, but it doesn't make sense to go on and
+ * check GL_SAMPLES in that case.
*/
- if (buffer_size_in_elements < 1) {
- ERROR_HEADER(data_counts);
- fprintf(stderr,
- "GL_NUM_SAMPLE_COUNTS is %d for %s/%s\n",
- buffer_size_in_elements,
- piglit_get_gl_enum_name(target),
- piglit_get_gl_enum_name(format));
- return false;
- }
+ if (buffer_size_in_elements == 0)
+ return pass;
test_data_set_params_size(data_samples, buffer_size_in_elements);
--
2.7.4
More information about the Piglit
mailing list