diff options
author | Luca Barbieri <[email protected]> | 2010-08-21 20:23:41 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-21 20:42:15 +0200 |
commit | d8e210eb111324482450c8bdbb19e29a805b088e (patch) | |
tree | cd9f9a1ce2e5e47ed37de241ef27a7a1d165c4f3 /src/gallium/drivers/nvfx | |
parent | 5eddf95be992d1d6cafe567068ca4c12b0ee2b4a (diff) |
nvfx: slightly improve handling of overlong vps
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_vertprog.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_vertprog.c b/src/gallium/drivers/nvfx/nvfx_vertprog.c index 8ca7cfef742..7cccffe0ffe 100644 --- a/src/gallium/drivers/nvfx/nvfx_vertprog.c +++ b/src/gallium/drivers/nvfx/nvfx_vertprog.c @@ -1110,7 +1110,11 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx) } if (nouveau_resource_alloc(heap, vplen, vp, &vp->exec)) - assert(0); + { + debug_printf("Vertex shader too long: %u instructions\n", vplen); + nvfx->fallback_swtnl |= NVFX_NEW_VERTPROG; + return FALSE; + } } upload_code = TRUE; @@ -1129,7 +1133,11 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx) } if (nouveau_resource_alloc(heap, vp->nr_consts, vp, &vp->data)) - assert(0); + { + debug_printf("Vertex shader uses too many constants: %u constants\n", vp->nr_consts); + nvfx->fallback_swtnl |= NVFX_NEW_VERTPROG; + return FALSE; + } } /*XXX: handle this some day */ |