mesa: helper for checking renderbuffer sample count
authorChris Forbes <chrisf@ijw.co.nz>
Wed, 6 Feb 2013 07:42:53 +0000 (20:42 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 24 Mar 2013 03:38:18 +0000 (16:38 +1300)
commit90b5a2425a5f362ef51ae7bb4d296fc682b92f46
tree356729947fb243c166574fce99e6057ac823798c
parent86b83806007c65baea916a2ccf71ecbcc256ebba
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 <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/fbobject.c
src/mesa/main/multisample.c
src/mesa/main/multisample.h