summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c4
1 files changed, 1 insertions, 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",