v3dv: reset all state to dirty when we start a new job for a command buffer

Most of our state doesn't carry over across jobs, so it needs to be re-emitted.
For example, if we have two render passes running back to back using the
same pipeline, the application could decide to only bind the vertex buffer
or/and the pipeline just once, but as soon as we record the second render
pass and create a new job for it we will need to re-emit the shader state
record for it just because it is a new job.

We could probably only do this for jobs inside a render pass, since those
are the only ones that actually draw something and need to care about
dirty state, however, there is no harm in doing this for all jobs, for the
same reason.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index d37383e..9398e2c 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -527,15 +527,25 @@
    v3dv_cl_init(job, &job->indirect);
    v3dv_cl_begin(&job->indirect);
 
-   /* Keep track of the first subpass that we are recording in this new job.
-    * We will use this when we emit the RCL to decide how to emit our loads
-    * and stores.
-    */
-   if (cmd_buffer && cmd_buffer->state.pass)
-      job->first_subpass = subpass_idx;
-
    if (V3D_DEBUG & V3D_DEBUG_ALWAYS_FLUSH)
       job->always_flush = true;
+
+   if (cmd_buffer) {
+      /* Flag all state as dirty. Generally, we need to re-emit state for each
+       * new job.
+       *
+       * FIXME: there may be some exceptions, in which case we could skip some
+       * bits.
+       */
+      cmd_buffer->state.dirty = ~0;
+
+      /* Keep track of the first subpass that we are recording in this new job.
+       * We will use this when we emit the RCL to decide how to emit our loads
+       * and stores.
+       */
+      if (cmd_buffer->state.pass)
+         job->first_subpass = subpass_idx;
+   }
 }
 
 struct v3dv_job *