projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c432c86
)
st/mesa: check for zero-size image in st_TestProxyTexImage()
author
Brian Paul
<brianp@vmware.com>
Fri, 21 Sep 2012 14:09:01 +0000
(08:09 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 24 Sep 2012 13:58:45 +0000
(07:58 -0600)
Fixes divide by zero issue in llvmpipe driver.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_texture.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_texture.c
b/src/mesa/state_tracker/st_cb_texture.c
index 4f4fe77dad35ed2ef76d2e23690d1e9ef7516423..5634a3e6e541a90e66b90482797faab33871bda8 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_texture.c
+++ b/
src/mesa/state_tracker/st_cb_texture.c
@@
-1379,6
+1379,11
@@
st_TestProxyTexImage(struct gl_context *ctx, GLenum target,
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
+ if (width == 0 || height == 0 || depth == 0) {
+ /* zero-sized images are legal, and always fit! */
+ return GL_TRUE;
+ }
+
if (pipe->screen->can_create_resource) {
/* Ask the gallium driver if the texture is too large */
struct gl_texture_object *texObj =