From: José Fonseca Date: Wed, 18 Sep 2013 19:01:54 +0000 (+0100) Subject: draw: Ensure draw_pt_middle_end::bind_parameters is never NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ab4e1d1e6091f2170b1395b8d1bb30d42f133a7;p=mesa.git draw: Ensure draw_pt_middle_end::bind_parameters is never NULL. Prevents calling NULL pointer with softpipe in certain cases. Trivial. --- diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index 22ec8d6b2b5..4278429a2fe 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -180,6 +180,13 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle, } +static void +fetch_emit_bind_parameters(struct draw_pt_middle_end *middle) +{ + /* No-op? */ +} + + static void fetch_emit_run( struct draw_pt_middle_end *middle, const unsigned *fetch_elts, unsigned fetch_count, @@ -379,6 +386,7 @@ struct draw_pt_middle_end *draw_pt_fetch_emit( struct draw_context *draw ) } fetch_emit->base.prepare = fetch_emit_prepare; + fetch_emit->base.bind_parameters = fetch_emit_bind_parameters; fetch_emit->base.run = fetch_emit_run; fetch_emit->base.run_linear = fetch_emit_run_linear; fetch_emit->base.run_linear_elts = fetch_emit_run_linear_elts; diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index d30cd412ef6..bdfbbfb27da 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -178,6 +178,12 @@ fse_prepare(struct draw_pt_middle_end *middle, } +static void +fse_bind_parameters(struct draw_pt_middle_end *middle) +{ + /* No-op? */ +} + static void fse_run_linear(struct draw_pt_middle_end *middle, @@ -366,6 +372,7 @@ draw_pt_middle_fse(struct draw_context *draw) return NULL; fse->base.prepare = fse_prepare; + fse->base.bind_parameters = fse_bind_parameters; fse->base.run = fse_run; fse->base.run_linear = fse_run_linear; fse->base.run_linear_elts = fse_run_linear_elts;