aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/blend.c6
-rw-r--r--src/mesa/main/blend.h4
-rw-r--r--src/mesa/main/bufferobj.c12
-rw-r--r--src/mesa/main/dd.h4
-rw-r--r--src/mesa/main/fbobject.c10
-rw-r--r--src/mesa/main/format_pack.c30
-rw-r--r--src/mesa/main/format_pack.h26
-rw-r--r--src/mesa/main/format_unpack.c18
-rw-r--r--src/mesa/main/format_unpack.h16
-rw-r--r--src/mesa/main/formats.c60
-rw-r--r--src/mesa/main/formats.h48
-rw-r--r--src/mesa/main/framebuffer.c10
-rw-r--r--src/mesa/main/mipmap.c4
-rw-r--r--src/mesa/main/mipmap.h2
-rw-r--r--src/mesa/main/mtypes.h8
-rw-r--r--src/mesa/main/readpix.c6
-rw-r--r--src/mesa/main/shaderimage.c4
-rw-r--r--src/mesa/main/texcompress.c10
-rw-r--r--src/mesa/main/texcompress.h10
-rw-r--r--src/mesa/main/texcompress_etc.c4
-rw-r--r--src/mesa/main/texcompress_etc.h4
-rw-r--r--src/mesa/main/texcompress_fxt1.c2
-rw-r--r--src/mesa/main/texcompress_fxt1.h2
-rw-r--r--src/mesa/main/texcompress_rgtc.c2
-rw-r--r--src/mesa/main/texcompress_rgtc.h2
-rw-r--r--src/mesa/main/texcompress_s3tc.c2
-rw-r--r--src/mesa/main/texcompress_s3tc.h2
-rw-r--r--src/mesa/main/texformat.c4
-rw-r--r--src/mesa/main/texformat.h2
-rw-r--r--src/mesa/main/texgetimage.c4
-rw-r--r--src/mesa/main/teximage.c26
-rw-r--r--src/mesa/main/teximage.h8
-rw-r--r--src/mesa/main/texobj.c2
-rw-r--r--src/mesa/main/texparam.c4
-rw-r--r--src/mesa/main/texstorage.c4
-rw-r--r--src/mesa/main/texstore.c22
-rw-r--r--src/mesa/main/texstore.h6
-rw-r--r--src/mesa/main/textureview.c4
38 files changed, 197 insertions, 197 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 9e11ca7b8aa..eb4f1d6bef2 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -854,7 +854,7 @@ _mesa_update_clamp_vertex_color(struct gl_context *ctx)
}
/**
- * Returns an appropriate gl_format for color rendering based on the
+ * Returns an appropriate mesa_format for color rendering based on the
* GL_FRAMEBUFFER_SRGB state.
*
* Some drivers implement GL_FRAMEBUFFER_SRGB using a flag on the blend state
@@ -862,8 +862,8 @@ _mesa_update_clamp_vertex_color(struct gl_context *ctx)
* overriding the format of the surface. This is a helper for doing the
* surface format override variant.
*/
-gl_format
-_mesa_get_render_format(const struct gl_context *ctx, gl_format format)
+mesa_format
+_mesa_get_render_format(const struct gl_context *ctx, mesa_format format)
{
if (ctx->Color.sRGBEnabled)
return format;
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index 7445840cb25..fe31a7440f0 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -115,8 +115,8 @@ _mesa_update_clamp_fragment_color(struct gl_context *ctx);
extern void
_mesa_update_clamp_vertex_color(struct gl_context *ctx);
-extern gl_format
-_mesa_get_render_format(const struct gl_context *ctx, gl_format format);
+extern mesa_format
+_mesa_get_render_format(const struct gl_context *ctx, mesa_format format);
extern void
_mesa_init_color( struct gl_context * ctx );
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 93367590aac..e305038bdbe 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -295,18 +295,18 @@ buffer_object_subdata_range_good(struct gl_context * ctx, GLenum target,
* \param format Format of the supplied data.
* \param type Type of the supplied data.
* \param caller Name of calling function for recording errors.
- * \return If internalformat, format and type are legal the gl_format
+ * \return If internalformat, format and type are legal the mesa_format
* corresponding to internalformat, otherwise MESA_FORMAT_NONE.
*
* \sa glClearBufferData and glClearBufferSubData
*/
-static gl_format
+static mesa_format
validate_clear_buffer_format(struct gl_context *ctx,
GLenum internalformat,
GLenum format, GLenum type,
const char *caller)
{
- gl_format mesaFormat;
+ mesa_format mesaFormat;
GLenum errorFormatType;
mesaFormat = _mesa_validate_texbuffer_format(ctx, internalformat);
@@ -360,7 +360,7 @@ validate_clear_buffer_format(struct gl_context *ctx,
*/
static bool
convert_clear_buffer_data(struct gl_context *ctx,
- gl_format internalformat,
+ mesa_format internalformat,
GLubyte *clearValue, GLenum format, GLenum type,
const GLvoid *data, const char *caller)
{
@@ -1365,7 +1365,7 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format,
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object* bufObj;
- gl_format mesaFormat;
+ mesa_format mesaFormat;
GLubyte clearValue[MAX_PIXEL_BYTES];
GLsizeiptr clearValueSize;
@@ -1420,7 +1420,7 @@ _mesa_ClearBufferSubData(GLenum target, GLenum internalformat,
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object* bufObj;
- gl_format mesaFormat;
+ mesa_format mesaFormat;
GLubyte clearValue[MAX_PIXEL_BYTES];
GLsizeiptr clearValueSize;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 6c084afa3be..cb6fac476a0 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -182,7 +182,7 @@ struct dd_function_table {
* GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
* Called by glTexImage(), etc.
*/
- gl_format (*ChooseTextureFormat)( struct gl_context *ctx,
+ mesa_format (*ChooseTextureFormat)( struct gl_context *ctx,
GLenum target, GLint internalFormat,
GLenum srcFormat, GLenum srcType );
@@ -268,7 +268,7 @@ struct dd_function_table {
* \return GL_TRUE if the image is OK, GL_FALSE if too large
*/
GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
- GLint level, gl_format format,
+ GLint level, mesa_format format,
GLint width, GLint height,
GLint depth, GLint border);
/*@}*/
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 4f510ee21ea..aad111bd9e3 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -636,7 +636,7 @@ _mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
* Is the given base format a legal format for a color renderbuffer?
*/
static GLboolean
-is_format_color_renderable(const struct gl_context *ctx, gl_format format, GLenum internalFormat)
+is_format_color_renderable(const struct gl_context *ctx, mesa_format format, GLenum internalFormat)
{
const GLenum baseFormat =
_mesa_get_format_base_format(format);
@@ -901,7 +901,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
- gl_format attFormat;
+ mesa_format attFormat;
GLenum att_tex_target = GL_NONE;
/*
@@ -1858,7 +1858,7 @@ _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
* we need to return zero.
*/
static GLint
-get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
+get_component_bits(GLenum pname, GLenum baseFormat, mesa_format format)
{
if (_mesa_base_format_has_channel(baseFormat, pname))
return _mesa_get_format_bits(format, pname);
@@ -2882,7 +2882,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- gl_format format = att->Renderbuffer->Format;
+ mesa_format format = att->Renderbuffer->Format;
/* Page 235 (page 247 of the PDF) in section 6.1.13 of the OpenGL ES
* 3.0.1 spec says:
@@ -3092,7 +3092,7 @@ find_attachment(const struct gl_framebuffer *fb,
* does not contain signed integer values."
*/
static GLboolean
-compatible_color_datatypes(gl_format srcFormat, gl_format dstFormat)
+compatible_color_datatypes(mesa_format srcFormat, mesa_format dstFormat)
{
GLenum srcType = _mesa_get_format_datatype(srcFormat);
GLenum dstType = _mesa_get_format_datatype(dstFormat);
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 41f5f99c180..bb784828830 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -1879,7 +1879,7 @@ pack_float_SIGNED_RG1616(const GLfloat src[4], void *dst)
* Return a function that can pack a GLubyte rgba[4] color.
*/
gl_pack_ubyte_rgba_func
-_mesa_get_pack_ubyte_rgba_function(gl_format format)
+_mesa_get_pack_ubyte_rgba_function(mesa_format format)
{
static gl_pack_ubyte_rgba_func table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -2042,7 +2042,7 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format)
* Return a function that can pack a GLfloat rgba[4] color.
*/
gl_pack_float_rgba_func
-_mesa_get_pack_float_rgba_function(gl_format format)
+_mesa_get_pack_float_rgba_function(mesa_format format)
{
static gl_pack_float_rgba_func table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -2202,7 +2202,7 @@ _mesa_get_pack_float_rgba_function(gl_format format)
static pack_float_rgba_row_func
-get_pack_float_rgba_row_function(gl_format format)
+get_pack_float_rgba_row_function(mesa_format format)
{
static pack_float_rgba_row_func table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -2235,7 +2235,7 @@ get_pack_float_rgba_row_function(gl_format format)
static pack_ubyte_rgba_row_func
-get_pack_ubyte_rgba_row_function(gl_format format)
+get_pack_ubyte_rgba_row_function(mesa_format format)
{
static pack_ubyte_rgba_row_func table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -2271,7 +2271,7 @@ get_pack_ubyte_rgba_row_function(gl_format format)
* Pack a row of GLfloat rgba[4] values to the destination.
*/
void
-_mesa_pack_float_rgba_row(gl_format format, GLuint n,
+_mesa_pack_float_rgba_row(mesa_format format, GLuint n,
const GLfloat src[][4], void *dst)
{
pack_float_rgba_row_func packrow = get_pack_float_rgba_row_function(format);
@@ -2302,7 +2302,7 @@ _mesa_pack_float_rgba_row(gl_format format, GLuint n,
* Pack a row of GLubyte rgba[4] values to the destination.
*/
void
-_mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
+_mesa_pack_ubyte_rgba_row(mesa_format format, GLuint n,
const GLubyte src[][4], void *dst)
{
pack_ubyte_rgba_row_func packrow = get_pack_ubyte_rgba_row_function(format);
@@ -2335,7 +2335,7 @@ _mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
* \param dstRowStride destination image row stride in bytes
*/
void
-_mesa_pack_ubyte_rgba_rect(gl_format format, GLuint width, GLuint height,
+_mesa_pack_ubyte_rgba_rect(mesa_format format, GLuint width, GLuint height,
const GLubyte *src, GLint srcRowStride,
void *dst, GLint dstRowStride)
{
@@ -2423,7 +2423,7 @@ pack_float_z_Z32_FLOAT(const GLfloat *src, void *dst)
}
gl_pack_float_z_func
-_mesa_get_pack_float_z_func(gl_format format)
+_mesa_get_pack_float_z_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_Z24_S8:
@@ -2508,7 +2508,7 @@ pack_uint_z_Z32_FLOAT_X24S8(const GLuint *src, void *dst)
}
gl_pack_uint_z_func
-_mesa_get_pack_uint_z_func(gl_format format)
+_mesa_get_pack_uint_z_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_Z24_S8:
@@ -2572,7 +2572,7 @@ pack_ubyte_stencil_Z32_FLOAT_X24S8(const GLubyte *src, void *dst)
gl_pack_ubyte_stencil_func
-_mesa_get_pack_ubyte_stencil_func(gl_format format)
+_mesa_get_pack_ubyte_stencil_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_Z24_S8:
@@ -2593,7 +2593,7 @@ _mesa_get_pack_ubyte_stencil_func(gl_format format)
void
-_mesa_pack_float_z_row(gl_format format, GLuint n,
+_mesa_pack_float_z_row(mesa_format format, GLuint n,
const GLfloat *src, void *dst)
{
switch (format) {
@@ -2669,7 +2669,7 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
* The incoming Z values are always in the range [0, 0xffffffff].
*/
void
-_mesa_pack_uint_z_row(gl_format format, GLuint n,
+_mesa_pack_uint_z_row(mesa_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
@@ -2742,7 +2742,7 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
void
-_mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
+_mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
const GLubyte *src, void *dst)
{
switch (format) {
@@ -2792,7 +2792,7 @@ _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
* Incoming Z/stencil values are always in uint_24_8 format.
*/
void
-_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
+_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
@@ -2836,7 +2836,7 @@ _mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
* the packed value at dst will be 0 or ~0 depending on the colorMask.
*/
void
-_mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst)
+_mesa_pack_colormask(mesa_format format, const GLubyte colorMask[4], void *dst)
{
GLfloat maskColor[4];
diff --git a/src/mesa/main/format_pack.h b/src/mesa/main/format_pack.h
index ebd103d0337..2577def413e 100644
--- a/src/mesa/main/format_pack.h
+++ b/src/mesa/main/format_pack.h
@@ -49,58 +49,58 @@ typedef void (*gl_pack_ubyte_stencil_func)(const GLubyte *src, void *dst);
extern gl_pack_ubyte_rgba_func
-_mesa_get_pack_ubyte_rgba_function(gl_format format);
+_mesa_get_pack_ubyte_rgba_function(mesa_format format);
extern gl_pack_float_rgba_func
-_mesa_get_pack_float_rgba_function(gl_format format);
+_mesa_get_pack_float_rgba_function(mesa_format format);
extern gl_pack_float_z_func
-_mesa_get_pack_float_z_func(gl_format format);
+_mesa_get_pack_float_z_func(mesa_format format);
extern gl_pack_uint_z_func
-_mesa_get_pack_uint_z_func(gl_format format);
+_mesa_get_pack_uint_z_func(mesa_format format);
extern gl_pack_ubyte_stencil_func
-_mesa_get_pack_ubyte_stencil_func(gl_format format);
+_mesa_get_pack_ubyte_stencil_func(mesa_format format);
extern void
-_mesa_pack_float_rgba_row(gl_format format, GLuint n,
+_mesa_pack_float_rgba_row(mesa_format format, GLuint n,
const GLfloat src[][4], void *dst);
extern void
-_mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
+_mesa_pack_ubyte_rgba_row(mesa_format format, GLuint n,
const GLubyte src[][4], void *dst);
extern void
-_mesa_pack_ubyte_rgba_rect(gl_format format, GLuint width, GLuint height,
+_mesa_pack_ubyte_rgba_rect(mesa_format format, GLuint width, GLuint height,
const GLubyte *src, GLint srcRowStride,
void *dst, GLint dstRowStride);
extern void
-_mesa_pack_float_z_row(gl_format format, GLuint n,
+_mesa_pack_float_z_row(mesa_format format, GLuint n,
const GLfloat *src, void *dst);
extern void
-_mesa_pack_uint_z_row(gl_format format, GLuint n,
+_mesa_pack_uint_z_row(mesa_format format, GLuint n,
const GLuint *src, void *dst);
extern void
-_mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
+_mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
const GLubyte *src, void *dst);
extern void
-_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
+_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const GLuint *src, void *dst);
extern void
-_mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst);
+_mesa_pack_colormask(mesa_format format, const GLubyte colorMask[4], void *dst);
#endif
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 28a50f31ee4..96c71107def 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -2311,7 +2311,7 @@ unpack_SIGNED_RG1616(const void *src, GLfloat dst[][4], GLuint n)
* Return the unpacker function for the given format.
*/
static unpack_rgba_func
-get_unpack_rgba_function(gl_format format)
+get_unpack_rgba_function(mesa_format format)
{
static unpack_rgba_func table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -2540,7 +2540,7 @@ get_unpack_rgba_function(gl_format format)
* Unpack rgba colors, returning as GLfloat values.
*/
void
-_mesa_unpack_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_rgba_row(mesa_format format, GLuint n,
const void *src, GLfloat dst[][4])
{
unpack_rgba_func unpack = get_unpack_rgba_function(format);
@@ -2913,7 +2913,7 @@ unpack_ubyte_RG88(const void *src, GLubyte dst[][4], GLuint n)
* only be used for unpacking formats that use 8 bits or less per channel.
*/
void
-_mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
const void *src, GLubyte dst[][4])
{
switch (format) {
@@ -3640,7 +3640,7 @@ unpack_int_rgba_ABGR2101010(const GLuint *src, GLuint dst[][4], GLuint n)
}
void
-_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
const void *src, GLuint dst[][4])
{
switch (format) {
@@ -3863,7 +3863,7 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
* \param height height of rect region to convert
*/
void
-_mesa_unpack_rgba_block(gl_format format,
+_mesa_unpack_rgba_block(mesa_format format,
const void *src, GLint srcRowStride,
GLfloat dst[][4], GLint dstRowStride,
GLuint x, GLuint y, GLuint width, GLuint height)
@@ -3964,7 +3964,7 @@ unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)
* The returned values will always be in the range [0.0, 1.0].
*/
void
-_mesa_unpack_float_z_row(gl_format format, GLuint n,
+_mesa_unpack_float_z_row(mesa_format format, GLuint n,
const void *src, GLfloat *dst)
{
unpack_float_z_func unpack;
@@ -4068,7 +4068,7 @@ unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n)
* The returned values will always be in the range [0, 0xffffffff].
*/
void
-_mesa_unpack_uint_z_row(gl_format format, GLuint n,
+_mesa_unpack_uint_z_row(mesa_format format, GLuint n,
const void *src, GLuint *dst)
{
unpack_uint_z_func unpack;
@@ -4142,7 +4142,7 @@ unpack_ubyte_s_Z32_FLOAT_X24S8(const void *src, GLubyte *dst, GLuint n)
}
void
-_mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
+_mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
const void *src, GLubyte *dst)
{
switch (format) {
@@ -4183,7 +4183,7 @@ unpack_uint_24_8_depth_stencil_Z24_S8(const GLuint *src, GLuint *dst, GLuint n)
}
void
-_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
+_mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const void *src, GLuint *dst)
{
switch (format) {
diff --git a/src/mesa/main/format_unpack.h b/src/mesa/main/format_unpack.h
index 1da03caa862..1fcfc04b331 100644
--- a/src/mesa/main/format_unpack.h
+++ b/src/mesa/main/format_unpack.h
@@ -29,38 +29,38 @@ extern GLfloat
_mesa_nonlinear_to_linear(GLubyte cs8);
extern void
-_mesa_unpack_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_rgba_row(mesa_format format, GLuint n,
const void *src, GLfloat dst[][4]);
extern void
-_mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
const void *src, GLubyte dst[][4]);
void
-_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
+_mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
const void *src, GLuint dst[][4]);
extern void
-_mesa_unpack_rgba_block(gl_format format,
+_mesa_unpack_rgba_block(mesa_format format,
const void *src, GLint srcRowStride,
GLfloat dst[][4], GLint dstRowStride,
GLuint x, GLuint y, GLuint width, GLuint height);
extern void
-_mesa_unpack_float_z_row(gl_format format, GLuint n,
+_mesa_unpack_float_z_row(mesa_format format, GLuint n,
const void *src, GLfloat *dst);
void
-_mesa_unpack_uint_z_row(gl_format format, GLuint n,
+_mesa_unpack_uint_z_row(mesa_format format, GLuint n,
const void *src, GLuint *dst);
void
-_mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
+_mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
const void *src, GLubyte *dst);
void
-_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
+_mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const void *src, GLuint *dst);
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 7bde1f1a85f..81f92261916 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -35,7 +35,7 @@
*/
struct gl_format_info
{
- gl_format Name;
+ mesa_format Name;
/** text name for debugging */
const char *StrName;
@@ -1795,7 +1795,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
static const struct gl_format_info *
-_mesa_get_format_info(gl_format format)
+_mesa_get_format_info(mesa_format format)
{
const struct gl_format_info *info = &format_info[format];
assert(info->Name == format);
@@ -1805,7 +1805,7 @@ _mesa_get_format_info(gl_format format)
/** Return string name of format (for debugging) */
const char *
-_mesa_get_format_name(gl_format format)
+_mesa_get_format_name(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return info->StrName;
@@ -1821,7 +1821,7 @@ _mesa_get_format_name(gl_format format)
* Note: not GLuint, so as not to coerce math to unsigned. cf. fdo #37351
*/
GLint
-_mesa_get_format_bytes(gl_format format)
+_mesa_get_format_bytes(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
ASSERT(info->BytesPerBlock);
@@ -1837,7 +1837,7 @@ _mesa_get_format_bytes(gl_format format)
* \param pname the component, such as GL_RED_BITS, GL_TEXTURE_BLUE_BITS, etc.
*/
GLint
-_mesa_get_format_bits(gl_format format, GLenum pname)
+_mesa_get_format_bits(mesa_format format, GLenum pname)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
@@ -1886,7 +1886,7 @@ _mesa_get_format_bits(gl_format format, GLenum pname)
GLuint
-_mesa_get_format_max_bits(gl_format format)
+_mesa_get_format_max_bits(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
GLuint max = MAX2(info->RedBits, info->GreenBits);
@@ -1911,7 +1911,7 @@ _mesa_get_format_max_bits(gl_format format)
* GL_FLOAT = an ordinary float
*/
GLenum
-_mesa_get_format_datatype(gl_format format)
+_mesa_get_format_datatype(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return info->DataType;
@@ -1924,7 +1924,7 @@ _mesa_get_format_datatype(gl_format format)
* GL_YCBCR_MESA, GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
*/
GLenum
-_mesa_get_format_base_format(gl_format format)
+_mesa_get_format_base_format(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return info->BaseFormat;
@@ -1939,7 +1939,7 @@ _mesa_get_format_base_format(gl_format format)
* \param bh returns block height in pixels
*/
void
-_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh)
+_mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
*bw = info->BlockWidth;
@@ -1949,7 +1949,7 @@ _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh)
/** Is the given format a compressed format? */
GLboolean
-_mesa_is_format_compressed(gl_format format)
+_mesa_is_format_compressed(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return info->BlockWidth > 1 || info->BlockHeight > 1;
@@ -1960,7 +1960,7 @@ _mesa_is_format_compressed(gl_format format)
* Determine if the given format represents a packed depth/stencil buffer.
*/
GLboolean
-_mesa_is_format_packed_depth_stencil(gl_format format)
+_mesa_is_format_packed_depth_stencil(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
@@ -1972,7 +1972,7 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
* Is the given format a signed/unsigned integer color format?
*/
GLboolean
-_mesa_is_format_integer_color(gl_format format)
+_mesa_is_format_integer_color(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
@@ -1986,7 +1986,7 @@ _mesa_is_format_integer_color(gl_format format)
* Is the given format an unsigned integer format?
*/
GLboolean
-_mesa_is_format_unsigned(gl_format format)
+_mesa_is_format_unsigned(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return _mesa_is_type_unsigned(info->DataType);
@@ -1997,7 +1997,7 @@ _mesa_is_format_unsigned(gl_format format)
* Does the given format store signed values?
*/
GLboolean
-_mesa_is_format_signed(gl_format format)
+_mesa_is_format_signed(mesa_format format)
{
if (format == MESA_FORMAT_R11_G11_B10_FLOAT ||
format == MESA_FORMAT_RGB9_E5_FLOAT) {
@@ -2018,7 +2018,7 @@ _mesa_is_format_signed(gl_format format)
* \return GL_LINEAR or GL_SRGB
*/
GLenum
-_mesa_get_format_color_encoding(gl_format format)
+_mesa_get_format_color_encoding(mesa_format format)
{
/* XXX this info should be encoded in gl_format_info */
switch (format) {
@@ -2046,8 +2046,8 @@ _mesa_get_format_color_encoding(gl_format format)
* For an sRGB format, return the corresponding linear color space format.
* For non-sRGB formats, return the format as-is.
*/
-gl_format
-_mesa_get_srgb_format_linear(gl_format format)
+mesa_format
+_mesa_get_srgb_format_linear(mesa_format format)
{
switch (format) {
case MESA_FORMAT_SRGB8:
@@ -2100,8 +2100,8 @@ _mesa_get_srgb_format_linear(gl_format format)
* If the given format is a compressed format, return a corresponding
* uncompressed format.
*/
-gl_format
-_mesa_get_uncompressed_format(gl_format format)
+mesa_format
+_mesa_get_uncompressed_format(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RGB_FXT1:
@@ -2161,7 +2161,7 @@ _mesa_get_uncompressed_format(gl_format format)
GLuint
-_mesa_format_num_components(gl_format format)
+_mesa_format_num_components(mesa_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
return ((info->RedBits > 0) +
@@ -2180,7 +2180,7 @@ _mesa_format_num_components(gl_format format)
* in the given format.
*/
GLuint
-_mesa_format_image_size(gl_format format, GLsizei width,
+_mesa_format_image_size(mesa_format format, GLsizei width,
GLsizei height, GLsizei depth)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
@@ -2206,7 +2206,7 @@ _mesa_format_image_size(gl_format format, GLsizei width,
* accomodate very large textures.
*/
uint64_t
-_mesa_format_image_size64(gl_format format, GLsizei width,
+_mesa_format_image_size64(mesa_format format, GLsizei width,
GLsizei height, GLsizei depth)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
@@ -2232,7 +2232,7 @@ _mesa_format_image_size64(gl_format format, GLsizei width,
GLint
-_mesa_format_row_stride(gl_format format, GLsizei width)
+_mesa_format_row_stride(mesa_format format, GLsizei width)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
/* Strictly speaking, a conditional isn't needed here */
@@ -2259,7 +2259,7 @@ _mesa_format_row_stride(gl_format format, GLsizei width)
static void
check_format_to_type_and_comps(void)
{
- gl_format f;
+ mesa_format f;
for (f = MESA_FORMAT_NONE + 1; f < MESA_FORMAT_COUNT; f++) {
GLenum datatype = 0;
@@ -2364,11 +2364,11 @@ _mesa_test_formats(void)
/**
- * Return datatype and number of components per texel for the given gl_format.
+ * Return datatype and number of components per texel for the given mesa_format.
* Only used for mipmap generation code.
*/
void
-_mesa_format_to_type_and_comps(gl_format format,
+_mesa_format_to_type_and_comps(mesa_format format,
GLenum *datatype, GLuint *comps)
{
switch (format) {
@@ -2912,16 +2912,16 @@ _mesa_format_to_type_and_comps(gl_format format,
}
/**
- * Check if a gl_format exactly matches a GL format/type combination
+ * Check if a mesa_format exactly matches a GL format/type combination
* such that we can use memcpy() from one to the other.
- * \param gl_format a MESA_FORMAT_x value
+ * \param mesa_format a MESA_FORMAT_x value
* \param format the user-specified image format
* \param type the user-specified image datatype
* \param swapBytes typically the current pixel pack/unpack byteswap state
* \return GL_TRUE if the formats match, GL_FALSE otherwise.
*/
GLboolean
-_mesa_format_matches_format_and_type(gl_format gl_format,
+_mesa_format_matches_format_and_type(mesa_format mesa_format,
GLenum format, GLenum type,
GLboolean swapBytes)
{
@@ -2936,7 +2936,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
* enums in formats.h.
*/
- switch (gl_format) {
+ switch (mesa_format) {
case MESA_FORMAT_NONE:
case MESA_FORMAT_COUNT:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index a1f0d226a59..68f15be1471 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -310,77 +310,77 @@ typedef enum
MESA_FORMAT_SIGNED_RG1616,
MESA_FORMAT_COUNT
-} gl_format;
+} mesa_format;
extern const char *
-_mesa_get_format_name(gl_format format);
+_mesa_get_format_name(mesa_format format);
extern GLint
-_mesa_get_format_bytes(gl_format format);
+_mesa_get_format_bytes(mesa_format format);
extern GLint
-_mesa_get_format_bits(gl_format format, GLenum pname);
+_mesa_get_format_bits(mesa_format format, GLenum pname);
extern GLuint
-_mesa_get_format_max_bits(gl_format format);
+_mesa_get_format_max_bits(mesa_format format);
extern GLenum
-_mesa_get_format_datatype(gl_format format);
+_mesa_get_format_datatype(mesa_format format);
extern GLenum
-_mesa_get_format_base_format(gl_format format);
+_mesa_get_format_base_format(mesa_format format);
extern void
-_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh);
+_mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh);
extern GLboolean
-_mesa_is_format_compressed(gl_format format);
+_mesa_is_format_compressed(mesa_format format);
extern GLboolean
-_mesa_is_format_packed_depth_stencil(gl_format format);
+_mesa_is_format_packed_depth_stencil(mesa_format format);
extern GLboolean
-_mesa_is_format_integer_color(gl_format format);
+_mesa_is_format_integer_color(mesa_format format);
extern GLboolean
-_mesa_is_format_unsigned(gl_format format);
+_mesa_is_format_unsigned(mesa_format format);
extern GLboolean
-_mesa_is_format_signed(gl_format format);
+_mesa_is_format_signed(mesa_format format);
extern GLenum
-_mesa_get_format_color_encoding(gl_format format);
+_mesa_get_format_color_encoding(mesa_format format);
extern GLuint
-_mesa_format_image_size(gl_format format, GLsizei width,
+_mesa_format_image_size(mesa_format format, GLsizei width,
GLsizei height, GLsizei depth);
extern uint64_t
-_mesa_format_image_size64(gl_format format, GLsizei width,
+_mesa_format_image_size64(mesa_format format, GLsizei width,
GLsizei height, GLsizei depth);
extern GLint
-_mesa_format_row_stride(gl_format format, GLsizei width);
+_mesa_format_row_stride(mesa_format format, GLsizei width);
extern void
-_mesa_format_to_type_and_comps(gl_format format,
+_mesa_format_to_type_and_comps(mesa_format format,
GLenum *datatype, GLuint *comps);
extern void
_mesa_test_formats(void);
-extern gl_format
-_mesa_get_srgb_format_linear(gl_format format);
+extern mesa_format
+_mesa_get_srgb_format_linear(mesa_format format);
-extern gl_format
-_mesa_get_uncompressed_format(gl_format format);
+extern mesa_format
+_mesa_get_uncompressed_format(mesa_format format);
extern GLuint
-_mesa_format_num_components(gl_format format);
+_mesa_format_num_components(mesa_format format);
GLboolean
-_mesa_format_matches_format_and_type(gl_format gl_format,
+_mesa_format_matches_format_and_type(mesa_format mesa_format,
GLenum format, GLenum type,
GLboolean swapBytes);
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index bd8f4933ff1..47369973735 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -469,7 +469,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
if (fb->Attachment[i].Renderbuffer) {
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
- const gl_format fmt = rb->Format;
+ const mesa_format fmt = rb->Format;
/* Grab samples and sampleBuffers from any attachment point (assuming
* the framebuffer is complete, we'll get the same answer from all
@@ -496,7 +496,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
for (i = 0; i < BUFFER_COUNT; i++) {
if (fb->Attachment[i].Renderbuffer) {
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
- const gl_format fmt = rb->Format;
+ const mesa_format fmt = rb->Format;
if (_mesa_get_format_datatype(fmt) == GL_FLOAT) {
fb->Visual.floatMode = GL_TRUE;
@@ -508,7 +508,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
const struct gl_renderbuffer *rb =
fb->Attachment[BUFFER_DEPTH].Renderbuffer;
- const gl_format fmt = rb->Format;
+ const mesa_format fmt = rb->Format;
fb->Visual.haveDepthBuffer = GL_TRUE;
fb->Visual.depthBits = _mesa_get_format_bits(fmt, GL_DEPTH_BITS);
}
@@ -516,7 +516,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) {
const struct gl_renderbuffer *rb =
fb->Attachment[BUFFER_STENCIL].Renderbuffer;
- const gl_format fmt = rb->Format;
+ const mesa_format fmt = rb->Format;
fb->Visual.haveStencilBuffer = GL_TRUE;
fb->Visual.stencilBits = _mesa_get_format_bits(fmt, GL_STENCIL_BITS);
}
@@ -524,7 +524,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) {
const struct gl_renderbuffer *rb =
fb->Attachment[BUFFER_ACCUM].Renderbuffer;
- const gl_format fmt = rb->Format;
+ const mesa_format fmt = rb->Format;
fb->Visual.haveAccumBuffer = GL_TRUE;
fb->Visual.accumRedBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
fb->Visual.accumGreenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 03301578008..521b2d8eb0e 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1816,7 +1816,7 @@ GLboolean
_mesa_prepare_mipmap_level(struct gl_context *ctx,
struct gl_texture_object *texObj, GLuint level,
GLsizei width, GLsizei height, GLsizei depth,
- GLsizei border, GLenum intFormat, gl_format format)
+ GLsizei border, GLenum intFormat, mesa_format format)
{
const GLuint numFaces = _mesa_num_tex_faces(texObj->Target);
GLuint face;
@@ -2018,7 +2018,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
GLuint maxLevel)
{
GLuint level;
- gl_format temp_format;
+ mesa_format temp_format;
GLint components;
GLuint temp_src_row_stride, temp_src_img_stride; /* in bytes */
GLubyte *temp_src = NULL, *temp_dst = NULL;
diff --git a/src/mesa/main/mipmap.h b/src/mesa/main/mipmap.h
index ee91df006dc..c0366d329a2 100644
--- a/src/mesa/main/mipmap.h
+++ b/src/mesa/main/mipmap.h
@@ -45,7 +45,7 @@ extern GLboolean
_mesa_prepare_mipmap_level(struct gl_context *ctx,
struct gl_texture_object *texObj, GLuint level,
GLsizei width, GLsizei height, GLsizei depth,
- GLsizei border, GLenum intFormat, gl_format format);
+ GLsizei border, GLenum intFormat, mesa_format format);
extern void
_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ac0dd780858..3d42a2181c4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1115,7 +1115,7 @@ struct gl_texture_image
* GL_DEPTH_STENCIL_EXT only. Used for
* choosing TexEnv arithmetic.
*/
- gl_format TexFormat; /**< The actual texture memory format */
+ mesa_format TexFormat; /**< The actual texture memory format */
GLuint Border; /**< 0 or 1 */
GLuint Width; /**< = 2^WidthLog2 + 2*Border */
@@ -1229,7 +1229,7 @@ struct gl_texture_object
struct gl_buffer_object *BufferObject;
GLenum BufferObjectFormat;
/** Equivalent Mesa format for BufferObjectFormat. */
- gl_format _BufferObjectFormat;
+ mesa_format _BufferObjectFormat;
/** GL_ARB_texture_buffer_range */
GLintptr BufferOffset;
GLsizeiptr BufferSize; /**< if this is -1, use BufferObject->Size instead */
@@ -2928,7 +2928,7 @@ struct gl_renderbuffer
GLenum InternalFormat; /**< The user-specified format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
GL_STENCIL_INDEX. */
- gl_format Format; /**< The actual renderbuffer memory format */
+ mesa_format Format; /**< The actual renderbuffer memory format */
/**
* Pointer to the texture image if this renderbuffer wraps a texture,
* otherwise NULL.
@@ -3860,7 +3860,7 @@ struct gl_image_unit
/**
* Mesa format corresponding to \c Format.
*/
- gl_format _ActualFormat;
+ mesa_format _ActualFormat;
/**
* GL_TRUE if the state of this image unit is valid and access from
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 51a0b155376..63cf0202bbd 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -45,7 +45,7 @@
* Return true if the conversion L=R+G+B is needed.
*/
static GLboolean
-need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
+need_rgb_to_luminance_conversion(mesa_format texFormat, GLenum format)
{
GLenum baseTexFormat = _mesa_get_format_base_format(texFormat);
@@ -60,7 +60,7 @@ need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
* Return transfer op flags for this ReadPixels operation.
*/
static GLbitfield
-get_readpixels_transfer_ops(const struct gl_context *ctx, gl_format texFormat,
+get_readpixels_transfer_ops(const struct gl_context *ctx, mesa_format texFormat,
GLenum format, GLenum type, GLboolean uses_blit)
{
GLbitfield transferOps = ctx->_ImageTransferState;
@@ -493,7 +493,7 @@ slow_read_rgba_pixels( struct gl_context *ctx,
GLbitfield transferOps )
{
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
- const gl_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
+ const mesa_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
void *rgba;
GLubyte *dst, *map;
int dstStride, stride, j;
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 80c4693663b..cfb5ad47754 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -57,7 +57,7 @@
# define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88_REV
#endif
-static gl_format
+static mesa_format
get_image_format(GLenum format)
{
switch (format) {
@@ -205,7 +205,7 @@ enum image_format_class
};
static enum image_format_class
-get_image_format_class(gl_format format)
+get_image_format_class(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RGBA_FLOAT32:
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 47ad3060523..4763363264b 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -361,7 +361,7 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
/**
* Convert a compressed MESA_FORMAT_x to a GLenum.
*/
-gl_format
+mesa_format
_mesa_glenum_to_compressed_format(GLenum format)
{
switch (format) {
@@ -451,7 +451,7 @@ _mesa_glenum_to_compressed_format(GLenum format)
* internal format unchanged.
*/
GLenum
-_mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
+_mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat)
{
switch (mesaFormat) {
case MESA_FORMAT_RGB_FXT1:
@@ -535,7 +535,7 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
*/
GLubyte *
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
- gl_format mesaFormat,
+ mesa_format mesaFormat,
GLsizei width, const GLubyte *image)
{
/* XXX only 2D images implemented, not 3D */
@@ -560,7 +560,7 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img,
* invalid format.
*/
compressed_fetch_func
-_mesa_get_compressed_fetch_func(gl_format format)
+_mesa_get_compressed_fetch_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RGB_DXT1:
@@ -598,7 +598,7 @@ _mesa_get_compressed_fetch_func(gl_format format)
* compressed source image.
*/
void
-_mesa_decompress_image(gl_format format, GLuint width, GLuint height,
+_mesa_decompress_image(mesa_format format, GLuint width, GLuint height,
const GLubyte *src, GLint srcRowStride,
GLfloat *dest)
{
diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h
index c6a6e873ece..b00924d02eb 100644
--- a/src/mesa/main/texcompress.h
+++ b/src/mesa/main/texcompress.h
@@ -36,15 +36,15 @@ _mesa_gl_compressed_format_base_format(GLenum format);
extern GLuint
_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats);
-extern gl_format
+extern mesa_format
_mesa_glenum_to_compressed_format(GLenum format);
extern GLenum
-_mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat);
+_mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat);
extern GLubyte *
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
- gl_format mesaFormat,
+ mesa_format mesaFormat,
GLsizei width, const GLubyte *image);
@@ -55,11 +55,11 @@ typedef void (*compressed_fetch_func)(const GLubyte *map,
GLfloat *texel);
extern compressed_fetch_func
-_mesa_get_compressed_fetch_func(gl_format format);
+_mesa_get_compressed_fetch_func(mesa_format format);
extern void
-_mesa_decompress_image(gl_format format, GLuint width, GLuint height,
+_mesa_decompress_image(mesa_format format, GLuint width, GLuint height,
const GLubyte *src, GLint srcRowStride,
GLfloat *dest);
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index a06d29f19aa..75bb9f7ffa8 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -1175,7 +1175,7 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
unsigned src_stride,
unsigned src_width,
unsigned src_height,
- gl_format format)
+ mesa_format format)
{
if (format == MESA_FORMAT_ETC2_RGB8)
etc2_unpack_rgb8(dst_row, dst_stride,
@@ -1452,7 +1452,7 @@ fetch_etc2_srgb8_punchthrough_alpha1(const GLubyte *map,
compressed_fetch_func
-_mesa_get_etc_fetch_func(gl_format format)
+_mesa_get_etc_fetch_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_ETC1_RGB8:
diff --git a/src/mesa/main/texcompress_etc.h b/src/mesa/main/texcompress_etc.h
index 9da0fb337d0..319b7bea715 100644
--- a/src/mesa/main/texcompress_etc.h
+++ b/src/mesa/main/texcompress_etc.h
@@ -77,9 +77,9 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
unsigned src_stride,
unsigned src_width,
unsigned src_height,
- gl_format format);
+ mesa_format format);
compressed_fetch_func
-_mesa_get_etc_fetch_func(gl_format format);
+_mesa_get_etc_fetch_func(mesa_format format);
#endif
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 8d37d813fce..61b01c6b445 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -1641,7 +1641,7 @@ fetch_rgba_fxt1(const GLubyte *map,
compressed_fetch_func
-_mesa_get_fxt_fetch_func(gl_format format)
+_mesa_get_fxt_fetch_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RGB_FXT1:
diff --git a/src/mesa/main/texcompress_fxt1.h b/src/mesa/main/texcompress_fxt1.h
index 4f46d7765ce..21032eea53a 100644
--- a/src/mesa/main/texcompress_fxt1.h
+++ b/src/mesa/main/texcompress_fxt1.h
@@ -37,6 +37,6 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
compressed_fetch_func
-_mesa_get_fxt_fetch_func(gl_format format);
+_mesa_get_fxt_fetch_func(mesa_format format);
#endif /* TEXCOMPRESS_FXT1_H */
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index 7afd8ffa7a6..7f052fbaf91 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -439,7 +439,7 @@ fetch_signed_la_latc2(const GLubyte *map,
compressed_fetch_func
-_mesa_get_compressed_rgtc_func(gl_format format)
+_mesa_get_compressed_rgtc_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RED_RGTC1:
diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h
index 98638f02221..e9e24950adf 100644
--- a/src/mesa/main/texcompress_rgtc.h
+++ b/src/mesa/main/texcompress_rgtc.h
@@ -41,7 +41,7 @@ extern GLboolean
_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS);
extern compressed_fetch_func
-_mesa_get_compressed_rgtc_func(gl_format format);
+_mesa_get_compressed_rgtc_func(mesa_format format);
#endif
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index a815193b711..894c46de10d 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -483,7 +483,7 @@ fetch_srgba_dxt5(const GLubyte *map,
compressed_fetch_func
-_mesa_get_dxt_fetch_func(gl_format format)
+_mesa_get_dxt_fetch_func(mesa_format format)
{
switch (format) {
case MESA_FORMAT_RGB_DXT1:
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index d8d8fbfc165..2734210a57a 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -49,7 +49,7 @@ extern void
_mesa_init_texture_s3tc(struct gl_context *ctx);
extern compressed_fetch_func
-_mesa_get_dxt_fetch_func(gl_format format);
+_mesa_get_dxt_fetch_func(mesa_format format);
#endif /* TEXCOMPRESS_S3TC_H */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index d3aa4773614..0a993ede89b 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -54,12 +54,12 @@
* \param format incoming image pixel format.
* \param type incoming image data type.
*
- * \return the closest gl_format for the given format/type arguments
+ * \return the closest mesa_format for the given format/type arguments
*
* This is called via dd_function_table::ChooseTextureFormat. Hardware
* drivers may override this function with a specialized version.
*/
-gl_format
+mesa_format
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
GLint internalFormat, GLenum format, GLenum type)
{
diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h
index 88ad4d1a7e6..32e209997ac 100644
--- a/src/mesa/main/texformat.h
+++ b/src/mesa/main/texformat.h
@@ -31,7 +31,7 @@
struct gl_context;
-extern gl_format
+extern mesa_format
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
GLint internalFormat, GLenum format, GLenum type);
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 200d29c2ffd..133fa537672 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -225,7 +225,7 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
GLbitfield transferOps)
{
/* don't want to apply sRGB -> RGB conversion here so override the format */
- const gl_format texFormat =
+ const mesa_format texFormat =
_mesa_get_srgb_format_linear(texImage->TexFormat);
const GLenum baseFormat = _mesa_get_format_base_format(texFormat);
const GLenum destBaseFormat = _mesa_base_tex_format(ctx, format);
@@ -360,7 +360,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
GLbitfield transferOps)
{
/* don't want to apply sRGB -> RGB conversion here so override the format */
- const gl_format texFormat =
+ const mesa_format texFormat =
_mesa_get_srgb_format_linear(texImage->TexFormat);
const GLuint width = texImage->Width;
GLenum destBaseFormat = _mesa_base_pack_format(format);
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 5bbcae37103..c3c66bcbd36 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1325,7 +1325,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat,
- gl_format format)
+ mesa_format format)
{
GLenum target;
ASSERT(img);
@@ -1748,7 +1748,7 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
*/
GLboolean
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
- gl_format format,
+ mesa_format format,
GLint width, GLint height, GLint depth, GLint border)
{
/* We just check if the image size is less than MaxTextureMbytes.
@@ -1957,7 +1957,7 @@ static GLuint
compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
GLenum glformat)
{
- gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
+ mesa_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
return _mesa_format_image_size(mesaFormat, width, height, depth);
}
@@ -2964,13 +2964,13 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height)
* for efficient texture memory layout/allocation. In particular, this
* comes up during automatic mipmap generation.
*/
-gl_format
+mesa_format
_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum target, GLint level,
GLenum internalFormat, GLenum format, GLenum type)
{
- gl_format f;
+ mesa_format f;
/* see if we've already chosen a format for the previous level */
if (level > 0) {
@@ -3092,7 +3092,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
struct gl_pixelstore_attrib unpack_no_border;
const struct gl_pixelstore_attrib *unpack = &ctx->Unpack;
struct gl_texture_object *texObj;
- gl_format texFormat;
+ mesa_format texFormat;
GLboolean dimensionsOK, sizeOK;
FLUSH_VERTICES(ctx, 0);
@@ -3516,7 +3516,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
* from. This depends on whether the texture contains color or depth values.
*/
static struct gl_renderbuffer *
-get_copy_tex_image_source(struct gl_context *ctx, gl_format texFormat)
+get_copy_tex_image_source(struct gl_context *ctx, mesa_format texFormat)
{
if (_mesa_get_format_bits(texFormat, GL_DEPTH_BITS) > 0) {
/* reading from depth/stencil buffer */
@@ -3570,7 +3570,7 @@ copyteximage(struct gl_context *ctx, GLuint dims,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
- gl_format texFormat;
+ mesa_format texFormat;
FLUSH_VERTICES(ctx, 0);
@@ -4008,7 +4008,7 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
width, height, depth, format, imageSize, data);
}
-static gl_format
+static mesa_format
get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
{
if (ctx->API != API_OPENGL_CORE) {
@@ -4182,11 +4182,11 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
}
-gl_format
+mesa_format
_mesa_validate_texbuffer_format(const struct gl_context *ctx,
GLenum internalFormat)
{
- gl_format format = get_texbuffer_format(ctx, internalFormat);
+ mesa_format format = get_texbuffer_format(ctx, internalFormat);
GLenum datatype;
if (format == MESA_FORMAT_NONE)
@@ -4220,7 +4220,7 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat,
GLintptr offset, GLsizeiptr size)
{
struct gl_texture_object *texObj;
- gl_format format;
+ mesa_format format;
FLUSH_VERTICES(ctx, 0);
@@ -4357,7 +4357,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLboolean sizeOK, dimensionsOK;
- gl_format texFormat;
+ mesa_format texFormat;
GLenum sample_count_error;
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index bff6d7ff5cf..9726cf9f58f 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -83,10 +83,10 @@ _mesa_init_teximage_fields(struct gl_context *ctx,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat,
- gl_format format);
+ mesa_format format);
-extern gl_format
+extern mesa_format
_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum target, GLint level,
@@ -128,7 +128,7 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target);
extern GLboolean
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
- gl_format format,
+ mesa_format format,
GLint width, GLint height, GLint depth, GLint border);
@@ -153,7 +153,7 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
GLint level, GLint width, GLint height,
GLint depth, GLint border);
-extern gl_format
+extern mesa_format
_mesa_validate_texbuffer_format(const struct gl_context *ctx,
GLenum internalFormat);
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 5d516c55f44..863b63399a9 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -745,7 +745,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
GLubyte texel[4];
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- gl_format texFormat;
+ mesa_format texFormat;
GLuint dims, face, numFaces = 1;
GLenum target;
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 7c59d119ffd..8145a657d37 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1081,7 +1081,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
GLenum pname, GLint *params)
{
const struct gl_texture_image *img = NULL;
- gl_format texFormat;
+ mesa_format texFormat;
img = _mesa_select_tex_image(ctx, texObj, target, level);
if (!img || img->TexFormat == MESA_FORMAT_NONE) {
@@ -1237,7 +1237,7 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,
GLenum pname, GLint *params)
{
const struct gl_buffer_object *bo = texObj->BufferObject;
- gl_format texFormat = texObj->_BufferObjectFormat;
+ mesa_format texFormat = texObj->_BufferObjectFormat;
GLenum internalFormat = texObj->BufferObjectFormat;
GLenum baseFormat = _mesa_get_format_base_format(texFormat);
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index c1d2a5a6b77..b68b6abe74f 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -120,7 +120,7 @@ initialize_texture_fields(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLint levels,
GLsizei width, GLsizei height, GLsizei depth,
- GLenum internalFormat, gl_format texFormat)
+ GLenum internalFormat, mesa_format texFormat)
{
const GLenum target = texObj->Target;
const GLuint numFaces = _mesa_num_tex_faces(target);
@@ -350,7 +350,7 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat,
{
struct gl_texture_object *texObj;
GLboolean sizeOK, dimensionsOK;
- gl_format texFormat;
+ mesa_format texFormat;
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 8eaf43a6a90..42f86b77dba 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -923,7 +923,7 @@ _mesa_swizzle_ubyte_image(struct gl_context *ctx,
static void
memcpy_texture(struct gl_context *ctx,
GLuint dimensions,
- gl_format dstFormat,
+ mesa_format dstFormat,
GLint dstRowStride,
GLubyte **dstSlices,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
@@ -3235,7 +3235,7 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS)
{
- gl_format newDstFormat;
+ mesa_format newDstFormat;
GLboolean k;
ASSERT(dstFormat == MESA_FORMAT_SRGB8);
@@ -3256,7 +3256,7 @@ _mesa_texstore_srgb8(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS)
{
- gl_format newDstFormat;
+ mesa_format newDstFormat;
GLboolean k;
ASSERT(dstFormat == MESA_FORMAT_SRGBA8 ||
@@ -3287,7 +3287,7 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_sargb8(TEXSTORE_PARAMS)
{
- gl_format newDstFormat;
+ mesa_format newDstFormat;
GLboolean k;
ASSERT(dstFormat == MESA_FORMAT_SARGB8);
@@ -3308,7 +3308,7 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_sl8(TEXSTORE_PARAMS)
{
- gl_format newDstFormat;
+ mesa_format newDstFormat;
GLboolean k;
ASSERT(dstFormat == MESA_FORMAT_SL8);
@@ -3329,7 +3329,7 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS)
{
- gl_format newDstFormat;
+ mesa_format newDstFormat;
GLboolean k;
ASSERT(dstFormat == MESA_FORMAT_SLA8);
@@ -3652,7 +3652,7 @@ _mesa_texstore_null(TEXSTORE_PARAMS)
* Return the StoreTexImageFunc pointer to store an image in the given format.
*/
static StoreTexImageFunc
-_mesa_get_texstore_func(gl_format format)
+_mesa_get_texstore_func(mesa_format format)
{
static StoreTexImageFunc table[MESA_FORMAT_COUNT];
static GLboolean initialized = GL_FALSE;
@@ -3870,7 +3870,7 @@ _mesa_get_texstore_func(gl_format format)
GLboolean
_mesa_texstore_needs_transfer_ops(struct gl_context *ctx,
GLenum baseInternalFormat,
- gl_format dstFormat)
+ mesa_format dstFormat)
{
GLenum dstType;
@@ -3899,7 +3899,7 @@ _mesa_texstore_needs_transfer_ops(struct gl_context *ctx,
GLboolean
_mesa_texstore_can_use_memcpy(struct gl_context *ctx,
- GLenum baseInternalFormat, gl_format dstFormat,
+ GLenum baseInternalFormat, mesa_format dstFormat,
GLenum srcFormat, GLenum srcType,
const struct gl_pixelstore_attrib *srcPacking)
{
@@ -3977,7 +3977,7 @@ _mesa_texstore(TEXSTORE_PARAMS)
* \param texFormat the destination texture format
*/
static GLbitfield
-get_read_write_mode(GLenum userFormat, gl_format texFormat)
+get_read_write_mode(GLenum userFormat, mesa_format texFormat)
{
if ((userFormat == GL_STENCIL_INDEX || userFormat == GL_DEPTH_COMPONENT)
&& _mesa_get_format_base_format(texFormat) == GL_DEPTH_STENCIL)
@@ -4220,7 +4220,7 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
GLint i, rows;
GLubyte *dstMap;
const GLubyte *src;
- const gl_format texFormat = texImage->TexFormat;
+ const mesa_format texFormat = texImage->TexFormat;
GLuint bw, bh;
GLint slice;
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index fbb3b2668e7..490f9f5e08c 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -57,7 +57,7 @@
#define TEXSTORE_PARAMS \
struct gl_context *ctx, GLuint dims, \
GLenum baseInternalFormat, \
- gl_format dstFormat, \
+ mesa_format dstFormat, \
GLint dstRowStride, \
GLubyte **dstSlices, \
GLint srcWidth, GLint srcHeight, GLint srcDepth, \
@@ -72,11 +72,11 @@ _mesa_texstore(TEXSTORE_PARAMS);
extern GLboolean
_mesa_texstore_needs_transfer_ops(struct gl_context *ctx,
GLenum baseInternalFormat,
- gl_format dstFormat);
+ mesa_format dstFormat);
extern GLboolean
_mesa_texstore_can_use_memcpy(struct gl_context *ctx,
- GLenum baseInternalFormat, gl_format dstFormat,
+ GLenum baseInternalFormat, mesa_format dstFormat,
GLenum srcFormat, GLenum srcType,
const struct gl_pixelstore_attrib *srcPacking);
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index 5f88a4171ac..77a3b782b5a 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -196,7 +196,7 @@ initialize_texture_fields(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLint levels,
GLsizei width, GLsizei height, GLsizei depth,
- GLenum internalFormat, gl_format texFormat)
+ GLenum internalFormat, mesa_format texFormat)
{
const GLuint numFaces = _mesa_num_tex_faces(target);
GLint level, levelWidth = width, levelHeight = height, levelDepth = depth;
@@ -430,7 +430,7 @@ _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
GLuint newViewMinLevel, newViewMinLayer;
GLuint newViewNumLevels, newViewNumLayers;
GLsizei width, height, depth;
- gl_format texFormat;
+ mesa_format texFormat;
GLboolean sizeOK, dimensionsOK;
GLenum faceTarget;