lavapipe: don't copy pNext
authorDave Airlie <airlied@redhat.com>
Mon, 7 Dec 2020 23:35:01 +0000 (09:35 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 10 Dec 2020 00:46:27 +0000 (10:46 +1000)
We have to ignore unknown structs, so don't init the deep copy pNext
with the src.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7978>

src/gallium/frontends/lavapipe/lvp_pipeline.c

index 50c2416..7b36ce6 100644 (file)
@@ -174,8 +174,7 @@ deep_copy_viewport_state(void *mem_ctx,
                          const VkPipelineViewportStateCreateInfo *src)
 {
    dst->sType = src->sType;
-   dst->pNext = src->pNext;
-
+   dst->pNext = NULL;
    dst->flags = src->flags;
 
    if (src->pViewports) {
@@ -205,7 +204,7 @@ deep_copy_color_blend_state(void *mem_ctx,
                             const VkPipelineColorBlendStateCreateInfo *src)
 {
    dst->sType = src->sType;
-   dst->pNext = src->pNext;
+   dst->pNext = NULL;
    dst->flags = src->flags;
    dst->logicOpEnable = src->logicOpEnable;
    dst->logicOp = src->logicOp;
@@ -227,7 +226,7 @@ deep_copy_dynamic_state(void *mem_ctx,
                         const VkPipelineDynamicStateCreateInfo *src)
 {
    dst->sType = src->sType;
-   dst->pNext = src->pNext;
+   dst->pNext = NULL;
    dst->flags = src->flags;
 
    LVP_PIPELINE_DUP(dst->pDynamicStates,