diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-07-05 00:53:13 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-07-05 00:53:13 +1000 |
commit | 77f8167d75d0016c76812fc147c06072e5729965 (patch) | |
tree | f610929b3fa6d62013593df797b9e05d7c1452b4 /src/gallium/auxiliary/tgsi/exec/tgsi_exec.c | |
parent | 6f56b527d866506a323feb19f9d8529d40034af2 (diff) | |
parent | 194cfc7a4ed86653db34be0e331ad7c23b5334eb (diff) |
Merge remote branch 'upstream/gallium-0.1' into gallium-0.1
Diffstat (limited to 'src/gallium/auxiliary/tgsi/exec/tgsi_exec.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/exec/tgsi_exec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/exec/tgsi_exec.c b/src/gallium/auxiliary/tgsi/exec/tgsi_exec.c index 13b8c2e5bf..46949661af 100644 --- a/src/gallium/auxiliary/tgsi/exec/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/exec/tgsi_exec.c @@ -214,7 +214,7 @@ tgsi_exec_machine_bind_shader( break; case TGSI_TOKEN_TYPE_INSTRUCTION: - assert( labels->count < 128 ); + assert( labels->count < MAX_LABELS ); labels->labels[labels->count][0] = instno; labels->labels[labels->count][1] = pointer; @@ -262,7 +262,7 @@ tgsi_exec_machine_init( uint i; mach->Temps = (struct tgsi_exec_vector *) tgsi_align_128bit( mach->_Temps); - mach->Addrs = &mach->Temps[TGSI_EXEC_NUM_TEMPS]; + mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR]; /* Setup constants. */ for( i = 0; i < 4; i++ ) { @@ -941,6 +941,7 @@ fetch_src_file_channel( break; case TGSI_FILE_TEMPORARY: + assert(index->i[0] < TGSI_EXEC_NUM_TEMPS); chan->u[0] = mach->Temps[index->i[0]].xyzw[swizzle].u[0]; chan->u[1] = mach->Temps[index->i[1]].xyzw[swizzle].u[1]; chan->u[2] = mach->Temps[index->i[2]].xyzw[swizzle].u[2]; @@ -1127,6 +1128,7 @@ store_dest( break; case TGSI_FILE_TEMPORARY: + assert(reg->DstRegister.Index < TGSI_EXEC_NUM_TEMPS); dst = &mach->Temps[reg->DstRegister.Index].xyzw[chan_index]; break; |