aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-02-07 23:28:38 +0100
committermarha <marha@users.sourceforge.net>2014-02-07 23:38:15 +0100
commit982ac918afe6a1c02d5cf735d7b6c56443a048cc (patch)
treee737eb3f7bb18d933e14f0967c1c1aa5ce5e06f6 /mesalib/src/mesa/swrast
parent30af30b78075159fce477ae99cc72540133714d0 (diff)
downloadvcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.gz
vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.bz2
vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.zip
xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014
Update to openssl1.0.1f xserver commit 83e38eb73fd8c852513aac2da2975b4c01070ec2 libxcb commit d7eb0bdf3b5b11ee9f40ee5e73df8fc0bdfa59f3 xkeyboard-config commit 7596672b96315465df8d8d691e3a567a52f70743 libX11 commit aacf95dacc7c598e7297894580d4d655593813b2 xkbcomp commit 31b90ee4ffc774e0da540277907fc5540c0b012c libxtrans commit 3f0de269abe59353acbd7a5587d68ce0da91db67 fontconfig commit e310d2fac2d874d5aa76c609df70cc7b871c0b6d mesa commit dd2229d4c68ed78a50104637aef904f8ab6d7dd3
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r--mesalib/src/mesa/swrast/s_blit.c8
-rw-r--r--mesalib/src/mesa/swrast/s_depth.c46
-rw-r--r--mesalib/src/mesa/swrast/s_drawpix.c14
-rw-r--r--mesalib/src/mesa/swrast/s_renderbuffer.c18
-rw-r--r--mesalib/src/mesa/swrast/s_stencil.c10
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch.c290
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch_tmp.h126
-rw-r--r--mesalib/src/mesa/swrast/s_texfilter.c16
-rw-r--r--mesalib/src/mesa/swrast/s_texrender.c2
-rw-r--r--mesalib/src/mesa/swrast/s_triangle.c40
10 files changed, 285 insertions, 285 deletions
diff --git a/mesalib/src/mesa/swrast/s_blit.c b/mesalib/src/mesa/swrast/s_blit.c
index bbb0013e6..1ba188c5f 100644
--- a/mesalib/src/mesa/swrast/s_blit.c
+++ b/mesalib/src/mesa/swrast/s_blit.c
@@ -166,8 +166,8 @@ blit_nearest(struct gl_context *ctx,
* using the core helpers for pack/unpack, we avoid needing to handle
* masking for things like DEPTH copies of Z24S8.
*/
- if (readRb->Format == MESA_FORMAT_Z32_FLOAT ||
- readRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ if (readRb->Format == MESA_FORMAT_Z_FLOAT32 ||
+ readRb->Format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
mode = UNPACK_Z_FLOAT;
} else {
mode = UNPACK_Z_INT;
@@ -536,7 +536,7 @@ blit_linear(struct gl_context *ctx,
GLint srcBufferY0 = -1, srcBufferY1 = -1;
GLvoid *dstBuffer;
- gl_format readFormat = _mesa_get_srgb_format_linear(readRb->Format);
+ mesa_format readFormat = _mesa_get_srgb_format_linear(readRb->Format);
GLuint bpp = _mesa_get_format_bytes(readFormat);
GLenum pixelType;
@@ -571,7 +571,7 @@ blit_linear(struct gl_context *ctx,
GLint idx = drawFb->_ColorDrawBufferIndexes[i];
struct gl_renderbuffer_attachment *drawAtt;
struct gl_renderbuffer *drawRb;
- gl_format drawFormat;
+ mesa_format drawFormat;
if (idx == -1)
continue;
diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c
index 7f3c76de4..93aaffc57 100644
--- a/mesalib/src/mesa/swrast/s_depth.c
+++ b/mesalib/src/mesa/swrast/s_depth.c
@@ -217,7 +217,7 @@ get_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -252,7 +252,7 @@ put_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (mask[i] && x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -300,12 +300,12 @@ _swrast_depth_test_span(struct gl_context *ctx, SWspan *span)
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z16 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM16 && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 16-bit Z values */
zBufferVals = zStart;
ztest16 = GL_TRUE;
}
- else if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ else if (rb->Format == MESA_FORMAT_Z_UNORM32 && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 32-bit Z values */
zBufferVals = zStart;
}
@@ -439,7 +439,7 @@ _swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32 && !(span->arrayMask & SPAN_XY)) {
/* directly access 32-bit values in the depth buffer */
zBufferVals = (const GLuint *) zStart;
}
@@ -552,10 +552,10 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
mapMode = GL_MAP_WRITE_BIT;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24 ||
- rb->Format == MESA_FORMAT_Z24_S8 ||
- rb->Format == MESA_FORMAT_Z24_X8) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ rb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_X8Z24_UNORM) {
mapMode |= GL_MAP_READ_BIT;
}
@@ -567,7 +567,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z_UNORM16:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLushort clearVal = 0;
@@ -587,8 +587,8 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z32:
- case MESA_FORMAT_Z32_FLOAT:
+ case MESA_FORMAT_Z_UNORM32:
+ case MESA_FORMAT_Z_FLOAT32:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLuint clearVal = 0;
@@ -602,17 +602,17 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLuint clearVal = 0;
GLuint mask;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24)
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT)
mask = 0xff000000;
else
mask = 0xff;
@@ -628,7 +628,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
GLfloat clearVal = (GLfloat) ctx->Depth.Clear;
@@ -692,15 +692,15 @@ _swrast_clear_depth_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLfloat zClear = (GLfloat) ctx->Depth.Clear;
GLuint clear = 0, mask;
_mesa_pack_float_z_row(rb->Format, 1, &zClear, &clear);
- if (rb->Format == MESA_FORMAT_S8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
mask = ((~writeMask) & 0xff) << 24;
clear |= (ctx->Stencil.Clear & writeMask & 0xff) << 24;
}
@@ -725,7 +725,7 @@ _swrast_clear_depth_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
const GLfloat zClear = (GLfloat) ctx->Depth.Clear;
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c
index 1786de1a3..ed4487f3e 100644
--- a/mesalib/src/mesa/swrast/s_drawpix.c
+++ b/mesalib/src/mesa/swrast/s_drawpix.c
@@ -223,8 +223,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
if (format == GL_RGB &&
type == GL_UNSIGNED_BYTE &&
- (rb->Format == MESA_FORMAT_XRGB8888 ||
- rb->Format == MESA_FORMAT_ARGB8888)) {
+ (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM ||
+ rb->Format == MESA_FORMAT_B8G8R8A8_UNORM)) {
fast_draw_rgb_ubyte_pixels(ctx, rb, x, y, width, height,
&unpack, pixels);
return GL_TRUE;
@@ -232,8 +232,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
if (format == GL_RGBA &&
type == GL_UNSIGNED_BYTE &&
- (rb->Format == MESA_FORMAT_XRGB8888 ||
- rb->Format == MESA_FORMAT_ARGB8888)) {
+ (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM ||
+ rb->Format == MESA_FORMAT_B8G8R8A8_UNORM)) {
fast_draw_rgba_ubyte_pixels(ctx, rb, x, y, width, height,
&unpack, pixels);
return GL_TRUE;
@@ -500,7 +500,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
/**
- * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_S8_Z24
+ * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_Z24_UNORM_X8_UINT
* renderbuffer. No masking, zooming, scaling, etc.
*/
static void
@@ -572,8 +572,8 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
ASSERT(stencilRb);
if (depthRb == stencilRb &&
- (depthRb->Format == MESA_FORMAT_Z24_S8 ||
- depthRb->Format == MESA_FORMAT_S8_Z24) &&
+ (depthRb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ depthRb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) &&
type == GL_UNSIGNED_INT_24_8 &&
!scaleOrBias &&
!zoom &&
diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c
index a19d02ac0..cf5e2230d 100644
--- a/mesalib/src/mesa/swrast/s_renderbuffer.c
+++ b/mesalib/src/mesa/swrast/s_renderbuffer.c
@@ -69,7 +69,7 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- rb->Format = MESA_FORMAT_RGB888;
+ rb->Format = MESA_FORMAT_BGR_UNORM8;
break;
case GL_RGBA:
case GL_RGBA2:
@@ -81,35 +81,35 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_RGBA12:
#endif
if (_mesa_little_endian())
- rb->Format = MESA_FORMAT_RGBA8888_REV;
+ rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
else
- rb->Format = MESA_FORMAT_RGBA8888;
+ rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
break;
case GL_RGBA16:
case GL_RGBA16_SNORM:
/* for accum buffer */
- rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
+ rb->Format = MESA_FORMAT_RGBA_SNORM16;
break;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
case GL_STENCIL_INDEX4_EXT:
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
- rb->Format = MESA_FORMAT_S8;
+ rb->Format = MESA_FORMAT_S_UINT8;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
- rb->Format = MESA_FORMAT_Z16;
+ rb->Format = MESA_FORMAT_Z_UNORM16;
break;
case GL_DEPTH_COMPONENT24:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
break;
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_Z32;
+ rb->Format = MESA_FORMAT_Z_UNORM32;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
break;
default:
/* unsupported format */
diff --git a/mesalib/src/mesa/swrast/s_stencil.c b/mesalib/src/mesa/swrast/s_stencil.c
index 3eeeb24b2..e7c35ff69 100644
--- a/mesalib/src/mesa/swrast/s_stencil.c
+++ b/mesalib/src/mesa/swrast/s_stencil.c
@@ -61,7 +61,7 @@ ENDIF
* within the 4-byte pixel will be either 0 or 3.
*/
static GLint
-get_stencil_offset(gl_format format)
+get_stencil_offset(mesa_format format)
{
const GLubyte one = 1;
GLubyte pixel[MAX_PIXEL_BYTES];
@@ -300,7 +300,7 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_S8) {
+ if (rb->Format == MESA_FORMAT_S_UINT8) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -587,7 +587,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S_UINT8:
{
GLubyte clear = ctx->Stencil.Clear & writeMask & 0xff;
GLubyte mask = (~writeMask) & 0xff;
@@ -614,7 +614,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;
@@ -627,7 +627,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLuint clear = ctx->Stencil.Clear & writeMask & 0xff;
GLuint mask = 0xffffff00 | ((~writeMask) & 0xff);
diff --git a/mesalib/src/mesa/swrast/s_texfetch.c b/mesalib/src/mesa/swrast/s_texfetch.c
index b886e6586..7a3e76f85 100644
--- a/mesalib/src/mesa/swrast/s_texfetch.c
+++ b/mesalib/src/mesa/swrast/s_texfetch.c
@@ -134,7 +134,7 @@ static void fetch_null_texelf( const struct swrast_texture_image *texImage,
* XXX this is somewhat temporary.
*/
static struct {
- gl_format Name;
+ mesa_format Name;
FetchTexelFunc Fetch1D;
FetchTexelFunc Fetch2D;
FetchTexelFunc Fetch3D;
@@ -149,175 +149,175 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_RGBA8888,
+ MESA_FORMAT_A8B8G8R8_UNORM,
fetch_texel_1d_f_rgba8888,
fetch_texel_2d_f_rgba8888,
fetch_texel_3d_f_rgba8888
},
{
- MESA_FORMAT_RGBA8888_REV,
+ MESA_FORMAT_R8G8B8A8_UNORM,
fetch_texel_1d_f_rgba8888_rev,
fetch_texel_2d_f_rgba8888_rev,
fetch_texel_3d_f_rgba8888_rev
},
{
- MESA_FORMAT_ARGB8888,
+ MESA_FORMAT_B8G8R8A8_UNORM,
fetch_texel_1d_f_argb8888,
fetch_texel_2d_f_argb8888,
fetch_texel_3d_f_argb8888
},
{
- MESA_FORMAT_ARGB8888_REV,
+ MESA_FORMAT_A8R8G8B8_UNORM,
fetch_texel_1d_f_argb8888_rev,
fetch_texel_2d_f_argb8888_rev,
fetch_texel_3d_f_argb8888_rev
},
{
- MESA_FORMAT_RGBX8888,
+ MESA_FORMAT_X8B8G8R8_UNORM,
fetch_texel_1d_f_rgbx8888,
fetch_texel_2d_f_rgbx8888,
fetch_texel_3d_f_rgbx8888
},
{
- MESA_FORMAT_RGBX8888_REV,
+ MESA_FORMAT_R8G8B8X8_UNORM,
fetch_texel_1d_f_rgbx8888_rev,
fetch_texel_2d_f_rgbx8888_rev,
fetch_texel_3d_f_rgbx8888_rev
},
{
- MESA_FORMAT_XRGB8888,
+ MESA_FORMAT_B8G8R8X8_UNORM,
fetch_texel_1d_f_xrgb8888,
fetch_texel_2d_f_xrgb8888,
fetch_texel_3d_f_xrgb8888
},
{
- MESA_FORMAT_XRGB8888_REV,
+ MESA_FORMAT_X8R8G8B8_UNORM,
fetch_texel_1d_f_xrgb8888_rev,
fetch_texel_2d_f_xrgb8888_rev,
fetch_texel_3d_f_xrgb8888_rev
},
{
- MESA_FORMAT_RGB888,
+ MESA_FORMAT_BGR_UNORM8,
fetch_texel_1d_f_rgb888,
fetch_texel_2d_f_rgb888,
fetch_texel_3d_f_rgb888
},
{
- MESA_FORMAT_BGR888,
+ MESA_FORMAT_RGB_UNORM8,
fetch_texel_1d_f_bgr888,
fetch_texel_2d_f_bgr888,
fetch_texel_3d_f_bgr888
},
{
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
fetch_texel_1d_f_rgb565,
fetch_texel_2d_f_rgb565,
fetch_texel_3d_f_rgb565
},
{
- MESA_FORMAT_RGB565_REV,
+ MESA_FORMAT_R5G6B5_UNORM,
fetch_texel_1d_f_rgb565_rev,
fetch_texel_2d_f_rgb565_rev,
fetch_texel_3d_f_rgb565_rev
},
{
- MESA_FORMAT_ARGB4444,
+ MESA_FORMAT_B4G4R4A4_UNORM,
fetch_texel_1d_f_argb4444,
fetch_texel_2d_f_argb4444,
fetch_texel_3d_f_argb4444
},
{
- MESA_FORMAT_ARGB4444_REV,
+ MESA_FORMAT_A4R4G4B4_UNORM,
fetch_texel_1d_f_argb4444_rev,
fetch_texel_2d_f_argb4444_rev,
fetch_texel_3d_f_argb4444_rev
},
{
- MESA_FORMAT_RGBA5551,
+ MESA_FORMAT_A1B5G5R5_UNORM,
fetch_texel_1d_f_rgba5551,
fetch_texel_2d_f_rgba5551,
fetch_texel_3d_f_rgba5551
},
{
- MESA_FORMAT_ARGB1555,
+ MESA_FORMAT_B5G5R5A1_UNORM,
fetch_texel_1d_f_argb1555,
fetch_texel_2d_f_argb1555,
fetch_texel_3d_f_argb1555
},
{
- MESA_FORMAT_ARGB1555_REV,
+ MESA_FORMAT_A1R5G5B5_UNORM,
fetch_texel_1d_f_argb1555_rev,
fetch_texel_2d_f_argb1555_rev,
fetch_texel_3d_f_argb1555_rev
},
{
- MESA_FORMAT_AL44,
+ MESA_FORMAT_L4A4_UNORM,
fetch_texel_1d_f_al44,
fetch_texel_2d_f_al44,
fetch_texel_3d_f_al44
},
{
- MESA_FORMAT_AL88,
+ MESA_FORMAT_L8A8_UNORM,
fetch_texel_1d_f_al88,
fetch_texel_2d_f_al88,
fetch_texel_3d_f_al88
},
{
- MESA_FORMAT_AL88_REV,
+ MESA_FORMAT_A8L8_UNORM,
fetch_texel_1d_f_al88_rev,
fetch_texel_2d_f_al88_rev,
fetch_texel_3d_f_al88_rev
},
{
- MESA_FORMAT_AL1616,
+ MESA_FORMAT_L16A16_UNORM,
fetch_texel_1d_f_al1616,
fetch_texel_2d_f_al1616,
fetch_texel_3d_f_al1616
},
{
- MESA_FORMAT_AL1616_REV,
+ MESA_FORMAT_A16L16_UNORM,
fetch_texel_1d_f_al1616_rev,
fetch_texel_2d_f_al1616_rev,
fetch_texel_3d_f_al1616_rev
},
{
- MESA_FORMAT_RGB332,
+ MESA_FORMAT_B2G3R3_UNORM,
fetch_texel_1d_f_rgb332,
fetch_texel_2d_f_rgb332,
fetch_texel_3d_f_rgb332
},
{
- MESA_FORMAT_A8,
+ MESA_FORMAT_A_UNORM8,
fetch_texel_1d_f_a8,
fetch_texel_2d_f_a8,
fetch_texel_3d_f_a8
},
{
- MESA_FORMAT_A16,
+ MESA_FORMAT_A_UNORM16,
fetch_texel_1d_f_a16,
fetch_texel_2d_f_a16,
fetch_texel_3d_f_a16
},
{
- MESA_FORMAT_L8,
+ MESA_FORMAT_L_UNORM8,
fetch_texel_1d_f_l8,
fetch_texel_2d_f_l8,
fetch_texel_3d_f_l8
},
{
- MESA_FORMAT_L16,
+ MESA_FORMAT_L_UNORM16,
fetch_texel_1d_f_l16,
fetch_texel_2d_f_l16,
fetch_texel_3d_f_l16
},
{
- MESA_FORMAT_I8,
+ MESA_FORMAT_I_UNORM8,
fetch_texel_1d_f_i8,
fetch_texel_2d_f_i8,
fetch_texel_3d_f_i8
},
{
- MESA_FORMAT_I16,
+ MESA_FORMAT_I_UNORM16,
fetch_texel_1d_f_i16,
fetch_texel_2d_f_i16,
fetch_texel_3d_f_i16
@@ -335,115 +335,115 @@ texfetch_funcs[] =
fetch_texel_3d_f_ycbcr_rev
},
{
- MESA_FORMAT_R8,
+ MESA_FORMAT_R_UNORM8,
fetch_texel_1d_f_r8,
fetch_texel_2d_f_r8,
fetch_texel_3d_f_r8
},
{
- MESA_FORMAT_GR88,
+ MESA_FORMAT_R8G8_UNORM,
fetch_texel_1d_f_gr88,
fetch_texel_2d_f_gr88,
fetch_texel_3d_f_gr88
},
{
- MESA_FORMAT_RG88,
+ MESA_FORMAT_G8R8_UNORM,
fetch_texel_1d_f_rg88,
fetch_texel_2d_f_rg88,
fetch_texel_3d_f_rg88
},
{
- MESA_FORMAT_R16,
+ MESA_FORMAT_R_UNORM16,
fetch_texel_1d_f_r16,
fetch_texel_2d_f_r16,
fetch_texel_3d_f_r16
},
{
- MESA_FORMAT_GR1616,
+ MESA_FORMAT_R16G16_UNORM,
fetch_texel_1d_f_rg1616,
fetch_texel_2d_f_rg1616,
fetch_texel_3d_f_rg1616
},
{
- MESA_FORMAT_RG1616,
+ MESA_FORMAT_G16R16_UNORM,
fetch_texel_1d_f_rg1616_rev,
fetch_texel_2d_f_rg1616_rev,
fetch_texel_3d_f_rg1616_rev
},
{
- MESA_FORMAT_ARGB2101010,
+ MESA_FORMAT_B10G10R10A2_UNORM,
fetch_texel_1d_f_argb2101010,
fetch_texel_2d_f_argb2101010,
fetch_texel_3d_f_argb2101010
},
{
- MESA_FORMAT_Z24_S8,
+ MESA_FORMAT_S8_UINT_Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_S8_Z24,
+ MESA_FORMAT_Z24_UNORM_X8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z16,
+ MESA_FORMAT_Z_UNORM16,
fetch_texel_1d_f_z16,
fetch_texel_2d_f_z16,
fetch_texel_3d_f_z16
},
{
- MESA_FORMAT_X8_Z24,
+ MESA_FORMAT_Z24_UNORM_S8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z24_X8,
+ MESA_FORMAT_X8Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_Z32,
+ MESA_FORMAT_Z_UNORM32,
fetch_texel_1d_f_z32,
fetch_texel_2d_f_z32,
fetch_texel_3d_f_z32
},
{
- MESA_FORMAT_S8,
+ MESA_FORMAT_S_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_SRGB8,
+ MESA_FORMAT_BGR_SRGB8,
fetch_texel_1d_srgb8,
fetch_texel_2d_srgb8,
fetch_texel_3d_srgb8
},
{
- MESA_FORMAT_SRGBA8,
+ MESA_FORMAT_A8B8G8R8_SRGB,
fetch_texel_1d_srgba8,
fetch_texel_2d_srgba8,
fetch_texel_3d_srgba8
},
{
- MESA_FORMAT_SARGB8,
+ MESA_FORMAT_B8G8R8A8_SRGB,
fetch_texel_1d_sargb8,
fetch_texel_2d_sargb8,
fetch_texel_3d_sargb8
},
{
- MESA_FORMAT_SL8,
+ MESA_FORMAT_L_SRGB8,
fetch_texel_1d_sl8,
fetch_texel_2d_sl8,
fetch_texel_3d_sl8
},
{
- MESA_FORMAT_SLA8,
+ MESA_FORMAT_L8A8_SRGB,
fetch_texel_1d_sla8,
fetch_texel_2d_sla8,
fetch_texel_3d_sla8
@@ -534,49 +534,49 @@ texfetch_funcs[] =
fetch_texel_3d_f_rgb_f16
},
{
- MESA_FORMAT_ALPHA_FLOAT32,
+ MESA_FORMAT_A_FLOAT32,
fetch_texel_1d_f_alpha_f32,
fetch_texel_2d_f_alpha_f32,
fetch_texel_3d_f_alpha_f32
},
{
- MESA_FORMAT_ALPHA_FLOAT16,
+ MESA_FORMAT_A_FLOAT16,
fetch_texel_1d_f_alpha_f16,
fetch_texel_2d_f_alpha_f16,
fetch_texel_3d_f_alpha_f16
},
{
- MESA_FORMAT_LUMINANCE_FLOAT32,
+ MESA_FORMAT_L_FLOAT32,
fetch_texel_1d_f_luminance_f32,
fetch_texel_2d_f_luminance_f32,
fetch_texel_3d_f_luminance_f32
},
{
- MESA_FORMAT_LUMINANCE_FLOAT16,
+ MESA_FORMAT_L_FLOAT16,
fetch_texel_1d_f_luminance_f16,
fetch_texel_2d_f_luminance_f16,
fetch_texel_3d_f_luminance_f16
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
+ MESA_FORMAT_LA_FLOAT32,
fetch_texel_1d_f_luminance_alpha_f32,
fetch_texel_2d_f_luminance_alpha_f32,
fetch_texel_3d_f_luminance_alpha_f32
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
+ MESA_FORMAT_LA_FLOAT16,
fetch_texel_1d_f_luminance_alpha_f16,
fetch_texel_2d_f_luminance_alpha_f16,
fetch_texel_3d_f_luminance_alpha_f16
},
{
- MESA_FORMAT_INTENSITY_FLOAT32,
+ MESA_FORMAT_I_FLOAT32,
fetch_texel_1d_f_intensity_f32,
fetch_texel_2d_f_intensity_f32,
fetch_texel_3d_f_intensity_f32
},
{
- MESA_FORMAT_INTENSITY_FLOAT16,
+ MESA_FORMAT_I_FLOAT16,
fetch_texel_1d_f_intensity_f16,
fetch_texel_2d_f_intensity_f16,
fetch_texel_3d_f_intensity_f16
@@ -607,42 +607,42 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_ALPHA_UINT8,
+ MESA_FORMAT_A_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_UINT16,
+ MESA_FORMAT_A_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_UINT32,
+ MESA_FORMAT_A_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_INT8,
+ MESA_FORMAT_A_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_INT16,
+ MESA_FORMAT_A_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_INT32,
+ MESA_FORMAT_A_SINT32,
NULL,
NULL,
NULL
@@ -650,42 +650,42 @@ texfetch_funcs[] =
{
- MESA_FORMAT_INTENSITY_UINT8,
+ MESA_FORMAT_I_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_UINT16,
+ MESA_FORMAT_I_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_UINT32,
+ MESA_FORMAT_I_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_INT8,
+ MESA_FORMAT_I_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_INT16,
+ MESA_FORMAT_I_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_INT32,
+ MESA_FORMAT_I_SINT32,
NULL,
NULL,
NULL
@@ -693,42 +693,42 @@ texfetch_funcs[] =
{
- MESA_FORMAT_LUMINANCE_UINT8,
+ MESA_FORMAT_L_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_UINT16,
+ MESA_FORMAT_L_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_UINT32,
+ MESA_FORMAT_L_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_INT8,
+ MESA_FORMAT_L_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_INT16,
+ MESA_FORMAT_L_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_INT32,
+ MESA_FORMAT_L_SINT32,
NULL,
NULL,
NULL
@@ -736,42 +736,42 @@ texfetch_funcs[] =
{
- MESA_FORMAT_LUMINANCE_ALPHA_UINT8,
+ MESA_FORMAT_LA_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_UINT16,
+ MESA_FORMAT_LA_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_UINT32,
+ MESA_FORMAT_LA_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT8,
+ MESA_FORMAT_LA_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT16,
+ MESA_FORMAT_LA_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT32,
+ MESA_FORMAT_LA_SINT32,
NULL,
NULL,
NULL
@@ -779,21 +779,21 @@ texfetch_funcs[] =
{
- MESA_FORMAT_R_INT8,
+ MESA_FORMAT_R_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT8,
+ MESA_FORMAT_RG_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT8,
+ MESA_FORMAT_RGB_SINT8,
NULL,
NULL,
NULL
@@ -801,55 +801,55 @@ texfetch_funcs[] =
/* non-normalized, signed int */
{
- MESA_FORMAT_RGBA_INT8,
+ MESA_FORMAT_RGBA_SINT8,
fetch_texel_1d_rgba_int8,
fetch_texel_2d_rgba_int8,
fetch_texel_3d_rgba_int8
},
{
- MESA_FORMAT_R_INT16,
+ MESA_FORMAT_R_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT16,
+ MESA_FORMAT_RG_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT16,
+ MESA_FORMAT_RGB_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGBA_INT16,
+ MESA_FORMAT_RGBA_SINT16,
fetch_texel_1d_rgba_int16,
fetch_texel_2d_rgba_int16,
fetch_texel_3d_rgba_int16
},
{
- MESA_FORMAT_R_INT32,
+ MESA_FORMAT_R_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT32,
+ MESA_FORMAT_RG_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT32,
+ MESA_FORMAT_RGB_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGBA_INT32,
+ MESA_FORMAT_RGBA_SINT32,
fetch_texel_1d_rgba_int32,
fetch_texel_2d_rgba_int32,
fetch_texel_3d_rgba_int32
@@ -939,109 +939,109 @@ texfetch_funcs[] =
/* signed, normalized */
{
- MESA_FORMAT_SIGNED_R8,
+ MESA_FORMAT_R_SNORM8,
fetch_texel_1d_signed_r8,
fetch_texel_2d_signed_r8,
fetch_texel_3d_signed_r8
},
{
- MESA_FORMAT_SIGNED_RG88_REV,
+ MESA_FORMAT_R8G8_SNORM,
fetch_texel_1d_signed_rg88_rev,
fetch_texel_2d_signed_rg88_rev,
fetch_texel_3d_signed_rg88_rev
},
{
- MESA_FORMAT_SIGNED_RGBX8888,
+ MESA_FORMAT_X8B8G8R8_SNORM,
fetch_texel_1d_signed_rgbx8888,
fetch_texel_2d_signed_rgbx8888,
fetch_texel_3d_signed_rgbx8888
},
{
- MESA_FORMAT_SIGNED_RGBA8888,
+ MESA_FORMAT_A8B8G8R8_SNORM,
fetch_texel_1d_signed_rgba8888,
fetch_texel_2d_signed_rgba8888,
fetch_texel_3d_signed_rgba8888
},
{
- MESA_FORMAT_SIGNED_RGBA8888_REV,
+ MESA_FORMAT_R8G8B8A8_SNORM,
fetch_texel_1d_signed_rgba8888_rev,
fetch_texel_2d_signed_rgba8888_rev,
fetch_texel_3d_signed_rgba8888_rev
},
{
- MESA_FORMAT_SIGNED_R16,
+ MESA_FORMAT_R_SNORM16,
fetch_texel_1d_signed_r16,
fetch_texel_2d_signed_r16,
fetch_texel_3d_signed_r16
},
{
- MESA_FORMAT_SIGNED_GR1616,
+ MESA_FORMAT_R16G16_SNORM,
fetch_texel_1d_signed_rg1616,
fetch_texel_2d_signed_rg1616,
fetch_texel_3d_signed_rg1616
},
{
- MESA_FORMAT_SIGNED_RGB_16,
+ MESA_FORMAT_RGB_SNORM16,
fetch_texel_1d_signed_rgb_16,
fetch_texel_2d_signed_rgb_16,
fetch_texel_3d_signed_rgb_16
},
{
- MESA_FORMAT_SIGNED_RGBA_16,
+ MESA_FORMAT_RGBA_SNORM16,
fetch_texel_1d_signed_rgba_16,
fetch_texel_2d_signed_rgba_16,
fetch_texel_3d_signed_rgba_16
},
{
- MESA_FORMAT_RGBA_16,
+ MESA_FORMAT_RGBA_UNORM16,
fetch_texel_1d_rgba_16,
fetch_texel_2d_rgba_16,
fetch_texel_3d_rgba_16
},
{
- MESA_FORMAT_RED_RGTC1,
+ MESA_FORMAT_R_RGTC1_UNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_RED_RGTC1,
+ MESA_FORMAT_R_RGTC1_SNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_RG_RGTC2,
+ MESA_FORMAT_RG_RGTC2_UNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_RG_RGTC2,
+ MESA_FORMAT_RG_RGTC2_SNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_L_LATC1,
+ MESA_FORMAT_L_LATC1_UNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_L_LATC1,
+ MESA_FORMAT_L_LATC1_SNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_LA_LATC2,
+ MESA_FORMAT_LA_LATC2_UNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_LA_LATC2,
+ MESA_FORMAT_LA_LATC2_SNORM,
fetch_compressed,
fetch_compressed,
fetch_compressed
@@ -1113,193 +1113,193 @@ texfetch_funcs[] =
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_A8,
+ MESA_FORMAT_A_SNORM8,
fetch_texel_1d_signed_a8,
fetch_texel_2d_signed_a8,
fetch_texel_3d_signed_a8
},
{
- MESA_FORMAT_SIGNED_L8,
+ MESA_FORMAT_L_SNORM8,
fetch_texel_1d_signed_l8,
fetch_texel_2d_signed_l8,
fetch_texel_3d_signed_l8
},
{
- MESA_FORMAT_SIGNED_AL88,
+ MESA_FORMAT_L8A8_SNORM,
fetch_texel_1d_signed_al88,
fetch_texel_2d_signed_al88,
fetch_texel_3d_signed_al88
},
{
- MESA_FORMAT_SIGNED_I8,
+ MESA_FORMAT_I_SNORM8,
fetch_texel_1d_signed_i8,
fetch_texel_2d_signed_i8,
fetch_texel_3d_signed_i8
},
{
- MESA_FORMAT_SIGNED_A16,
+ MESA_FORMAT_A_SNORM16,
fetch_texel_1d_signed_a16,
fetch_texel_2d_signed_a16,
fetch_texel_3d_signed_a16
},
{
- MESA_FORMAT_SIGNED_L16,
+ MESA_FORMAT_L_SNORM16,
fetch_texel_1d_signed_l16,
fetch_texel_2d_signed_l16,
fetch_texel_3d_signed_l16
},
{
- MESA_FORMAT_SIGNED_AL1616,
+ MESA_FORMAT_LA_SNORM16,
fetch_texel_1d_signed_al1616,
fetch_texel_2d_signed_al1616,
fetch_texel_3d_signed_al1616
},
{
- MESA_FORMAT_SIGNED_I16,
+ MESA_FORMAT_I_SNORM16,
fetch_texel_1d_signed_i16,
fetch_texel_2d_signed_i16,
fetch_texel_3d_signed_i16
},
{
- MESA_FORMAT_RGB9_E5_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
fetch_texel_1d_rgb9_e5,
fetch_texel_2d_rgb9_e5,
fetch_texel_3d_rgb9_e5
},
{
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
fetch_texel_1d_r11_g11_b10f,
fetch_texel_2d_r11_g11_b10f,
fetch_texel_3d_r11_g11_b10f
},
{
- MESA_FORMAT_Z32_FLOAT,
+ MESA_FORMAT_Z_FLOAT32,
fetch_texel_1d_f_r_f32, /* Reuse the R32F functions. */
fetch_texel_2d_f_r_f32,
fetch_texel_3d_f_r_f32
},
{
- MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
fetch_texel_1d_z32f_x24s8,
fetch_texel_2d_z32f_x24s8,
fetch_texel_3d_z32f_x24s8
},
{
- MESA_FORMAT_ARGB2101010_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ABGR2101010_UINT,
+ MESA_FORMAT_R10G10B10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB4444_UNORM,
+ MESA_FORMAT_B4G4R4X4_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB1555_UNORM,
+ MESA_FORMAT_B5G5R5X1_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SNORM,
+ MESA_FORMAT_R8G8B8X8_SNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SRGB,
+ MESA_FORMAT_R8G8B8X8_SRGB,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_UINT,
+ MESA_FORMAT_RGBX_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SINT,
+ MESA_FORMAT_RGBX_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB2101010_UNORM,
+ MESA_FORMAT_B10G10R10X2_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR16161616_UNORM,
+ MESA_FORMAT_RGBX_UNORM16,
fetch_texel_1d_xbgr16161616_unorm,
fetch_texel_2d_xbgr16161616_unorm,
fetch_texel_3d_xbgr16161616_unorm
},
{
- MESA_FORMAT_XBGR16161616_SNORM,
+ MESA_FORMAT_RGBX_SNORM16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR16161616_FLOAT,
+ MESA_FORMAT_RGBX_FLOAT16,
fetch_texel_1d_xbgr16161616_float,
fetch_texel_2d_xbgr16161616_float,
fetch_texel_3d_xbgr16161616_float
},
{
- MESA_FORMAT_XBGR16161616_UINT,
+ MESA_FORMAT_RGBX_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR16161616_SINT,
+ MESA_FORMAT_RGBX_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR32323232_FLOAT,
+ MESA_FORMAT_RGBX_FLOAT32,
fetch_texel_1d_xbgr32323232_float,
fetch_texel_2d_xbgr32323232_float,
fetch_texel_3d_xbgr32323232_float
},
{
- MESA_FORMAT_XBGR32323232_UINT,
+ MESA_FORMAT_RGBX_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR32323232_SINT,
+ MESA_FORMAT_RGBX_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ABGR2101010,
+ MESA_FORMAT_R10G10B10A2_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_SIGNED_RG88,
+ MESA_FORMAT_G8R8_SNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_SIGNED_RG1616,
+ MESA_FORMAT_G16R16_SNORM,
NULL,
NULL,
NULL
@@ -1314,11 +1314,11 @@ static void
set_fetch_functions(const struct gl_sampler_object *samp,
struct swrast_texture_image *texImage, GLuint dims)
{
- gl_format format = texImage->Base.TexFormat;
+ mesa_format format = texImage->Base.TexFormat;
#ifdef DEBUG
/* check that the table entries are sorted by format name */
- gl_format fmt;
+ mesa_format fmt;
for (fmt = 0; fmt < MESA_FORMAT_COUNT; fmt++) {
assert(texfetch_funcs[fmt].Name == fmt);
}
diff --git a/mesalib/src/mesa/swrast/s_texfetch_tmp.h b/mesalib/src/mesa/swrast/s_texfetch_tmp.h
index e2521b50c..f3048894e 100644
--- a/mesalib/src/mesa/swrast/s_texfetch_tmp.h
+++ b/mesalib/src/mesa/swrast/s_texfetch_tmp.h
@@ -69,7 +69,7 @@
#endif
-/* MESA_FORMAT_Z32 ***********************************************************/
+/* MESA_FORMAT_Z_UNORM32 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 32-bit depth texture,
* returning 1 GLfloat.
@@ -83,7 +83,7 @@ static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
}
-/* MESA_FORMAT_Z16 ***********************************************************/
+/* MESA_FORMAT_Z_UNORM16 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 16-bit depth texture,
* returning 1 GLfloat.
@@ -388,7 +388,7 @@ static void FETCH(f_rg_f16)( const struct swrast_texture_image *texImage,
* Begin Hardware formats
*/
-/* MESA_FORMAT_RGBA8888 ******************************************************/
+/* MESA_FORMAT_A8B8G8R8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rgba8888 texture, return 4 GLfloats */
static void FETCH(f_rgba8888)( const struct swrast_texture_image *texImage,
@@ -422,7 +422,7 @@ static void FETCH(f_rgba8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB8888 ******************************************************/
+/* MESA_FORMAT_B8G8R8A8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888 texture, return 4 GLchans */
static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
@@ -438,7 +438,7 @@ static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB8888_REV **************************************************/
+/* MESA_FORMAT_A8R8G8B8_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888_rev texture, return 4 GLfloats */
static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
@@ -454,7 +454,7 @@ static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBX8888 ******************************************************/
+/* MESA_FORMAT_X8B8G8R8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rgbx8888 texture, return 4 GLfloats */
static void FETCH(f_rgbx8888)( const struct swrast_texture_image *texImage,
@@ -486,7 +486,7 @@ static void FETCH(f_rgbx8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_XRGB8888 ******************************************************/
+/* MESA_FORMAT_B8G8R8X8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888 texture, return 4 GLchans */
static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
@@ -502,7 +502,7 @@ static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_XRGB8888_REV **************************************************/
+/* MESA_FORMAT_X8R8G8B8_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
@@ -518,7 +518,7 @@ static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB888 ********************************************************/
+/* MESA_FORMAT_BGR_UNORM8 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
static void FETCH(f_rgb888)( const struct swrast_texture_image *texImage,
@@ -534,7 +534,7 @@ static void FETCH(f_rgb888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_BGR888 ********************************************************/
+/* MESA_FORMAT_RGB_UNORM8 ********************************************************/
/* Fetch texel from 1D, 2D or 3D bgr888 texture, return 4 GLchans */
static void FETCH(f_bgr888)( const struct swrast_texture_image *texImage,
@@ -553,7 +553,7 @@ static void FETCH(f_bgr888)( const struct swrast_texture_image *texImage,
/* use color expansion like (g << 2) | (g >> 4) (does somewhat random rounding)
instead of slow (g << 2) * 255 / 252 (always rounds down) */
-/* MESA_FORMAT_RGB565 ********************************************************/
+/* MESA_FORMAT_B5G6R5_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565 texture, return 4 GLchans */
static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
@@ -570,7 +570,7 @@ static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB565_REV ****************************************************/
+/* MESA_FORMAT_R5G6B5_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565_rev texture, return 4 GLchans */
static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
@@ -587,7 +587,7 @@ static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444 ******************************************************/
+/* MESA_FORMAT_B4G4R4A4_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */
static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
@@ -604,7 +604,7 @@ static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444_REV **************************************************/
+/* MESA_FORMAT_A4R4G4B4_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb4444_rev texture, return 4 GLchans */
static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
@@ -619,7 +619,7 @@ static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA5551 ******************************************************/
+/* MESA_FORMAT_A1B5G5R5_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
@@ -635,7 +635,7 @@ static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555 ******************************************************/
+/* MESA_FORMAT_B5G5R5A1_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
@@ -652,7 +652,7 @@ static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555_REV **************************************************/
+/* MESA_FORMAT_A1R5G5B5_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555_rev texture, return 4 GLchans */
static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
@@ -669,7 +669,7 @@ static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB2101010 ***************************************************/
+/* MESA_FORMAT_B10G10R10A2_UNORM ***************************************************/
/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
@@ -686,7 +686,7 @@ static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_GR88 **********************************************************/
+/* MESA_FORMAT_R8G8_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_gr88)( const struct swrast_texture_image *texImage,
@@ -702,7 +702,7 @@ static void FETCH(f_gr88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG88 ******************************************************/
+/* MESA_FORMAT_G8R8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rg88_rev texture, return 4 GLchans */
static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
@@ -718,7 +718,7 @@ static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL44 **********************************************************/
+/* MESA_FORMAT_L4A4_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
@@ -734,7 +734,7 @@ static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88 **********************************************************/
+/* MESA_FORMAT_L8A8_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
@@ -750,7 +750,7 @@ static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R8 ************************************************************/
+/* MESA_FORMAT_R_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
@@ -766,7 +766,7 @@ static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R16 ***********************************************************/
+/* MESA_FORMAT_R_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D r16 texture, return 4 GLchans */
static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
@@ -782,7 +782,7 @@ static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88_REV ******************************************************/
+/* MESA_FORMAT_A8L8_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D al88_rev texture, return 4 GLchans */
static void FETCH(f_al88_rev)( const struct swrast_texture_image *texImage,
@@ -798,7 +798,7 @@ static void FETCH(f_al88_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_GR1616 ********************************************************/
+/* MESA_FORMAT_R16G16_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616 texture, return 4 GLchans */
static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
@@ -814,7 +814,7 @@ static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG1616 ****************************************************/
+/* MESA_FORMAT_G16R16_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616_rev texture, return 4 GLchans */
static void FETCH(f_rg1616_rev)( const struct swrast_texture_image *texImage,
@@ -830,7 +830,7 @@ static void FETCH(f_rg1616_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL1616 ********************************************************/
+/* MESA_FORMAT_L16A16_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
@@ -846,7 +846,7 @@ static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL1616_REV ****************************************************/
+/* MESA_FORMAT_A16L16_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D al1616_rev texture, return 4 GLchans */
static void FETCH(f_al1616_rev)( const struct swrast_texture_image *texImage,
@@ -862,7 +862,7 @@ static void FETCH(f_al1616_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB332 ********************************************************/
+/* MESA_FORMAT_B2G3R3_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
@@ -879,7 +879,7 @@ static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A8 ************************************************************/
+/* MESA_FORMAT_A_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
@@ -895,7 +895,7 @@ static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A16 ************************************************************/
+/* MESA_FORMAT_A_UNORM16 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
@@ -911,7 +911,7 @@ static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L8 ************************************************************/
+/* MESA_FORMAT_L_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D l8 texture, return 4 GLchans */
static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
@@ -927,7 +927,7 @@ static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L16 ***********************************************************/
+/* MESA_FORMAT_L_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D l16 texture, return 4 GLchans */
static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
@@ -943,7 +943,7 @@ static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I8 ************************************************************/
+/* MESA_FORMAT_I_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D i8 texture, return 4 GLchans */
static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
@@ -959,7 +959,7 @@ static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I16 ***********************************************************/
+/* MESA_FORMAT_I_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D i16 texture, return 4 GLchans */
static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
@@ -976,7 +976,7 @@ static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
/* Fetch texel from 1D, 2D or 3D srgb8 texture, return 4 GLfloats */
-/* Note: component order is same as for MESA_FORMAT_RGB888 */
+/* Note: component order is same as for MESA_FORMAT_BGR_UNORM8 */
static void FETCH(srgb8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
@@ -1042,7 +1042,7 @@ static void FETCH(sla8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT8 **************************************************/
+/* MESA_FORMAT_RGBA_SINT8 **************************************************/
static void
FETCH(rgba_int8)(const struct swrast_texture_image *texImage,
@@ -1058,7 +1058,7 @@ FETCH(rgba_int8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT16 **************************************************/
+/* MESA_FORMAT_RGBA_SINT16 **************************************************/
static void
FETCH(rgba_int16)(const struct swrast_texture_image *texImage,
@@ -1074,7 +1074,7 @@ FETCH(rgba_int16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT32 **************************************************/
+/* MESA_FORMAT_RGBA_SINT32 **************************************************/
static void
FETCH(rgba_int32)(const struct swrast_texture_image *texImage,
@@ -1153,7 +1153,7 @@ static void FETCH(dudv8)(const struct swrast_texture_image *texImage,
}
-/* MESA_FORMAT_SIGNED_R8 ***********************************************/
+/* MESA_FORMAT_R_SNORM8 ***********************************************/
static void FETCH(signed_r8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1168,7 +1168,7 @@ static void FETCH(signed_r8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_A8 ***********************************************/
+/* MESA_FORMAT_A_SNORM8 ***********************************************/
static void FETCH(signed_a8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1183,7 +1183,7 @@ static void FETCH(signed_a8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_L8 ***********************************************/
+/* MESA_FORMAT_L_SNORM8 ***********************************************/
static void FETCH(signed_l8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1198,7 +1198,7 @@ static void FETCH(signed_l8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_I8 ***********************************************/
+/* MESA_FORMAT_I_SNORM8 ***********************************************/
static void FETCH(signed_i8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1213,7 +1213,7 @@ static void FETCH(signed_i8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RG88_REV ***********************************************/
+/* MESA_FORMAT_R8G8_SNORM ***********************************************/
static void FETCH(signed_rg88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1228,7 +1228,7 @@ static void FETCH(signed_rg88_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_AL88 ***********************************************/
+/* MESA_FORMAT_L8A8_SNORM ***********************************************/
static void FETCH(signed_al88)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1243,7 +1243,7 @@ static void FETCH(signed_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBX8888 ***********************************************/
+/* MESA_FORMAT_X8B8G8R8_SNORM ***********************************************/
static void FETCH(signed_rgbx8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1258,7 +1258,7 @@ static void FETCH(signed_rgbx8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/
+/* MESA_FORMAT_A8B8G8R8_SNORM ***********************************************/
static void FETCH(signed_rgba8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1286,7 +1286,7 @@ static void FETCH(signed_rgba8888_rev)( const struct swrast_texture_image *texIm
-/* MESA_FORMAT_SIGNED_R16 ***********************************************/
+/* MESA_FORMAT_R_SNORM16 ***********************************************/
static void
FETCH(signed_r16)(const struct swrast_texture_image *texImage,
@@ -1302,7 +1302,7 @@ FETCH(signed_r16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_A16 ***********************************************/
+/* MESA_FORMAT_A_SNORM16 ***********************************************/
static void
FETCH(signed_a16)(const struct swrast_texture_image *texImage,
@@ -1318,7 +1318,7 @@ FETCH(signed_a16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_L16 ***********************************************/
+/* MESA_FORMAT_L_SNORM16 ***********************************************/
static void
FETCH(signed_l16)(const struct swrast_texture_image *texImage,
@@ -1334,7 +1334,7 @@ FETCH(signed_l16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_I16 ***********************************************/
+/* MESA_FORMAT_I_SNORM16 ***********************************************/
static void
FETCH(signed_i16)(const struct swrast_texture_image *texImage,
@@ -1350,7 +1350,7 @@ FETCH(signed_i16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RG1616 ***********************************************/
+/* MESA_FORMAT_G16R16_SNORM ***********************************************/
static void
FETCH(signed_rg1616)(const struct swrast_texture_image *texImage,
@@ -1366,7 +1366,7 @@ FETCH(signed_rg1616)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_AL1616 ***********************************************/
+/* MESA_FORMAT_LA_SNORM16 ***********************************************/
static void
FETCH(signed_al1616)(const struct swrast_texture_image *texImage,
@@ -1382,7 +1382,7 @@ FETCH(signed_al1616)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/
+/* MESA_FORMAT_RGB_SNORM16 ***********************************************/
static void
FETCH(signed_rgb_16)(const struct swrast_texture_image *texImage,
@@ -1398,7 +1398,7 @@ FETCH(signed_rgb_16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
+/* MESA_FORMAT_RGBA_SNORM16 ***********************************************/
static void
FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
@@ -1415,7 +1415,7 @@ FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_16 ***********************************************/
+/* MESA_FORMAT_RGBA_UNORM16 ***********************************************/
static void
FETCH(rgba_16)(const struct swrast_texture_image *texImage,
@@ -1538,8 +1538,8 @@ static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) >> 8) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_S8 ||
- texImage->Base.TexFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ texImage->Base.TexFormat == MESA_FORMAT_X8Z24_UNORM);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
@@ -1556,8 +1556,8 @@ static void FETCH(f_s8_z24)( const struct swrast_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) & 0x00ffffff) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_Z24 ||
- texImage->Base.TexFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_S8_UINT);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
@@ -1578,7 +1578,7 @@ static void FETCH(rgb9_e5)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R11_G11_B10_FLOAT *********************************************/
+/* MESA_FORMAT_R11G11B10_FLOAT *********************************************/
static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1591,7 +1591,7 @@ static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_Z32_FLOAT_X24S8 ***********************************************/
+/* MESA_FORMAT_Z32_FLOAT_S8X24_UINT ***********************************************/
static void FETCH(z32f_x24s8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c
index 312b9ce9b..c3fd900b4 100644
--- a/mesalib/src/mesa/swrast/s_texfilter.c
+++ b/mesalib/src/mesa/swrast/s_texfilter.c
@@ -1428,7 +1428,7 @@ opt_sample_rgb_2d(struct gl_context *ctx,
ASSERT(samp->WrapS==GL_REPEAT);
ASSERT(samp->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->TexFormat == MESA_FORMAT_RGB888);
+ ASSERT(img->TexFormat == MESA_FORMAT_BGR_UNORM8);
ASSERT(swImg->_IsPowerOfTwo);
(void) swImg;
@@ -1473,7 +1473,7 @@ opt_sample_rgba_2d(struct gl_context *ctx,
ASSERT(samp->WrapS==GL_REPEAT);
ASSERT(samp->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888);
+ ASSERT(img->TexFormat == MESA_FORMAT_A8B8G8R8_UNORM);
ASSERT(swImg->_IsPowerOfTwo);
(void) swImg;
@@ -1521,11 +1521,11 @@ sample_lambda_2d(struct gl_context *ctx,
case GL_NEAREST:
if (repeatNoBorderPOT) {
switch (tImg->TexFormat) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
@@ -1578,11 +1578,11 @@ sample_lambda_2d(struct gl_context *ctx,
case GL_NEAREST:
if (repeatNoBorderPOT) {
switch (tImg->TexFormat) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
@@ -3760,9 +3760,9 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
sampler->WrapT == GL_REPEAT &&
swImg->_IsPowerOfTwo &&
img->Border == 0) {
- if (img->TexFormat == MESA_FORMAT_RGB888)
+ if (img->TexFormat == MESA_FORMAT_BGR_UNORM8)
func = &opt_sample_rgb_2d;
- else if (img->TexFormat == MESA_FORMAT_RGBA8888)
+ else if (img->TexFormat == MESA_FORMAT_A8B8G8R8_UNORM)
func = &opt_sample_rgba_2d;
}
diff --git a/mesalib/src/mesa/swrast/s_texrender.c b/mesalib/src/mesa/swrast/s_texrender.c
index 751d7767b..d67e48ad3 100644
--- a/mesalib/src/mesa/swrast/s_texrender.c
+++ b/mesalib/src/mesa/swrast/s_texrender.c
@@ -33,7 +33,7 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
struct gl_renderbuffer *rb = att->Renderbuffer;
struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
struct swrast_texture_image *swImage;
- gl_format format;
+ mesa_format format;
GLuint zOffset;
(void) ctx;
diff --git a/mesalib/src/mesa/swrast/s_triangle.c b/mesalib/src/mesa/swrast/s_triangle.c
index 085021b58..00383fb84 100644
--- a/mesalib/src/mesa/swrast/s_triangle.c
+++ b/mesalib/src/mesa/swrast/s_triangle.c
@@ -136,7 +136,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
- ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
+ ASSERT(texImg->TexFormat == MESA_FORMAT_BGR_UNORM8); \
if (!rb || !texture) { \
return; \
}
@@ -194,7 +194,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
- ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
+ ASSERT(texImg->TexFormat == MESA_FORMAT_BGR_UNORM8); \
if (!rb || !texture) { \
return; \
}
@@ -417,7 +417,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
switch (info->filter) {
case GL_NEAREST:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGB;MODULATE,3);
@@ -437,7 +437,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -466,7 +466,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
span->intTex[0] -= FIXED_HALF;
span->intTex[1] -= FIXED_HALF;
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGB;MODULATE,3);
@@ -486,7 +486,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -572,10 +572,10 @@ affine_span(struct gl_context *ctx, SWspan *span,
} \
\
switch (info.format) { \
- case MESA_FORMAT_RGB888: \
+ case MESA_FORMAT_BGR_UNORM8: \
info.tbytesline = texImg->Width * 3; \
break; \
- case MESA_FORMAT_RGBA8888: \
+ case MESA_FORMAT_A8B8G8R8_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -689,7 +689,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
switch (info->filter) {
case GL_NEAREST:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGB;MODULATE,3);
@@ -709,7 +709,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -736,7 +736,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
case GL_LINEAR:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGB;MODULATE,3);
@@ -756,7 +756,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -838,10 +838,10 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
} \
\
switch (info.format) { \
- case MESA_FORMAT_RGB888: \
+ case MESA_FORMAT_BGR_UNORM8: \
info.tbytesline = texImg->Width * 3; \
break; \
- case MESA_FORMAT_RGBA8888: \
+ case MESA_FORMAT_A8B8G8R8_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -887,7 +887,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
ASSERT(ctx->Depth.Test); \
ASSERT(!ctx->Depth.Mask); \
ASSERT(ctx->Depth.Func == GL_LESS); \
- assert(rb->Format == MESA_FORMAT_Z16); \
+ assert(rb->Format == MESA_FORMAT_Z_UNORM16); \
if (!q) { \
return; \
}
@@ -1025,7 +1025,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled &&
depthRb &&
- depthRb->Format == MESA_FORMAT_Z16) {
+ depthRb->Format == MESA_FORMAT_Z_UNORM16) {
if (ctx->Color.ColorMask[0][0] == 0 &&
ctx->Color.ColorMask[0][1] == 0 &&
ctx->Color.ColorMask[0][2] == 0 &&
@@ -1050,7 +1050,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
const struct gl_texture_image *texImg;
const struct swrast_texture_image *swImg;
GLenum minFilter, magFilter, envMode;
- gl_format format;
+ mesa_format format;
texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX];
if (ctx->Texture.Unit[0].Sampler)
samp = ctx->Texture.Unit[0].Sampler;
@@ -1080,7 +1080,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& texImg->Border == 0
&& (_mesa_format_row_stride(format, texImg->Width) ==
swImg->RowStride)
- && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
+ && (format == MESA_FORMAT_BGR_UNORM8 || format == MESA_FORMAT_A8B8G8R8_UNORM)
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
&& !swrast->_FogEnabled
@@ -1088,7 +1088,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& ctx->Texture.Unit[0].EnvMode != GL_COMBINE4_NV) {
if (ctx->Hint.PerspectiveCorrection==GL_FASTEST) {
if (minFilter == GL_NEAREST
- && format == MESA_FORMAT_RGB888
+ && format == MESA_FORMAT_BGR_UNORM8
&& (envMode == GL_REPLACE || envMode == GL_DECAL)
&& ((swrast->_RasterMask == (DEPTH_BIT | TEXTURE_BIT)
&& ctx->Depth.Func == GL_LESS
@@ -1107,7 +1107,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
#if CHAN_BITS != 8
USE(general_triangle);
#else
- if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) {
+ if (format == MESA_FORMAT_A8B8G8R8_UNORM && !_mesa_little_endian()) {
/* We only handle RGBA8888 correctly on little endian
* in the optimized code above.
*/