summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/imagination/vulkan/pvr_formats.c2
-rw-r--r--src/imagination/vulkan/pvr_job_render.c9
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);