From: Christian Gmeiner Date: Wed, 14 Aug 2019 09:32:50 +0000 (+0200) Subject: etnaviv: put uniform limit determination into own function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45cb5eee5d52844b86e20309db260425b81a97d4;p=mesa.git etnaviv: put uniform limit determination into own function Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach l.stach@pengutronix.de --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 8c80c1e9556..28b577bc3a5 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -526,6 +526,19 @@ etna_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen, *count = num_modifiers; } +static void +etna_determine_uniform_limits(struct etna_screen *screen) +{ + /* from QueryShaderCaps in kernel driver */ + if (screen->model < chipModel_GC4000) { + screen->specs.max_vs_uniforms = 168; + screen->specs.max_ps_uniforms = 64; + } else { + screen->specs.max_vs_uniforms = 256; + screen->specs.max_ps_uniforms = 256; + } +} + static bool etna_get_specs(struct etna_screen *screen) { @@ -688,14 +701,7 @@ etna_get_specs(struct etna_screen *screen) if (screen->specs.max_varyings > ETNA_NUM_VARYINGS) screen->specs.max_varyings = ETNA_NUM_VARYINGS; - /* from QueryShaderCaps in kernel driver */ - if (screen->model < chipModel_GC4000) { - screen->specs.max_vs_uniforms = 168; - screen->specs.max_ps_uniforms = 64; - } else { - screen->specs.max_vs_uniforms = 256; - screen->specs.max_ps_uniforms = 256; - } + etna_determine_uniform_limits(screen); if (screen->specs.halti >= 5) { screen->specs.has_unified_uniforms = true;