summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_transfer.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-07-24 11:10:48 +0800
committerChia-I Wu <[email protected]>2014-07-24 13:21:35 +0800
commitcbc943c43ec5ce5ba625b2833bf7f911e798254e (patch)
tree35d87836f02287a365172dbfeaff59533dcc5c3f /src/gallium/drivers/ilo/ilo_transfer.c
parentcf8c9947a844c570eb420eefc3a0ab2bef82dc96 (diff)
ilo: clean up resource bo renaming
s/alloc_bo/rename_bo/ as that is what the functions do. Simplify bo allocation and move the complexity to bo renaming.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_transfer.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_transfer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_transfer.c b/src/gallium/drivers/ilo/ilo_transfer.c
index 4a38e29e076..f55bd261f75 100644
--- a/src/gallium/drivers/ilo/ilo_transfer.c
+++ b/src/gallium/drivers/ilo/ilo_transfer.c
@@ -136,8 +136,8 @@ choose_transfer_method(struct ilo_context *ilo, struct ilo_transfer *xfer)
}
else if (usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) {
/* discard old bo and allocate a new one for mapping */
- if ((tex && ilo_texture_alloc_bo(tex)) ||
- (buf && ilo_buffer_alloc_bo(buf))) {
+ if ((tex && ilo_texture_rename_bo(tex)) ||
+ (buf && ilo_buffer_rename_bo(buf))) {
ilo_mark_states_with_resource_dirty(ilo, res);
will_stall = false;
}
@@ -948,7 +948,7 @@ buf_pwrite(struct ilo_context *ilo, struct ilo_buffer *buf,
if (usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) {
/* old data not needed so discard the old bo to avoid stalling */
- if (ilo_buffer_alloc_bo(buf)) {
+ if (ilo_buffer_rename_bo(buf)) {
ilo_mark_states_with_resource_dirty(ilo, &buf->base);
will_stall = false;
}