mesa: use _mesa_check_sample_count() for multisample textures
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 3 Mar 2013 08:46:12 +0000 (21:46 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 24 Mar 2013 03:38:18 +0000 (16:38 +1300)
commit2405da174ed52cd1b164a6f16cb32964879348a3
tree0dff631510216f1e2f001e1819ecbe9ecef95729
parent90b5a2425a5f362ef51ae7bb4d296fc682b92f46
mesa: use _mesa_check_sample_count() for multisample textures

Extends _mesa_check_sample_count() to properly support the
TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY targets, which
have subtly different limits than renderbuffers.

This resolves the remaining TODO in the implementation of
TexImage*DMultisample.

V2: - Don't introduce spurious block.
    - Do this in multisample.c instead.
    - Fix typo in error message.
    - Inline spec quotes

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/multisample.c
src/mesa/main/teximage.c