aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-07-09 16:34:00 -0400
committerMarge Bot <[email protected]>2020-07-16 19:59:43 +0000
commitcce3d925d24220549075461ad89ed0f30714abb8 (patch)
treefbd1199f73595efbd4db42bd4fb4a569e4830628 /src/gallium/drivers
parent6ffebfbff8a6bc8b4ec14946037378c45136223b (diff)
panfrost: Implement Z32F_S8 blits
Requires the ability to texture the stencil-only portion, and then u_blitter kicks in for the rest. v2: Fix dEQP-GLES31.functional.stencil_texturing.* Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index e63afd8d9cc..37c9fee621c 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -937,8 +937,17 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
{
struct panfrost_device *device = pan_device(pctx->screen);
struct panfrost_resource *prsrc = (struct panfrost_resource *)texture;
+ enum pipe_format format = so->base.format;
assert(prsrc->bo);
+ /* Format to access the stencil portion of a Z32_S8 texture */
+ if (so->base.format == PIPE_FORMAT_X32_S8X24_UINT) {
+ assert(prsrc->separate_stencil);
+ texture = &prsrc->separate_stencil->base;
+ prsrc = (struct panfrost_resource *)texture;
+ format = texture->format;
+ }
+
so->texture_bo = prsrc->bo->gpu;
so->layout = prsrc->layout;
@@ -977,7 +986,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
if (device->quirks & IS_BIFROST) {
const struct util_format_description *desc =
- util_format_description(so->base.format);
+ util_format_description(format);
unsigned char composed_swizzle[4];
util_format_compose_swizzles(desc->swizzle, user_swizzle, composed_swizzle);
@@ -996,7 +1005,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
so->bifrost_descriptor,
texture->width0, texture->height0,
depth, array_size,
- so->base.format,
+ format,
type, prsrc->layout,
so->base.u.tex.first_level,
so->base.u.tex.last_level,
@@ -1024,7 +1033,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
so->bo->cpu,
texture->width0, texture->height0,
depth, array_size,
- so->base.format,
+ format,
type, prsrc->layout,
so->base.u.tex.first_level,
so->base.u.tex.last_level,