diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-10 14:50:48 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-11 14:27:25 +0000 |
commit | 507e297431b9e55ddf3bea4a4039cec4824596a1 (patch) | |
tree | 5c5a02777f111d45cb315ecf2de3009810cbae4c /src/gallium/drivers/panfrost/pan_afbc.c | |
parent | cd403a931fb953249ab8b046ecd614287afc2d2d (diff) |
panfrost: Don't lie about Z/S formats
Only Z24S8 is properly supported right now, so let's be careful. Fixes a
number of issues relating to improper Z/S handling. The most obvious is
depth buffers with incorrect strides, which manifests in truly bizarre
ways and can happen commonly with FBOs.
Fixes WebGL (Aquarium runs, etc).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_afbc.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_afbc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_afbc.c b/src/gallium/drivers/panfrost/pan_afbc.c index 298c04be1c4..23e1ec921dd 100644 --- a/src/gallium/drivers/panfrost/pan_afbc.c +++ b/src/gallium/drivers/panfrost/pan_afbc.c @@ -93,7 +93,12 @@ panfrost_format_supports_afbc(enum pipe_format format) if (util_format_is_rgba8_variant(desc)) return true; - if (format == PIPE_FORMAT_Z32_UNORM) + /* Z32/Z16/S8 are all compressible as well, but they are implemented as + * Z24S8 with wasted bits. So Z24S8 is the only format we actually need + * to handle compressed, and we can make the state tracker deal with + * the rest. */ + + if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT) return true; /* TODO: AFBC of other formats */ |