From: Brian Paul Date: Thu, 29 May 2014 19:56:22 +0000 (-0600) Subject: svga: use svga_shader_too_large() in compile_fs() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bb18eab726ff0399a6ecaf572f27fa8271c5305;p=mesa.git svga: use svga_shader_too_large() in compile_fs() Reviewed-by: José Fonseca --- 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",