nvk/blit: assert that formats are supported

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Karol Herbst
2022-06-15 13:22:08 +02:00
committed by Marge Bot
parent 1de656bce3
commit 43444e1a72
+3
View File
@@ -23,6 +23,9 @@ nvk_CmdBlitImage2(
VK_FROM_HANDLE(nvk_image, dst, pBlitImageInfo->dstImage);
struct nouveau_ws_push *push = cmd->push;
assert(src->format->supports_2d_blit);
assert(dst->format->supports_2d_blit);
nouveau_ws_push_ref(push, src->mem->bo, NOUVEAU_WS_BO_RD);
nouveau_ws_push_ref(push, dst->mem->bo, NOUVEAU_WS_BO_WR);