summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-06-01 16:48:03 +0200
committerRoland Scheidegger <sroland@vmware.com>2013-06-01 20:03:59 +0200
commitf51fc7a71c272ad28e157d1d8f642649c3b5487b (patch)
tree32497408bbf84fb18dad32faebae3a09c0e15a22 /src/gallium
parent4405ff4055685841c9d9545da52c7edc8708b14b (diff)
downloadexternal_mesa3d-f51fc7a71c272ad28e157d1d8f642649c3b5487b.zip
external_mesa3d-f51fc7a71c272ad28e157d1d8f642649c3b5487b.tar.gz
external_mesa3d-f51fc7a71c272ad28e157d1d8f642649c3b5487b.tar.bz2
llvmpipe: fix bogus assertions for buffer surfaces
One of the assertion made no sense for buffer rendertargets (due to the union), so drop it. (The same assertion is present already in the path for texture surfaces later.). v2: make assertion completely accurate (suggested by Jose). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 56eb499..22f952c 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -477,7 +477,6 @@ llvmpipe_create_surface(struct pipe_context *pipe,
{
struct pipe_surface *ps;
- assert(surf_tmpl->u.tex.level <= pt->last_level);
if (!(pt->bind & (PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET)))
debug_printf("Illegal surface creation without bind flag\n");
@@ -505,7 +504,8 @@ llvmpipe_create_surface(struct pipe_context *pipe,
ps->u.buf.first_element = surf_tmpl->u.buf.first_element;
ps->u.buf.last_element = surf_tmpl->u.buf.last_element;
assert(ps->u.buf.first_element <= ps->u.buf.last_element);
- assert(ps->u.buf.last_element < ps->width);
+ assert(util_format_get_blocksize(surf_tmpl->format) *
+ (ps->u.buf.last_element + 1) <= pt->width0);
}
}
return ps;