galahad: Don't defer index buffer when it's NULL.

This commit is contained in:
José Fonseca 2012-07-06 16:55:09 +01:00
parent 232073b0d9
commit 04d29afb8b
1 changed files with 17 additions and 17 deletions

View File

@ -634,6 +634,7 @@ galahad_set_index_buffer(struct pipe_context *_pipe,
struct pipe_context *pipe = glhd_pipe->pipe;
struct pipe_index_buffer unwrapped_ib, *ib = NULL;
if (_ib) {
if (_ib->buffer) {
switch (_ib->index_size) {
case 1:
@ -651,7 +652,6 @@ galahad_set_index_buffer(struct pipe_context *_pipe,
_ib->offset, _ib->index_size);
}
if (_ib) {
unwrapped_ib = *_ib;
unwrapped_ib.buffer = galahad_resource_unwrap(_ib->buffer);
ib = &unwrapped_ib;