mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
st/mesa: add a simple sanity check assertion in st_validate_attachment()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
43e77215b1
commit
e2dd240e32
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue