summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-06 23:34:33 +0000
committerKeith Whitwell <[email protected]>2009-11-11 18:51:57 -0800
commita010307e0adc2c0d4ef586c81507d99ef15c2142 (patch)
treeac960047c5ae5ecf4a7c1b427e7a8b0806310efc /src/gallium/drivers
parente4d174ea1b36976f3dd255ee6b86207ad5b25c31 (diff)
i965g: some more cases where file_max[] is used without obligatory +1
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_vs_emit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/i965/brw_vs_emit.c b/src/gallium/drivers/i965/brw_vs_emit.c
index e0fadc8dce7..26f0ec5a11a 100644
--- a/src/gallium/drivers/i965/brw_vs_emit.c
+++ b/src/gallium/drivers/i965/brw_vs_emit.c
@@ -82,15 +82,15 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
* works if everything fits in the GRF.
* XXX this heuristic/check may need some fine tuning...
*/
- if (c->vp->info.file_max[TGSI_FILE_CONSTANT] +
- c->vp->info.file_max[TGSI_FILE_IMMEDIATE] +
- c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 > BRW_MAX_GRF)
+ if (c->vp->info.file_max[TGSI_FILE_CONSTANT] + 1 +
+ c->vp->info.file_max[TGSI_FILE_IMMEDIATE] + 1 +
+ c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 1 + 21 > BRW_MAX_GRF)
c->vp->use_const_buffer = GL_TRUE;
else {
/* XXX: immediates can go elsewhere if necessary:
*/
- assert(c->vp->info.file_max[TGSI_FILE_IMMEDIATE] +
- c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 <= BRW_MAX_GRF);
+ assert(c->vp->info.file_max[TGSI_FILE_IMMEDIATE] + 1 +
+ c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 1 + 21 <= BRW_MAX_GRF);
c->vp->use_const_buffer = GL_FALSE;
}