On 10/24/2016 11:32 AM, Dylan Baker wrote:
Which was changed in b300e1f58 to return a status, instead of exiting on
failure, but the calls to the function weren't updated to handle this
change.

This fixes the remaining uses of program_must_be_in_use not fixed by
Brian's patch.

cc: Brian Paul <bri...@vmware.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
  tests/shaders/shader_runner.c | 24 ++++++++++++------------
  1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index b0bde2c..3658210 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -3033,25 +3033,25 @@ piglit_display(void)
                } else if (sscanf(line,
                                  "compute %d %d %d",
                                  &x, &y, &z) == 3) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        glMemoryBarrier(GL_ALL_BARRIER_BITS);
                        glDispatchCompute(x, y, z);
                        glMemoryBarrier(GL_ALL_BARRIER_BITS);
                } else if (sscanf(line,
                                  "compute group size %d %d %d %d %d %d",
                                  &x, &y, &z, &w, &h, &l) == 6) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        glMemoryBarrier(GL_ALL_BARRIER_BITS);
                        glDispatchComputeGroupSizeARB(x, y, z, w, h, l);
                        glMemoryBarrier(GL_ALL_BARRIER_BITS);
                } else if (string_match("draw rect tex", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        program_subroutine_uniforms();
                        get_floats(line + 13, c, 8);
                        piglit_draw_rect_tex(c[0], c[1], c[2], c[3],
                                             c[4], c[5], c[6], c[7]);
                } else if (string_match("draw rect ortho patch", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        program_subroutine_uniforms();
                        get_floats(line + 21, c, 4);

@@ -3060,7 +3060,7 @@ piglit_display(void)
                                                2.0 * (c[2] / piglit_width),
                                                2.0 * (c[3] / piglit_height), 
true);
                } else if (string_match("draw rect ortho", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        program_subroutine_uniforms();
                        get_floats(line + 15, c, 4);

@@ -3069,18 +3069,18 @@ piglit_display(void)
                                         2.0 * (c[2] / piglit_width),
                                         2.0 * (c[3] / piglit_height));
                } else if (string_match("draw rect patch", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        get_floats(line + 15, c, 4);
                        piglit_draw_rect_custom(c[0], c[1], c[2], c[3], true);
                } else if (string_match("draw rect", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        program_subroutine_uniforms();
                        get_floats(line + 9, c, 4);
                        piglit_draw_rect(c[0], c[1], c[2], c[3]);
                } else if (string_match("draw instanced rect", line)) {
                        int primcount;

-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        sscanf(line + 19, "%d %f %f %f %f",
                               &primcount,
                               c + 0, c + 1, c + 2, c + 3);
@@ -3089,7 +3089,7 @@ piglit_display(void)
                        GLenum mode = decode_drawing_mode(s);
                        int first = x;
                        size_t count = (size_t) y;
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        if (first < 0) {
                                printf("draw arrays 'first' must be >= 0\n");
                                piglit_report_result(PIGLIT_FAIL);
@@ -3483,10 +3483,10 @@ piglit_display(void)
                } else if (string_match("texparameter ", line)) {
                        handle_texparameter(line + strlen("texparameter "));
                } else if (string_match("uniform", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        set_uniform(line + 7, ubo_array_index);
                } else if (string_match("subuniform", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                        check_shader_subroutine_support();
                        set_subroutine_uniform(line + 10);
                } else if (string_match("parameter ", line)) {
@@ -3504,7 +3504,7 @@ piglit_display(void)
                                fprintf(stderr, "Failed to link:\n%s\n", 
prog_err_info);
                        }
                } else if (string_match("link success", line)) {
-                       program_must_be_in_use();
+                       result = program_must_be_in_use();
                } else if (string_match("ubo array index ", line)) {
                        get_ints(line + strlen("ubo array index "), 
&ubo_array_index, 1);
                } else if (string_match("active uniform ", line)) {


Reviewed-by: Brian Paul <bri...@vmware.com>

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to