summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-09-18 20:01:54 +0100
committerJosé Fonseca <[email protected]>2013-09-20 17:34:57 +0100
commit2ab4e1d1e6091f2170b1395b8d1bb30d42f133a7 (patch)
tree6fdcf7bf8bb270cfe684bbb92ee28bd891d14a44 /src
parent75c394f5670125aa5eabdcbeecf83f163806238d (diff)
draw: Ensure draw_pt_middle_end::bind_parameters is never NULL.
Prevents calling NULL pointer with softpipe in certain cases. Trivial.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_emit.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c7
2 files changed, 15 insertions, 0 deletions
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;