projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b26f1df
)
llvmpipe: added max texture/surface size sanity check
author
Brian Paul
<brianp@vmware.com>
Wed, 23 Sep 2009 17:04:57 +0000
(11:04 -0600)
committer
Brian Paul
<brianp@vmware.com>
Wed, 23 Sep 2009 17:05:00 +0000
(11:05 -0600)
Carried over from softpipe driver.
src/gallium/drivers/llvmpipe/lp_tile_cache.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_tile_cache.c
b/src/gallium/drivers/llvmpipe/lp_tile_cache.c
index 2e576e6039d45f841b6aa9012c0dcba0a50b4057..73460106f3812ecd22ebe1f1db7c5d673016ec83 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_tile_cache.c
+++ b/
src/gallium/drivers/llvmpipe/lp_tile_cache.c
@@
-48,6
+48,12
@@
struct llvmpipe_tile_cache *
lp_create_tile_cache( struct pipe_screen *screen )
{
struct llvmpipe_tile_cache *tc;
+ int maxLevels, maxTexSize;
+
+ /* sanity checking: max sure MAX_WIDTH/HEIGHT >= largest texture image */
+ maxLevels = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
+ maxTexSize = 1 << (maxLevels - 1);
+ assert(MAX_WIDTH >= maxTexSize);
tc = CALLOC_STRUCT( llvmpipe_tile_cache );
if(!tc)