diff options
author | Marek Olšák <[email protected]> | 2011-02-16 00:35:44 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-15 05:08:00 +0200 |
commit | 0ecbb0ab7472fe5cb33be13a8307e16f875254e5 (patch) | |
tree | e35af57de56311c360bbb76f4b0243f3f64ca621 /src/mesa/main/formats.c | |
parent | 19648fcf015e512283e93ab9de4a3e969d577e59 (diff) |
mesa: add R/RG floating-point formats
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r-- | src/mesa/main/formats.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index b45cf03995b..4c31ccb763c 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -728,6 +728,42 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 16, 0, 0, 0, 1, 1, 2 }, + { + MESA_FORMAT_R_FLOAT32, + "MESA_FORMAT_R_FLOAT32", + GL_RED, + GL_FLOAT, + 32, 0, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 4 + }, + { + MESA_FORMAT_R_FLOAT16, + "MESA_FORMAT_R_FLOAT16", + GL_RED, + GL_FLOAT, + 16, 0, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 2 + }, + { + MESA_FORMAT_RG_FLOAT32, + "MESA_FORMAT_RG_FLOAT32", + GL_RG, + GL_FLOAT, + 32, 32, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 8 + }, + { + MESA_FORMAT_RG_FLOAT16, + "MESA_FORMAT_RG_FLOAT16", + GL_RG, + GL_FLOAT, + 16, 16, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 4 + }, /* unnormalized signed int formats */ { @@ -1714,22 +1750,26 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 3; return; case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: + case MESA_FORMAT_RG_FLOAT32: *datatype = GL_FLOAT; *comps = 2; return; case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: + case MESA_FORMAT_RG_FLOAT16: *datatype = GL_HALF_FLOAT_ARB; *comps = 2; return; case MESA_FORMAT_ALPHA_FLOAT32: case MESA_FORMAT_LUMINANCE_FLOAT32: case MESA_FORMAT_INTENSITY_FLOAT32: + case MESA_FORMAT_R_FLOAT32: *datatype = GL_FLOAT; *comps = 1; return; case MESA_FORMAT_ALPHA_FLOAT16: case MESA_FORMAT_LUMINANCE_FLOAT16: case MESA_FORMAT_INTENSITY_FLOAT16: + case MESA_FORMAT_R_FLOAT16: *datatype = GL_HALF_FLOAT_ARB; *comps = 1; return; |