summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_state_emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_state_emit.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_emit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c
index 49c0d130c5..670eb26bdd 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_emit.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c
@@ -77,8 +77,10 @@ cell_emit_state(struct cell_context *cell)
}
if (cell->dirty & CELL_NEW_SAMPLER) {
- emit_state_cmd(cell, CELL_CMD_STATE_SAMPLER,
- cell->sampler[0], sizeof(struct pipe_sampler_state));
+ if (cell->sampler[0]) {
+ emit_state_cmd(cell, CELL_CMD_STATE_SAMPLER,
+ cell->sampler[0], sizeof(struct pipe_sampler_state));
+ }
}
if (cell->dirty & CELL_NEW_TEXTURE) {