summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-09-07 21:24:08 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-09-08 22:51:33 +0200
commit5981ab544562c667c882526c31a6f8c2ce6eba12 (patch)
treec2d7c4a1c60ee533ee5cde6aa41aab080ad939e4 /src/gallium/drivers
parent0fbaf749779b5ac6d242c2b6745c20be98567499 (diff)
downloadexternal_mesa3d-5981ab544562c667c882526c31a6f8c2ce6eba12.zip
external_mesa3d-5981ab544562c667c882526c31a6f8c2ce6eba12.tar.gz
external_mesa3d-5981ab544562c667c882526c31a6f8c2ce6eba12.tar.bz2
gallium: remove PIPE_BIND_TRANSFER_READ/WRITE
not used in any useful way Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_screen.c5
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_screen.c5
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_screen.c5
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.c2
-rw-r--r--src/gallium/drivers/ilo/ilo_transfer.c3
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_screen.c6
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_screen.c6
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c6
-rw-r--r--src/gallium/drivers/r300/r300_screen.c6
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c5
-rw-r--r--src/gallium/drivers/r600/r600_state.c5
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c5
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c5
14 files changed, 9 insertions, 57 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
index 007b9e6..12ab5b4 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c
@@ -87,11 +87,6 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
retval |= PIPE_BIND_INDEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if (retval != usage) {
DBG("not supported: format=%s, target=%d, sample_count=%d, "
"usage=%x, retval=%x", util_format_name(format),
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
index 52a284e..998ec7a 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c
@@ -87,11 +87,6 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
retval |= PIPE_BIND_INDEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if (retval != usage) {
DBG("not supported: format=%s, target=%d, sample_count=%d, "
"usage=%x, retval=%x", util_format_name(format),
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
index aa60658..6006bb9 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c
@@ -86,11 +86,6 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
retval |= PIPE_BIND_INDEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if (retval != usage) {
DBG("not supported: format=%s, target=%d, sample_count=%d, "
"usage=%x, retval=%x", util_format_name(format),
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index 7961288..5ca7e1b 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 87607eb..c0dab31 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);
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index ed74c3a..2ced8f1 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -374,10 +374,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
return false;
}
- /* transfers & shared are always supported */
- bindings &= ~(PIPE_BIND_TRANSFER_READ |
- PIPE_BIND_TRANSFER_WRITE |
- PIPE_BIND_SHARED);
+ /* shared is always supported */
+ bindings &= ~PIPE_BIND_SHARED;
return (nv30_format_info(pscreen, format)->bindings & bindings) == bindings;
}
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 57c0c2b..1ec791d 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -75,10 +75,8 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
sample_count > 1)
return false;
- /* transfers & shared are always supported */
- bindings &= ~(PIPE_BIND_TRANSFER_READ |
- PIPE_BIND_TRANSFER_WRITE |
- PIPE_BIND_LINEAR |
+ /* shared is always supported */
+ bindings &= ~(PIPE_BIND_LINEAR |
PIPE_BIND_SHARED);
return (( nv50_format_table[format].usage |
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 0627f3d..0103031 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -84,10 +84,8 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
nouveau_screen(pscreen)->class_3d != NVEA_3D_CLASS)
return false;
- /* transfers & shared are always supported */
- bindings &= ~(PIPE_BIND_TRANSFER_READ |
- PIPE_BIND_TRANSFER_WRITE |
- PIPE_BIND_LINEAR |
+ /* shared is always supported */
+ bindings &= ~(PIPE_BIND_LINEAR |
PIPE_BIND_SHARED);
if (bindings & PIPE_BIND_SHADER_IMAGE && sample_count > 1 &&
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 509feae..f6949ce 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -664,12 +664,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
}
}
- /* Transfers are always supported. */
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
return retval == usage;
}
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index ed385ee..d137514 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -294,11 +294,6 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
retval |= PIPE_BIND_VERTEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if ((usage & PIPE_BIND_LINEAR) &&
!util_format_is_compressed(format) &&
!(usage & PIPE_BIND_DEPTH_STENCIL))
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index c55c532..2b58d98 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -235,11 +235,6 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
retval |= PIPE_BIND_VERTEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if ((usage & PIPE_BIND_LINEAR) &&
!util_format_is_compressed(format) &&
!(usage & PIPE_BIND_DEPTH_STENCIL))
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index a600793..2e8b6f4 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -386,7 +386,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
struct r600_resource *staging;
staging = (struct r600_resource*) pipe_buffer_create(
- ctx->screen, PIPE_BIND_TRANSFER_READ, PIPE_USAGE_STAGING,
+ ctx->screen, 0, PIPE_USAGE_STAGING,
box->width + (box->x % R600_MAP_BUFFER_ALIGNMENT));
if (staging) {
/* Copy the VRAM buffer to the staging buffer. */
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 280a9f8..0d3de9a 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1856,11 +1856,6 @@ static boolean si_is_format_supported(struct pipe_screen *screen,
retval |= PIPE_BIND_VERTEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
if ((usage & PIPE_BIND_LINEAR) &&
!util_format_is_compressed(format) &&
!(usage & PIPE_BIND_DEPTH_STENCIL))
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 652d9b4..3dc85d5 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -494,11 +494,6 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
retval |= PIPE_BIND_INDEX_BUFFER;
}
- if (usage & PIPE_BIND_TRANSFER_READ)
- retval |= PIPE_BIND_TRANSFER_READ;
- if (usage & PIPE_BIND_TRANSFER_WRITE)
- retval |= PIPE_BIND_TRANSFER_WRITE;
-
#if 0
if (retval != usage) {
fprintf(stderr,