From bc50336b6ab40b6f4df7dbe19abe8b1d89938472 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Apr 2010 09:17:47 -0600 Subject: llvmpipe: limit max texture size to 2Kx2K for now MAXWIDTH/HEIGHT were 2048 but the max texture size was 4096. This caused a crash if a 4Kx4K texture was created and rendered to. See comment about max framebuffer size in lp_scene.h. Also added assertions to catch this inconsistancy in the future. --- src/gallium/drivers/llvmpipe/lp_state_surface.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_state_surface.c') diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c index 048ac5b968b..7d86c5750c5 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -32,6 +32,7 @@ #include "util/u_inlines.h" #include "util/u_surface.h" #include "lp_context.h" +#include "lp_scene.h" #include "lp_state.h" #include "lp_setup.h" @@ -51,6 +52,9 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb); + assert(fb->width <= MAXWIDTH); + assert(fb->height <= MAXHEIGHT); + if (changed) { util_copy_framebuffer_state(&lp->framebuffer, fb); -- cgit v1.2.3