anv: Flag descriptors dirty when gl_NumWorkgroups is used
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 8 Jan 2020 20:47:11 +0000 (14:47 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 10 Jan 2020 01:45:00 +0000 (19:45 -0600)
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 66f0d7c61574e03323b418f50954e9b8a224a98d..6797efd30688effc8a5c52432ae2b0e1e4c7f405 100644 (file)
@@ -3908,6 +3908,9 @@ void genX(CmdDispatchBase)(
          .bo = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
          .offset = state.offset,
       };
+
+      /* The num_workgroups buffer goes in the binding table */
+      cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_COMPUTE_BIT;
    }
 
    genX(cmd_buffer_flush_compute_state)(cmd_buffer);
@@ -3958,9 +3961,13 @@ void genX(CmdDispatchIndirect)(
       return;
 #endif
 
-   if (prog_data->uses_num_work_groups)
+   if (prog_data->uses_num_work_groups) {
       cmd_buffer->state.compute.num_workgroups = addr;
 
+      /* The num_workgroups buffer goes in the binding table */
+      cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_COMPUTE_BIT;
+   }
+
    genX(cmd_buffer_flush_compute_state)(cmd_buffer);
 
    struct gen_mi_builder b;