aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-01-17 22:27:53 +0100
committerLuca Barbieri <[email protected]>2010-03-23 15:41:10 +0100
commit83f4c444f4e630fe2bfd17ad750f3f17ceff13f6 (patch)
tree1f522da461864c38c95f5e5cb7fb4bc4078c685d /src
parente14d812e158a667ffb096a99e2510da326155670 (diff)
nvfx: don't crash on empty fragment program
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 76351430f44..b9c91cec8ce 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -803,7 +803,8 @@ nvfx_fragprog_translate(struct nvfx_context *nvfx,
fp->fp_control |= fpc->num_regs << NV40TCL_FP_CONTROL_TEMP_COUNT_SHIFT;
/* Terminate final instruction */
- fp->insn[fpc->inst_offset] |= 0x00000001;
+ if(fp->insn)
+ fp->insn[fpc->inst_offset] |= 0x00000001;
/* Append NOP + END instruction, may or may not be necessary. */
fpc->inst_offset = fp->insn_len;