From a812cb57e51a9c86a8184e24272a2bcd11920c21 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 31 Dec 2019 11:53:55 +0100 Subject: [PATCH] etnaviv: Report correct number of vertex buffers The GCnano has only 4 vertex buffers instead of 16. This information can be extracted from the GPU status registers and is already stored in screen->specs.stream_count. Use PIPE_CAP_MAX_VERTEX_BUFFERS to report this information and permit u_vbuf to reorganize the shaders to fit. This fixes the following dEQP on GCnano: dEQP-GLES2.functional.shaders.conversions.vector_combine.float_float_float_float_to_vec4_vertex This fixes all the other dEQP-GLES2.functional.shaders.conversions.* which used to fail on GCnano. Signed-off-by: Marek Vasut Reviewed-by: Christian Gmeiner Tested-by: Marge Bot Part-of: --- src/gallium/drivers/etnaviv/etnaviv_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 75d3e1e6877..9f9248eceba 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -188,6 +188,8 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 128; case PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET: return 255; + case PIPE_CAP_MAX_VERTEX_BUFFERS: + return screen->specs.stream_count; /* Texturing. */ case PIPE_CAP_TEXTURE_SHADOW_MAP: -- 2.30.2