diff options
author | Brian Paul <[email protected]> | 2017-04-10 21:11:55 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-04-12 21:13:23 -0600 |
commit | 46f49d6fdcb9772fcc7ff3e533646b1b44c5adb9 (patch) | |
tree | 4649b27c670866eb72840d1a8a48ced84e5fd1e6 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | c36d224921da0846b808a317d5b71a78b31bfd3d (diff) |
st/mesa: add some _mesa_is_winsys_fbo() assertions
A few functions related to FBOs/renderbuffers should only be used with
window-system buffers, not user-created FBOs. Assert for that.
Add additional comments. No piglit regressions.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 21fc5420d58..7b9855f9631 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -739,6 +739,7 @@ st_ReadBuffer(struct gl_context *ctx, GLenum buffer) if ((fb->_ColorReadBufferIndex == BUFFER_FRONT_LEFT || fb->_ColorReadBufferIndex == BUFFER_FRONT_RIGHT) && fb->Attachment[fb->_ColorReadBufferIndex].Type == GL_NONE) { + assert(_mesa_is_winsys_fbo(fb)); /* add the buffer */ st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex); _mesa_update_state(ctx); |