[Mesa-dev] [PATCH 1/2] radeonsi: simplify PRIMGROUP_SIZE computation for tessellation

Nicolai Hähnle nhaehnle at gmail.com
Mon Jun 6 19:47:01 UTC 2016


On 03.06.2016 17:14, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Ported from Vulkan.
> ---
>   src/gallium/drivers/radeonsi/si_state_draw.c | 11 +----------
>   1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
> index c7590cb..c2d9a2f 100644
> --- a/src/gallium/drivers/radeonsi/si_state_draw.c
> +++ b/src/gallium/drivers/radeonsi/si_state_draw.c
> @@ -257,16 +257,7 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
>   		primgroup_size = 64; /* recommended with a GS */
>
>   	if (sctx->tes_shader.cso) {
> -		unsigned num_cp_out =
> -			sctx->tcs_shader.cso ?
> -			sctx->tcs_shader.cso->info.properties[TGSI_PROPERTY_TCS_VERTICES_OUT] :
> -			info->vertices_per_patch;
> -		unsigned max_size = 256 / MAX2(info->vertices_per_patch, num_cp_out);
> -
> -		primgroup_size = MIN2(primgroup_size, max_size);
> -
> -		/* primgroup_size must be set to a multiple of NUM_PATCHES */
> -		primgroup_size = (primgroup_size / num_patches) * num_patches;
> +		primgroup_size = num_patches;

I think it makes sense to keep the comment. In any case, for both patches:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>
>   		/* SWITCH_ON_EOI must be set if PrimID is used. */
>   		if ((sctx->tcs_shader.cso && sctx->tcs_shader.cso->info.uses_primid) ||
>


More information about the mesa-dev mailing list