anv/cmd: Dirty descriptor sets when a new pipeline is bound
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 21 Jun 2016 22:32:09 +0000 (15:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 21 Jun 2016 23:45:25 +0000 (16:45 -0700)
Ever since c2581a9375ea, the binding table layout has depended on the
pipeline.  This means that whenever we change pipelines we also need to
re-emit binding tables for the new layout.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/genX_cmd_buffer.c

index 8fc09b9d6c2707c64a47d8c0356d5569f965343f..95f9b48201d64e777f91bc0e73523235cbb3f766 100644 (file)
@@ -512,6 +512,12 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
 
       anv_batch_emit_batch(&cmd_buffer->batch, &pipeline->batch);
 
+      /* The exact descriptor layout is pulled from the pipeline, so we need
+       * to re-emit binding tables on every pipeline change.
+       */
+      cmd_buffer->state.descriptors_dirty |=
+         cmd_buffer->state.pipeline->active_stages;
+
       /* If the pipeline changed, we may need to re-allocate push constant
        * space in the URB.
        */