diff options
author | Chris Forbes <[email protected]> | 2013-02-06 20:42:53 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2013-03-24 16:38:18 +1300 |
commit | 90b5a2425a5f362ef51ae7bb4d296fc682b92f46 (patch) | |
tree | 356729947fb243c166574fce99e6057ac823798c /src/mesa/main/multisample.h | |
parent | 86b83806007c65baea916a2ccf71ecbcc256ebba (diff) |
mesa: helper for checking renderbuffer sample count
Pulls the checking of the sample count into a helper function, and
extends the existing logic to include the interactions with both
ARB_texture_multisample and ARB_internalformat_query.
_mesa_check_sample_count() checks a desired sample count against a
a combination of target/internalformat, and returns the error enum
to be produced, if any. Unfortunately the conditions are messy and the
errors vary.
V2: - Tidy up spurious block.
- Move _mesa_check_sample_count() to multisample.c instead; It
doesn't really belong in fbobject.c or teximage.c.
- Inlined spec quotes
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/multisample.h')
-rw-r--r-- | src/mesa/main/multisample.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h index 9e6b8e0d3f8..f2f01de5c65 100644 --- a/src/mesa/main/multisample.h +++ b/src/mesa/main/multisample.h @@ -44,4 +44,9 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat* val); extern void GLAPIENTRY _mesa_SampleMaski(GLuint index, GLbitfield mask); + +extern GLenum +_mesa_check_sample_count(struct gl_context *ctx, GLenum target, + GLenum internalFormat, GLsizei samples); + #endif |