From: Jason Ekstrand Date: Wed, 8 Jan 2020 20:47:11 +0000 (-0600) Subject: anv: Flag descriptors dirty when gl_NumWorkgroups is used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae72d1238c758404df045a82c36803dbccd93b31;p=mesa.git anv: Flag descriptors dirty when gl_NumWorkgroups is used Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Caio Marcelo de Oliveira Filho --- diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 66f0d7c6157..6797efd3068 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -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;