[Mesa-dev] [RFC PATCH] i965: enable up to 32 inputs for geometry shaders in gen8+
Kenneth Graunke
kenneth at whitecape.org
Thu Sep 28 07:13:46 UTC 2017
On Wednesday, September 27, 2017 11:55:59 PM PDT Iago Toral Quiroga wrote:
> We have been exposing only 16 since 1e3e72e3054de with arguments
> based on register pressure and the number of available GRFs, however,
> our scalar backend will always limit the number of push registers
> for GS threads to 24 and fallback to pull model for anything else,
> so there is really no reason to lower the number under those arguments.
>
> By bumping this up to 32 we make it the same as all the other stages,
> which is a nice feature to have that can help applications in some
> cases (I recently fixed a bug in CTS that assumed that the number
> of input locations in a stage matches the number of output locations
> in the previous stage for example).
>
> Pre-gen8, we use the vector backend and push model, so in that case
> the arguments in 1e3e72e3054de are still valid.
> ---
> src/mesa/drivers/dri/i965/brw_context.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index ee1badd94b..87752475d1 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -634,7 +634,8 @@ brw_initialize_context_constants(struct brw_context *brw)
> if (devinfo->gen >= 6) {
> ctx->Const.MaxVarying = 32;
> ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 128;
> - ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents = 64;
> + ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents =
> + devinfo->gen > 7 ? 128 : 64;
Perhaps more clearly,
compiler->scalar_stage[MESA_SHADER_GEOMETRY] ? 128 : 64;
With that,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents = 128;
> ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 128;
> ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxInputComponents = 128;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170928/6f080944/attachment.sig>
More information about the mesa-dev
mailing list