nvk: Fix the NO_PREFETCH assert for CmdDrawIndirect
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Thu, 4 May 2023 19:32:19 +0000 (14:32 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:05 +0000 (21:32 +0000)
The NO_PREFETCH bit gets set on the range.  The offset can pretty much
be whatever.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_cmd_buffer.c

index a493c96..e7f8b66 100644 (file)
@@ -158,7 +158,7 @@ nvk_cmd_buffer_push_indirect_buffer(struct nvk_cmd_buffer *cmd,
    /* TODO: The new uAPI should just take addresses */
    struct nouveau_ws_bo *bo = buffer->mem->bo;
    uint64_t bo_offset = nvk_buffer_address(buffer, offset) - bo->offset;
-   assert(bo_offset < NVC0_IB_ENTRY_1_NO_PREFETCH);
+   assert(range < NVC0_IB_ENTRY_1_NO_PREFETCH);
 
    struct nvk_cmd_push push = {
       .bo = bo,