diff options
author | Jesse Natalie <jenatali@microsoft.com> | 2022-01-16 20:03:50 -0800 |
---|---|---|
committer | Jesse Natalie <jenatali@microsoft.com> | 2022-01-17 07:03:29 -0800 |
commit | 124bca3c95715a36a62ffbf2067bedd8a208fefd (patch) | |
tree | c4210b0e1a3223a909c57390ec6b517b19e7e2d7 | |
parent | 11ee10ba04a95d4b36ef844420f0a5838002b5a8 (diff) |
glsl-1.50-gs-max-outputs: Heap-allocate expected value array
Reviewed-by: Marek Olák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/625>
-rw-r--r-- | tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp b/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp index 6a97397aa..6d71b9fe7 100644 --- a/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp +++ b/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp @@ -305,10 +305,10 @@ run_testcase(const struct testcase *tc) glDrawArraysInstanced(GL_POINTS, 0, tc->num_points, tc->num_instances); - float expected[WINDOW_SIZE * WINDOW_SIZE * 4]; + float *expected = new float[WINDOW_SIZE * WINDOW_SIZE * 4]; unsigned num_total = tc->num_instances * tc->num_points * tc->num_invocations * tc->num_outputs; - memset(expected, 0, sizeof(expected)); + memset(expected, 0, sizeof(float) * WINDOW_SIZE * WINDOW_SIZE * 4); for (unsigned i = 0; i < WINDOW_SIZE * WINDOW_SIZE; ++i) { if (i < num_total) @@ -316,7 +316,9 @@ run_testcase(const struct testcase *tc) expected[4 * i + 3] = 1.0; } - return piglit_probe_image_rgba(0, 0, WINDOW_SIZE, WINDOW_SIZE, expected); + int result = piglit_probe_image_rgba(0, 0, WINDOW_SIZE, WINDOW_SIZE, expected); + delete[] expected; + return result; } static void |