summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-03-20 21:26:19 +0100
committerMarek Olšák <[email protected]>2010-03-21 02:19:55 +0100
commit951d89ae3a01b2d7f482b95da0a6d647c6855a68 (patch)
tree85c3fa00c09ea1bd97d0f8188e279a090cc833d8 /src/gallium/drivers/r300
parent7b38f946a05045323da0d367baff19bb62950af9 (diff)
r300g: skip null vertex buffers
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 6328374e301..7ab76bfb8d3 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1039,7 +1039,6 @@ r300_create_sampler_view(struct pipe_context *pipe,
return view;
}
-
static void
r300_sampler_view_destroy(struct pipe_context *pipe,
struct pipe_sampler_view *view)
@@ -1125,6 +1124,12 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
/* Reference our buffer. */
pipe_buffer_reference(&r300->vertex_buffer[i].buffer, vbo->buffer);
+
+ /* Skip NULL buffers */
+ if (!buffers[i].buffer) {
+ continue;
+ }
+
if (r300_buffer_is_user_buffer(vbo->buffer)) {
any_user_buffer = TRUE;
}