summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.c2
-rw-r--r--src/gallium/drivers/ilo/ilo_transfer.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index 7961288179d..5ca7e1b0a5a 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -204,7 +204,7 @@ resource_get_image_info(const struct pipe_resource *templ,
* images when the image size is greater than one-fourth of the mappable
* aperture.
*/
- if (templ->bind & (PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_TRANSFER_READ))
+ if (templ->usage == PIPE_USAGE_STAGING)
info->prefer_linear_threshold = dev->aperture_mappable / 4;
info->bind_surface_sampler = (templ->bind & PIPE_BIND_SAMPLER_VIEW);
diff --git a/src/gallium/drivers/ilo/ilo_transfer.c b/src/gallium/drivers/ilo/ilo_transfer.c
index 87607ebe80d..c0dab31440c 100644
--- a/src/gallium/drivers/ilo/ilo_transfer.c
+++ b/src/gallium/drivers/ilo/ilo_transfer.c
@@ -180,7 +180,6 @@ xfer_alloc_staging_res(struct ilo_transfer *xfer)
templ.array_size = box->depth;
templ.nr_samples = 1;
templ.usage = PIPE_USAGE_STAGING;
- templ.bind = PIPE_BIND_TRANSFER_WRITE;
if (xfer->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT) {
templ.flags = PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
@@ -1111,7 +1110,7 @@ buf_pwrite(struct ilo_context *ilo, struct pipe_resource *res,
templ = *res;
templ.width0 = size;
templ.usage = PIPE_USAGE_STAGING;
- templ.bind = PIPE_BIND_TRANSFER_WRITE;
+ templ.bind = 0;
staging = ilo->base.screen->resource_create(ilo->base.screen, &templ);
if (staging) {
const struct ilo_vma *staging_vma = ilo_resource_get_vma(staging);