From 9aa089eac05ebefafb6610b4a7e209b2fd1e93f6 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 14 Nov 2010 15:34:59 +0100 Subject: gallium: add PIPE_SHADER_CAP_SUBROUTINES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes piglit/glsl-vs-main-return and glsl-fs-main-return for the drivers which don't support RET (i915g, r300g, r600g, svga). ir_to_mesa does not currently generate subroutines, but it's a matter of time till it's added. It would then break all the drivers which don't implement them, so this CAP makes sense. Signed-off-by: Marek Olšák --- src/gallium/drivers/nvfx/nvfx_screen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/nvfx') diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index d7553e9f399..92e1d330907 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -123,6 +123,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR: case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: return 0; + case PIPE_SHADER_CAP_SUBROUTINES: + return screen->use_nv4x ? 1 : 0; default: break; } @@ -161,6 +163,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum return 0; case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: return 1; + case PIPE_SHADER_CAP_SUBROUTINES: + return 1; default: break; } -- cgit v1.2.3