[Mesa-dev] [PATCH 3/3] radeonsi: overhaul the vertex fetch fixup mechanism

Haehnle, Nicolai Nicolai.Haehnle at amd.com
Fri May 3 10:37:05 UTC 2019


On 25.04.19 13:18, Nicolai Hähnle wrote:
> @@ -4618,21 +4648,27 @@ static void si_bind_vertex_elements(struct pipe_context *ctx, void *state)
>   	struct si_vertex_elements *old = sctx->vertex_elements;
>   	struct si_vertex_elements *v = (struct si_vertex_elements*)state;
>   
>   	sctx->vertex_elements = v;
>   	sctx->vertex_buffers_dirty = true;
>   
>   	if (v &&
>   	    (!old ||
>   	     old->count != v->count ||
>   	     old->uses_instance_divisors != v->uses_instance_divisors ||
> -	     v->uses_instance_divisors || /* we don't check which divisors changed */
> +	     /* we don't check which divisors changed */
> +	     v->uses_instance_divisors ||
> +	     /* fix_fetch_{always,opencode,unaligned} and hw_load_is_dword are
> +	      * functions of fix_fetch and the src_offset alignment.
> +	      * If they change and fix_fetch doesn't, it must be due to different
> +	      * src_offset alignment, which is reflected in fix_fetch_opencode. */
> +	     old->fix_fetch_opencode != v->fix_fetch_opencode ||
>   	     memcmp(old->fix_fetch, v->fix_fetch, sizeof(v->fix_fetch[0]) * v->count)))

The following condition got dropped in a late cleanup that I was doing:

> (old->vb_alignment_check_mask ^ v->vb_alignment_check_mask) & sctx->vertex_buffer_unaligned ||

I've fixed that locally.

Cheers,
Nicolai


More information about the mesa-dev mailing list