diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-03-12 02:47:44 -0800 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-03-12 02:54:10 -0800 |
commit | e42b2f768509b6984c7186805c6a8afdaebf3a06 (patch) | |
tree | 56fdcef6c411aadd34ee8d01a81667a26d50216c /src/gallium/drivers/r300/r300_state.c | |
parent | 915b3529b9794c0d41f37b33365eeeb9b2152e9d (diff) |
r300g: Properly clamp index limits.
Make the kernel even less likely to barf on us.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index bd4c2766cb..ced6c810ec 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1031,7 +1031,7 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, const struct pipe_vertex_buffer* buffers) { struct r300_context* r300 = r300_context(pipe); - unsigned i, max_index = ~0; + unsigned i, max_index = (1 << 24) - 1; memcpy(r300->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count); |