diff options
author | Oskar Rundgren <oskar.rundgren@imgtec.com> | 2023-05-05 10:16:41 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-05-16 18:09:03 +0000 |
commit | b106752782d1ddd832ab465d544970a84a2dea89 (patch) | |
tree | 7f90eaa553d530f8dbc9323787f34cc6d5a0c526 | |
parent | d8bd30d9b24bab8b62eec045ee35bec80508d6dd (diff) | |
download | mesa-b106752782d1ddd832ab465d544970a84a2dea89.tar.gz |
pvr: Add back S8_UINT support
Revert "pvr: Don't advertise S8_UINT support"
Adding back support for S8_UINT format. It's used in many deqp tests.
Example:
dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats
.depth_stencil.2d.d24_unorm_s8_uint_d24_unorm_s8_uint.optimal_optimal
This reverts commit ff07610462d5100a1ade101c1960beb4a454e7ce.
Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>
-rw-r--r-- | src/imagination/vulkan/pvr_formats.c | 2 | ||||
-rw-r--r-- | src/imagination/vulkan/pvr_job_render.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/imagination/vulkan/pvr_formats.c b/src/imagination/vulkan/pvr_formats.c index a977c11c36f..76c7a160362 100644 --- a/src/imagination/vulkan/pvr_formats.c +++ b/src/imagination/vulkan/pvr_formats.c @@ -200,6 +200,8 @@ static const struct pvr_format pvr_format_table[] = { FORMAT_DEPTH_STENCIL(D16_UNORM, U16, U16, INVALID), /* VK_FORMAT_D32_SFLOAT = 126. */ FORMAT_DEPTH_STENCIL(D32_SFLOAT, F32, F32, INVALID), + /* VK_FORMAT_S8_UINT = 127. */ + FORMAT_DEPTH_STENCIL(S8_UINT, U8, INVALID, U8), /* VK_FORMAT_D24_UNORM_S8_UINT = 129. */ FORMAT_DEPTH_STENCIL(D24_UNORM_S8_UINT, ST8U24, X8U24, U8X24), /* VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147. */ diff --git a/src/imagination/vulkan/pvr_job_render.c b/src/imagination/vulkan/pvr_job_render.c index d3301678522..34cd261b632 100644 --- a/src/imagination/vulkan/pvr_job_render.c +++ b/src/imagination/vulkan/pvr_job_render.c @@ -1445,11 +1445,12 @@ static void pvr_frag_state_stream_init(struct pvr_render_ctx *ctx, if (job->has_stencil_attachment) { value.addr = job->ds.addr; - /* This should be set if we only have a stencil attachment; all - * currently supported formats with a stencil component also contain - * depth. + /* Enable separate stencil. This should be enabled iff the buffer set + * in CR_ISP_STENCIL_LOAD_BASE does not contain a depth component. */ - value.enable = false; + assert(job->has_depth_attachment || + job->ds.vk_format == VK_FORMAT_S8_UINT); + value.enable = !job->has_depth_attachment; } } stream_ptr += pvr_cmd_length(CR_ISP_STENCIL_LOAD_BASE); |