u_transfer_helper: Pack Z24S8 to Z24-in-Z32F and S8

On Asahi needed to pass

   dEQP-GLES3.functional.texture.specification.texsubimage2d_depth.depth24_stencil8

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18136>
This commit is contained in:
Alyssa Rosenzweig
2022-08-20 12:59:01 -04:00
committed by Marge Bot
parent 45a37ace28
commit 6938c9f9cd
+20 -8
View File
@@ -324,14 +324,26 @@ u_transfer_helper_transfer_map(struct pipe_context *pctx,
width, height);
break;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
assert(!helper->z24_in_z32f);
util_format_z24_unorm_s8_uint_pack_separate(trans->staging,
ptrans->stride,
trans->ptr,
trans->trans->stride,
trans->ptr2,
trans->trans2->stride,
width, height);
if (helper->z24_in_z32f) {
util_format_z24_unorm_s8_uint_pack_z_float(trans->staging,
ptrans->stride,
trans->ptr,
trans->trans->stride,
width, height);
util_format_z24_unorm_s8_uint_pack_s_8uint(trans->staging,
ptrans->stride,
trans->ptr2,
trans->trans2->stride,
width, height);
} else {
util_format_z24_unorm_s8_uint_pack_separate(trans->staging,
ptrans->stride,
trans->ptr,
trans->trans->stride,
trans->ptr2,
trans->trans2->stride,
width, height);
}
break;
default:
unreachable("Unexpected format");