From 43f46caf769b0a6d661850ce2fa64b6f4b085b9f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 25 Apr 2016 17:12:50 -0600 Subject: svga: use the SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_INSTRUCTIONS query Instead of a hard-coded 512. The query typically returns 65536 now. Fall back to 512 if the query fails as we do for vertex shaders (which should never happen). Note that we don't actually enforce this limit in our shaders but it gets reported via the glGetProgramivARB(GL_MAX_PROGRAM_INSTRUCTIONS_ARB) query. Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_screen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/svga') diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 69e625f8c88..d1bf6a31279 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -431,6 +431,9 @@ vgpu9_get_shader_param(struct pipe_screen *screen, unsigned shader, { case PIPE_SHADER_CAP_MAX_INSTRUCTIONS: case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS: + return get_uint_cap(sws, + SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_INSTRUCTIONS, + 512); case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS: case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS: return 512; -- cgit v1.2.3