summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2012-01-31 23:12:22 -0500
committerZack Rusin <[email protected]>2012-02-01 16:34:57 -0500
commitcff0eac702e0070d4d7f0e2ae5f785ec10597d4d (patch)
tree896a51b8d1c739dfeab5b1b3734970e295f75fb6 /src/gallium
parent3279561e9ab3a6f25215b8e857493d2b9ae6bdd9 (diff)
svga: fix a crash happening before setting fragment shaders.
In certain situations API's will call pipe->clear which doesn't require fragment shader, but then we'd try to verify the pipeline and assume fragment shader was always set. This was leading to crash when API would just call simple clear's before anything else. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_state_need_swtnl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index 8c39a4b76f0..32355d136cd 100644
--- a/src/gallium/drivers/svga/svga_state_need_swtnl.c
+++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c
@@ -145,7 +145,8 @@ update_need_pipeline( struct svga_context *svga,
*/
if (svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
unsigned sprite_coord_gen = svga->curr.rast->templ.sprite_coord_enable;
- unsigned generic_inputs = svga->curr.fs->generic_inputs;
+ unsigned generic_inputs =
+ svga->curr.fs ? svga->curr.fs->generic_inputs : 0;
if (sprite_coord_gen &&
(generic_inputs & ~sprite_coord_gen)) {