summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2018-07-30 15:20:00 -0700
committerKenneth Graunke <kenneth@whitecape.org>2018-10-14 23:36:28 -0700
commit38a23517fdc2c4bce5d72cc32cac2b543b460d77 (patch)
tree43fc42348c98af522d9b40bcd5939ef2957c5e56 /src/gallium/drivers
parentc3d219837af66b4299ab7e746b65ff33a0a6ca0d (diff)
gallium/u_transfer_helper: Add support for separate Z24/S8 as well.
u_transfer_helper already had code to handle treating packed Z32_S8 as separate Z32_FLOAT and S8_UINT resources, since some drivers can't handle that interleaved format natively. Other hardware needs depth and stencil as separate resources for all formats. For example, V3D3 needs this for 24-bit depth as well. This patch adds a new flag to lower all depth/stencils formats, and implements support for Z24_UNORM_S8_UINT. (S8_UINT_Z24_UNORM is left as an exercise to the reader, preferably someone who has access to a machine that uses that format.) Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
-rw-r--r--src/gallium/drivers/v3d/v3d_resource.c3
-rw-r--r--src/gallium/drivers/vc4/vc4_resource.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 8fbc7819303..c82be3e2032 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -1183,7 +1183,7 @@ fd_resource_screen_init(struct pipe_screen *pscreen)
pscreen->resource_destroy = u_transfer_helper_resource_destroy;
pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
- true, fake_rgtc, true);
+ true, false, fake_rgtc, true);
if (!screen->setup_slices)
screen->setup_slices = fd_setup_slices;
diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c
index 8bf6a97c394..dd0db8cfd89 100644
--- a/src/gallium/drivers/v3d/v3d_resource.c
+++ b/src/gallium/drivers/v3d/v3d_resource.c
@@ -909,7 +909,8 @@ v3d_resource_screen_init(struct pipe_screen *pscreen)
pscreen->resource_get_handle = v3d_resource_get_handle;
pscreen->resource_destroy = u_transfer_helper_resource_destroy;
pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
- true, true, true);
+ true, false,
+ true, true);
}
void
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index e169303f4a3..94784bbdc0a 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -1129,7 +1129,8 @@ vc4_resource_screen_init(struct pipe_screen *pscreen)
pscreen->resource_get_handle = vc4_resource_get_handle;
pscreen->resource_destroy = vc4_resource_destroy;
pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
- false, false, true);
+ false, false,
+ false, true);
/* Test if the kernel has GET_TILING; it will return -EINVAL if the
* ioctl does not exist, but -ENOENT if we pass an impossible handle.