From 3bb18eab726ff0399a6ecaf572f27fa8271c5305 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 29 May 2014 13:56:22 -0600 Subject: [PATCH] svga: use svga_shader_too_large() in compile_fs() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: José Fonseca --- src/gallium/drivers/svga/svga_state_fs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 7931528c661..8f419fa69ac 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -157,9 +157,7 @@ compile_fs(struct svga_context *svga, } } - if (variant->nr_tokens * sizeof(variant->tokens[0]) - + sizeof(SVGA3dCmdDefineShader) + sizeof(SVGA3dCmdHeader) - >= SVGA_CB_MAX_COMMAND_SIZE) { + if (svga_shader_too_large(svga, variant)) { /* too big, use dummy shader */ debug_printf("Shader too large (%lu bytes)," " using dummy shader instead.\n", -- 2.30.2