diff options
author | Brian Paul <[email protected]> | 2014-01-23 18:18:17 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-01-24 13:33:13 -0700 |
commit | e2dd240e326f5af2ad44d78bc245dfcc5c35616d (patch) | |
tree | 38b7ef3b8d65ffbbb3d878e40c85059e8b763043 /src/mesa | |
parent | 43e77215b13b2f86e461cd8a62b542fc6854dd1c (diff) |
st/mesa: add a simple sanity check assertion in st_validate_attachment()
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index eca04b89b5a..780148487f7 100644 --- 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. |