diff options
author | Dave Airlie <[email protected]> | 2015-07-30 02:48:36 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-09-02 09:26:13 +1000 |
commit | 8185a02316cfb7dc3d64b8772af82ad2bb49754e (patch) | |
tree | 48c64dae9bc31f4c247ca8a7ccb7cc5e9a28288b /src/mesa/main/glformats.c | |
parent | 5b6c7da460b8f6c908df7060ec0709a9848ce160 (diff) |
mesa/formats: add some formats from GL3.3
GL3.3 added GL_ARB_texture_rgb10_a2ui, which specifies
a lot more things than just rgb10/a2ui.
While playing with ogl conform one of the tests must
attempted all valid formats for GL3.3 and hits the
unreachable here.
This adds the first chunk of formats that hit the
assert.
Cc: "11.0" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/glformats.c')
-rw-r--r-- | src/mesa/main/glformats.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 3d12a01777c..18d08696c13 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2816,12 +2816,16 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type) return MESA_FORMAT_B5G6R5_UNORM; else if (format == GL_BGR) return MESA_FORMAT_R5G6B5_UNORM; + else if (format == GL_RGB_INTEGER) + return MESA_FORMAT_B5G6R5_UINT; break; case GL_UNSIGNED_SHORT_5_6_5_REV: if (format == GL_RGB) return MESA_FORMAT_R5G6B5_UNORM; else if (format == GL_BGR) return MESA_FORMAT_B5G6R5_UNORM; + else if (format == GL_RGB_INTEGER) + return MESA_FORMAT_R5G6B5_UINT; break; case GL_UNSIGNED_SHORT_4_4_4_4: if (format == GL_RGBA) @@ -2830,6 +2834,10 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type) return MESA_FORMAT_A4R4G4B4_UNORM; else if (format == GL_ABGR_EXT) return MESA_FORMAT_R4G4B4A4_UNORM; + else if (format == GL_RGBA_INTEGER) + return MESA_FORMAT_A4B4G4R4_UINT; + else if (format == GL_BGRA_INTEGER) + return MESA_FORMAT_A4R4G4B4_UINT; break; case GL_UNSIGNED_SHORT_4_4_4_4_REV: if (format == GL_RGBA) @@ -2838,26 +2846,42 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type) return MESA_FORMAT_B4G4R4A4_UNORM; else if (format == GL_ABGR_EXT) return MESA_FORMAT_A4B4G4R4_UNORM; + else if (format == GL_RGBA_INTEGER) + return MESA_FORMAT_R4G4B4A4_UINT; + else if (format == GL_BGRA_INTEGER) + return MESA_FORMAT_B4G4R4A4_UINT; break; case GL_UNSIGNED_SHORT_5_5_5_1: if (format == GL_RGBA) return MESA_FORMAT_A1B5G5R5_UNORM; else if (format == GL_BGRA) return MESA_FORMAT_A1R5G5B5_UNORM; + else if (format == GL_RGBA_INTEGER) + return MESA_FORMAT_A1B5G5R5_UINT; + else if (format == GL_BGRA_INTEGER) + return MESA_FORMAT_A1R5G5B5_UINT; break; case GL_UNSIGNED_SHORT_1_5_5_5_REV: if (format == GL_RGBA) return MESA_FORMAT_R5G5B5A1_UNORM; else if (format == GL_BGRA) return MESA_FORMAT_B5G5R5A1_UNORM; + else if (format == GL_RGBA_INTEGER) + return MESA_FORMAT_R5G5B5A1_UINT; + else if (format == GL_BGRA_INTEGER) + return MESA_FORMAT_B5G5R5A1_UINT; break; case GL_UNSIGNED_BYTE_3_3_2: if (format == GL_RGB) return MESA_FORMAT_B2G3R3_UNORM; + else if (format == GL_RGB_INTEGER) + return MESA_FORMAT_B2G3R3_UINT; break; case GL_UNSIGNED_BYTE_2_3_3_REV: if (format == GL_RGB) return MESA_FORMAT_R3G3B2_UNORM; + else if (format == GL_RGB_INTEGER) + return MESA_FORMAT_R3G3B2_UINT; break; case GL_UNSIGNED_INT_5_9_9_9_REV: if (format == GL_RGB) |