mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 00:30:33 +01:00
mesa/format_unpack: add LUMINANCE 8/16 UINT/INT
This just copies what the LUMINANCE_ALPHA bits do.
Fixes piglit tests on softpipe complaining about missing unpack.
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit fef395c0c3)
This commit is contained in:
parent
1e987b6e7a
commit
4d5b40a5a2
1 changed files with 58 additions and 0 deletions
|
|
@ -2392,6 +2392,51 @@ unpack_int_rgba_LUMINANCE_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unpack_int_rgba_LUMINANCE_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i][0] = dst[i][1] = dst[i][2] = src[i];
|
||||
dst[i][3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unpack_int_rgba_LUMINANCE_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i][0] = dst[i][1] = dst[i][2] = src[i];
|
||||
dst[i][3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unpack_int_rgba_LUMINANCE_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i][0] = dst[i][1] = dst[i][2] = src[i];
|
||||
dst[i][3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unpack_int_rgba_LUMINANCE_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i][0] = dst[i][1] = dst[i][2] = src[i];
|
||||
dst[i][3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
unpack_int_rgba_LUMINANCE_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
|
|
@ -2618,6 +2663,19 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
|||
case MESA_FORMAT_LUMINANCE_INT32:
|
||||
unpack_int_rgba_LUMINANCE_UINT32(src, dst, n);
|
||||
break;
|
||||
case MESA_FORMAT_LUMINANCE_UINT16:
|
||||
unpack_int_rgba_LUMINANCE_UINT16(src, dst, n);
|
||||
break;
|
||||
case MESA_FORMAT_LUMINANCE_INT16:
|
||||
unpack_int_rgba_LUMINANCE_INT16(src, dst, n);
|
||||
break;
|
||||
|
||||
case MESA_FORMAT_LUMINANCE_UINT8:
|
||||
unpack_int_rgba_LUMINANCE_UINT8(src, dst, n);
|
||||
break;
|
||||
case MESA_FORMAT_LUMINANCE_INT8:
|
||||
unpack_int_rgba_LUMINANCE_INT8(src, dst, n);
|
||||
break;
|
||||
|
||||
case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
|
||||
case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue