gen8/cmd_buffer: Flush push constants after descriptor sets
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 8 Dec 2015 05:45:41 +0000 (21:45 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 8 Dec 2015 05:45:43 +0000 (21:45 -0800)
This is because, if storage images are used, flushing descriptor sets can
cause push constants to become dirty.

src/vulkan/gen8_cmd_buffer.c

index 68ee6bb5696b5a12b636c663e1294efe1c3fbf74..df97d2711380caba5e99d929c11b8bf008512419 100644 (file)
@@ -208,12 +208,12 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
       cmd_buffer->state.pipeline->active_stages;
 #endif
 
-   if (cmd_buffer->state.push_constants_dirty)
-      cmd_buffer_flush_push_constants(cmd_buffer);
-
    if (cmd_buffer->state.descriptors_dirty)
       gen7_cmd_buffer_flush_descriptor_sets(cmd_buffer);
 
+   if (cmd_buffer->state.push_constants_dirty)
+      cmd_buffer_flush_push_constants(cmd_buffer);
+
    if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_VIEWPORT)
       gen8_cmd_buffer_emit_viewport(cmd_buffer);