projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43e7721
)
st/mesa: add a simple sanity check assertion in st_validate_attachment()
author
Brian Paul
<brianp@vmware.com>
Fri, 24 Jan 2014 01:18:17 +0000
(18:18 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 24 Jan 2014 20:33:13 +0000
(13:33 -0700)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_fbo.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_fbo.c
b/src/mesa/state_tracker/st_cb_fbo.c
index eca04b89b5acda5de918da2247074593c9322077..780148487f7648dde68b956c1daa3134e658382b 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_fbo.c
+++ b/
src/mesa/state_tracker/st_cb_fbo.c
@@
-544,6
+544,12
@@
st_validate_attachment(struct gl_context *ctx,
gl_format texFormat;
GLboolean valid;
+ /* Sanity check: we must be binding the surface as a (color) render target
+ * or depth/stencil target.
+ */
+ assert(bindings == PIPE_BIND_RENDER_TARGET ||
+ bindings == PIPE_BIND_DEPTH_STENCIL);
+
/* Only validate texture attachments for now, since
* st_renderbuffer_alloc_storage makes sure that
* the format is supported.