[Mesa-dev] [PATCH 10/18] radeonsi: emit base vertex and start instance only if they change

Michel Dänzer michel at daenzer.net
Tue Dec 9 23:15:26 PST 2014


On 09.12.2014 20:39, Marek Olšák wrote:
> 
> @@ -155,4 +155,7 @@ void si_begin_new_cs(struct si_context *ctx)
>  	r600_postflush_resume_features(&ctx->b);
>  
>  	ctx->b.initial_gfx_cs_size = ctx->b.rings.gfx.cs->cdw;
> +	ctx->last_base_vertex = SI_BASE_VERTEX_UNKNOWN;
> +	ctx->last_start_instance = -1; /* reset to an unknown value */
> +	ctx->last_sh_base_reg = -1; /* reset to an unknown value */

[...]

>  	} else {
> +		sctx->last_base_vertex = SI_BASE_VERTEX_UNKNOWN;
> +		sctx->last_start_instance = -1; /* reset to an unknown value */
> +		sctx->last_sh_base_reg = -1; /* reset to an unknown value */
> +

Maybe this could be factored out into a little inline helper function.


Either way, the series is

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list