nvfx: don't crash on empty fragment program
This commit is contained in:
parent
e14d812e15
commit
83f4c444f4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue