r600g: Also set const_offset if the buffer is not a user buffer in r600_upload_const_...
authorHenri Verbeet <hverbeet@gmail.com>
Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)
committerHenri Verbeet <hverbeet@gmail.com>
Fri, 7 Jan 2011 17:21:12 +0000 (18:21 +0100)
src/gallium/drivers/r600/r600_buffer.c

index 1b0000ba46294350d3ebd8047d632b587d296beb..469c8195fe9b7a8739fa1512dabd8239366b599e 100644 (file)
@@ -270,7 +270,9 @@ int r600_upload_const_buffer(struct r600_pipe_context *rctx, struct pipe_resourc
                        return ret;
                rbuffer->uploaded = TRUE;
                *const_offset = upload_offset;
+               return 0;
        }
 
+       *const_offset = 0;
        return 0;
 }