From 6f0af537de89d221bc354847e7da5b9dad95b917 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Fri, 10 Sep 2021 12:45:20 -0700 Subject: [PATCH] vrend: Make the compile failure path return value consistent. It doesn't end up getting used because the sub_ctx->prog check happens first, but let's not return a surprising truthy value from one fail path of a bool function. Reviewed-by: Chia-I Wu --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index dd31b4f..27e2efd 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -4672,7 +4672,7 @@ vrend_select_program(struct vrend_sub_context *sub_ctx, const struct pipe_draw_i struct vrend_shader *shader = sel->current; if (shader && !shader->is_compiled) {//shader->sel->type == PIPE_SHADER_FRAGMENT || shader->sel->type == PIPE_SHADER_GEOMETRY) { if (!vrend_compile_shader(sub_ctx, shader)) - return -1; + return false; } if (vrend_state.use_gles && sel->sinfo.gles_use_tex_query_level) gles_emulate_query_texture_levels_mask |= 1 << i;