From 5f6ab7dcdf5c6e0765ceff24ae99b705b6d4741c Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 4 Sep 2024 16:20:55 +0200 Subject: [PATCH] etnaviv: limit number of varyings to fit into VS outputs One of the VS output slots is always occupied by the position output. Limit the number of user visible varyings to fit into the remaining slots. This reduces GL_MAX_VARYING_COMPONENTS to 60 on Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index bd87520b591..c508a58b9ac 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -853,7 +853,6 @@ etna_get_specs(struct etna_screen *screen) if (info->type == ETNA_CORE_GPU) { instruction_count = info->gpu.max_instructions; screen->specs.pixel_pipes = info->gpu.pixel_pipes; - screen->specs.max_varyings = MIN2(info->gpu.max_varyings, ETNA_NUM_VARYINGS); if (screen->npu) info = etna_gpu_get_core_info(screen->npu); @@ -966,6 +965,11 @@ etna_get_specs(struct etna_screen *screen) screen->specs.max_vs_outputs = screen->info->halti >= 5 ? 32 : 16; + screen->specs.max_varyings = MIN3(ETNA_NUM_VARYINGS, + info->gpu.max_varyings, + /* one output slot used for position */ + screen->specs.max_vs_outputs - 1); + screen->specs.max_texture_size = VIV_FEATURE(screen, ETNA_FEATURE_TEXTURE_8K) ? 8192 : 2048; screen->specs.max_rendertarget_size =