[Mesa-dev] [PATCH 3/3] radv: Don't explicitly reference vertex shader for draw_id.

Samuel Pitoiset samuel.pitoiset at gmail.com
Sat Oct 21 17:23:40 UTC 2017


With my comment on patch 2 addressed, series is:

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

Thanks for fixing this!

On 10/21/2017 06:25 PM, Bas Nieuwenhuizen wrote:
> With merged shaders the vertex shader may not exist. This got in
> because the offending patch was written before merged shaders were
> upstream, but committed after.
> 
> Fixes: 75dfab24a2c 'radv: refactor indirect draws with radv_draw_info'
> ---
>   src/amd/vulkan/radv_cmd_buffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index dc8e037dbd3..f8501257348 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -2954,7 +2954,7 @@ radv_cs_emit_indirect_draw_packet(struct radv_cmd_buffer *cmd_buffer,
>   	struct radeon_winsys_cs *cs = cmd_buffer->cs;
>   	unsigned di_src_sel = indexed ? V_0287F0_DI_SRC_SEL_DMA
>   	                              : V_0287F0_DI_SRC_SEL_AUTO_INDEX;
> -	bool draw_id_enable = cmd_buffer->state.pipeline->shaders[MESA_SHADER_VERTEX]->info.info.vs.needs_draw_id;
> +	bool draw_id_enable = radv_get_vertex_shader(cmd_buffer->state.pipeline)->info.info.vs.needs_draw_id;
>   	uint32_t base_reg = cmd_buffer->state.pipeline->graphics.vtx_base_sgpr;
>   	assert(base_reg);
>   
> 


More information about the mesa-dev mailing list