tu: tu: Clear patchControlPoints dirty state with static patchControlPoints
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 10 Oct 2022 20:19:39 +0000 (22:19 +0200)
committerEric Engestrom <eric@engestrom.ch>
Wed, 9 Nov 2022 21:22:05 +0000 (21:22 +0000)
Noticed by inspection after the previous issue.

Fixes: 68f3c38c801 ("tu: Implement extendedDynamicState2PatchControlPoints")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18912>
(cherry picked from commit 4466f9aa02dec99c6879e5e357788843c3b573e5)

.pick_status.json
src/freedreno/vulkan/tu_cmd_buffer.c

index 4b4658f..da27178 100644 (file)
         "description": "tu: tu: Clear patchControlPoints dirty state with static patchControlPoints",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "68f3c38c8011e3ff304a67b6ffb33fd21ee65b0c"
     },
index db18d28..d8b92af 100644 (file)
@@ -2594,10 +2594,12 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer,
       cmd->state.rp.has_tess = true;
 
       if (!(pipeline->dynamic_state_mask &
-            BIT(TU_DYNAMIC_STATE_PATCH_CONTROL_POINTS)))
+            BIT(TU_DYNAMIC_STATE_PATCH_CONTROL_POINTS))) {
          cmd->state.patch_control_points = pipeline->tess.patch_control_points;
-      else
+         cmd->state.dirty &= ~TU_CMD_DIRTY_PATCH_CONTROL_POINTS;
+      } else {
          cmd->state.dirty |= TU_CMD_DIRTY_PATCH_CONTROL_POINTS;
+      }
    }
 
    cmd->state.line_mode = pipeline->rast.line_mode;