diff options
author | Dave Airlie <[email protected]> | 2011-12-04 20:14:09 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-12-10 09:02:17 +0000 |
commit | f767e96131ba69cf61aa9f848d5f24e4396ac920 (patch) | |
tree | 02541b0e2e235db8c3ed8dab40c5835d9267d5e7 /src/mesa/main | |
parent | 06f217d80f3d1318da4974bf7b31ea7edcf5eb0b (diff) |
mesa: add missing RG_INTEGER and some RED_INTEGER_EXT checks.
This just adds the correct checks and asserts in the right places. This doesn't
fix all the tests that I've sent to piglit, need to add int paths to go alongside the uint paths that don't go via float to fix it up properly.
I'm not sure how much of that could be templated/shared will have a look
once I write it the long way.
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/framebuffer.c | 1 | ||||
-rw-r--r-- | src/mesa/main/image.c | 4 | ||||
-rw-r--r-- | src/mesa/main/pack.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texstore.c | 12 |
4 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 8d0763db331..e30f31a3972 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -879,6 +879,7 @@ renderbuffer_exists(struct gl_context *ctx, case GL_BGRA: case GL_ABGR_EXT: case GL_RED_INTEGER_EXT: + case GL_RG_INTEGER: case GL_GREEN_INTEGER_EXT: case GL_BLUE_INTEGER_EXT: case GL_ALPHA_INTEGER_EXT: diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 169508f289c..b37cd7e7d13 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -238,6 +238,7 @@ _mesa_components_in_format( GLenum format ) case GL_DEPTH_STENCIL_EXT: case GL_DUDV_ATI: case GL_DU8DV8_ATI: + case GL_RG_INTEGER: return 2; case GL_RGB: @@ -527,6 +528,7 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx, case GL_GREEN_INTEGER_EXT: case GL_BLUE_INTEGER_EXT: case GL_ALPHA_INTEGER_EXT: + case GL_RG_INTEGER: switch (type) { case GL_BYTE: case GL_UNSIGNED_BYTE: @@ -751,6 +753,7 @@ _mesa_is_color_format(GLenum format) case GL_RGBA_INTEGER_EXT: case GL_BGR_INTEGER_EXT: case GL_BGRA_INTEGER_EXT: + case GL_RG_INTEGER: case GL_LUMINANCE_INTEGER_EXT: case GL_LUMINANCE_ALPHA_INTEGER_EXT: /* sized integer formats */ @@ -954,6 +957,7 @@ _mesa_is_integer_format(GLenum format) case GL_BGRA_INTEGER_EXT: case GL_LUMINANCE_INTEGER_EXT: case GL_LUMINANCE_ALPHA_INTEGER_EXT: + case GL_RG_INTEGER: /* specific integer formats */ case GL_RGBA32UI_EXT: case GL_RGB32UI_EXT: diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 0bd4ff19906..2933ff638fc 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -467,6 +467,7 @@ _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], case GL_GREEN_INTEGER_EXT: case GL_BLUE_INTEGER_EXT: case GL_ALPHA_INTEGER_EXT: + case GL_RG_INTEGER: case GL_RGB_INTEGER_EXT: case GL_RGBA_INTEGER_EXT: case GL_BGR_INTEGER_EXT: @@ -490,6 +491,7 @@ _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], case GL_GREEN_INTEGER_EXT: case GL_BLUE_INTEGER_EXT: case GL_ALPHA_INTEGER_EXT: + case GL_RG_INTEGER: case GL_RGB_INTEGER_EXT: case GL_RGBA_INTEGER_EXT: case GL_BGR_INTEGER_EXT: @@ -3021,6 +3023,7 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4], srcFormat == GL_DU8DV8_ATI || srcFormat == GL_DUDV_ATI || srcFormat == GL_RED_INTEGER_EXT || + srcFormat == GL_RG_INTEGER || srcFormat == GL_GREEN_INTEGER_EXT || srcFormat == GL_BLUE_INTEGER_EXT || srcFormat == GL_ALPHA_INTEGER_EXT || @@ -3980,6 +3983,7 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx, srcFormat == GL_GREEN_INTEGER_EXT || srcFormat == GL_BLUE_INTEGER_EXT || srcFormat == GL_ALPHA_INTEGER_EXT || + srcFormat == GL_RG_INTEGER || srcFormat == GL_RGB_INTEGER_EXT || srcFormat == GL_RGBA_INTEGER_EXT || srcFormat == GL_BGR_INTEGER_EXT || diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 14d24844975..a57a38e1266 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -3568,6 +3568,8 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT8); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || @@ -3638,6 +3640,8 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT16); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || @@ -3708,6 +3712,8 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT32); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || @@ -3778,6 +3784,8 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_UINT8); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || @@ -3846,6 +3854,8 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_UINT16); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || @@ -3914,6 +3924,8 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_UINT32); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || + baseInternalFormat == GL_RG || + baseInternalFormat == GL_RED || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || |