diff options
author | Brian Paul <[email protected]> | 2009-03-12 14:14:58 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-03-12 14:17:27 -0600 |
commit | 363fc6d64fc8b813f2216b8b28414c6a2c6d2963 (patch) | |
tree | f320595a5205826d21aaa9b07369de60a3f7ff53 /src | |
parent | 29309b45b011b4c44721b8f7346272fb22a4d4c2 (diff) |
mesa: fix glRead/DrawBuffer(GL_AUXn) error value
If GL_AUX[123] are passed to glRead/DrawBuffer() when those buffers don't
exist, need to generate GL_INVALID_OPERATION, not GL_INVALID_ENUM.
This regression came from commit 555f0a88182e2b1af809b2d97abdac02814a2f28
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/buffers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 1580487ffd6..c5f13345f04 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -119,6 +119,10 @@ draw_buffer_enum_to_bitmask(GLenum buffer) return BUFFER_BIT_FRONT_LEFT; case GL_AUX0: return BUFFER_BIT_AUX0; + case GL_AUX1: + case GL_AUX2: + case GL_AUX3: + return 1 << BUFFER_COUNT; /* invalid, but not BAD_MASK */ case GL_COLOR_ATTACHMENT0_EXT: return BUFFER_BIT_COLOR0; case GL_COLOR_ATTACHMENT1_EXT: @@ -170,6 +174,10 @@ read_buffer_enum_to_index(GLenum buffer) return BUFFER_FRONT_LEFT; case GL_AUX0: return BUFFER_AUX0; + case GL_AUX1: + case GL_AUX2: + case GL_AUX3: + return BUFFER_COUNT; /* invalid, but not -1 */ case GL_COLOR_ATTACHMENT0_EXT: return BUFFER_COLOR0; case GL_COLOR_ATTACHMENT1_EXT: |