summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_buffer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-02 02:45:27 +0200
committerMarek Olšák <[email protected]>2012-04-04 13:09:47 +0200
commite9abb2cd6e93681504fbcf323c790e3950304734 (patch)
tree2dab3315e45c579a99f7bafe1d556188982a7669 /src/gallium/drivers/r600/r600_buffer.c
parent82a7fe6f5c93e6787f99124974af0dbcafef5fb1 (diff)
r600g: inline r600_upload_const_buffer
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index f9f32b2c7ee..b165c319de4 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -25,7 +25,6 @@
* Corbin Simpson <[email protected]>
*/
#include "r600_pipe.h"
-#include <byteswap.h>
#include "util/u_upload_mgr.h"
static void r600_buffer_destroy(struct pipe_screen *screen,
@@ -267,38 +266,3 @@ void r600_upload_index_buffer(struct r600_context *rctx,
u_upload_data(rctx->vbuf_mgr->uploader, 0, count * ib->index_size,
rbuffer->b.user_ptr, &ib->offset, &ib->buffer);
}
-
-void r600_upload_const_buffer(struct r600_context *rctx, struct r600_resource **rbuffer,
- uint32_t *const_offset)
-{
- if ((*rbuffer)->b.user_ptr) {
- uint8_t *ptr = (*rbuffer)->b.user_ptr;
- unsigned size = (*rbuffer)->b.b.b.width0;
-
- *rbuffer = NULL;
-
- if (R600_BIG_ENDIAN) {
- uint32_t *tmpPtr;
- unsigned i;
-
- if (!(tmpPtr = malloc(size))) {
- R600_ERR("Failed to allocate BE swap buffer.\n");
- return;
- }
-
- for (i = 0; i < size / 4; ++i) {
- tmpPtr[i] = bswap_32(((uint32_t *)ptr)[i]);
- }
-
- u_upload_data(rctx->vbuf_mgr->uploader, 0, size, tmpPtr, const_offset,
- (struct pipe_resource**)rbuffer);
-
- free(tmpPtr);
- } else {
- u_upload_data(rctx->vbuf_mgr->uploader, 0, size, ptr, const_offset,
- (struct pipe_resource**)rbuffer);
- }
- } else {
- *const_offset = 0;
- }
-}