projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ead22e6
)
r300/compiler: Assert that array index is not negative.
author
Vinson Lee
<vlee@vmware.com>
Fri, 26 Feb 2010 08:17:03 +0000
(
00:17
-0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 26 Feb 2010 08:17:03 +0000
(
00:17
-0800)
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
index 829f028950c99b191d4a46156004d6e2e49b9c84..710cae727a1a321b7874462251505dc18ebf7b59 100644
(file)
--- a/
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@
-469,6
+469,8
@@
void r500BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compi
if (compiler->Base.Error)
return;
+ assert(code->inst_end >= 0);
+
if ((code->inst[code->inst_end].inst0 & R500_INST_TYPE_MASK) != R500_INST_TYPE_OUT) {
/* This may happen when dead-code elimination is disabled or
* when most of the fragment program logic is leading to a KIL */