mesa: add support for immutable textures to teximagemultisample()
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 16 Feb 2013 08:38:20 +0000 (21:38 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 31 Mar 2013 09:19:22 +0000 (22:19 +1300)
commit788b0f85357e10c883cb65d0544a039412366129
treedbc0789b761b5e585944b0bb65c8d8e8cbe2cc15
parent7f32b9560b63ffa6967bbc0c8e61d2cc30081ab3
mesa: add support for immutable textures to teximagemultisample()

The new entrypoints will come later, but this adds the actual logic for
supporting immutable multisample textures:

- The immutability flag is set as desired.
- Attempting to modify an immutable multisample texture produces
  INVALID_OPERATION.

Note: The extension spec does not mention adding this behavior to
TexImage*Multisample, but it seems like the reasonable thing to do.

V2: - Cover missing error cases (unsized formats; texture object zero)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
[V1] Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c