diff options
author | Mark Mueller <[email protected]> | 2014-01-20 19:08:54 -0800 |
---|---|---|
committer | Mark Mueller <[email protected]> | 2014-01-27 14:30:50 -0800 |
commit | 50a01d2acafb2a937e62b24258e2e777c0cd1489 (patch) | |
tree | d1dfcc6ca5a577dac6a9ab7d2235434ecdb7d3ce /src/mesa/drivers/dri/nouveau | |
parent | ef145ba4ded6aafb28e3bda02fb348e6b8bff12a (diff) |
mesa: Change many Type A MESA_FORMATs to meet naming standard
Update comments. Conversion of the following Type A formats:
s/MESA_FORMAT_RGB888\b/MESA_FORMAT_BGR_UNORM8/g
s/MESA_FORMAT_BGR888\b/MESA_FORMAT_RGB_UNORM8/g
s/MESA_FORMAT_A8\b/MESA_FORMAT_A_UNORM8/g
s/MESA_FORMAT_A16\b/MESA_FORMAT_A_UNORM16/g
s/MESA_FORMAT_L8\b/MESA_FORMAT_L_UNORM8/g
s/MESA_FORMAT_L16\b/MESA_FORMAT_L_UNORM16/g
s/MESA_FORMAT_I8\b/MESA_FORMAT_I_UNORM8/g
s/MESA_FORMAT_I16\b/MESA_FORMAT_I_UNORM16/g
s/MESA_FORMAT_R8\b/MESA_FORMAT_R_UNORM8/g
s/MESA_FORMAT_R16\b/MESA_FORMAT_R_UNORM16/g
s/MESA_FORMAT_Z16\b/MESA_FORMAT_Z_UNORM16/g
s/MESA_FORMAT_Z32\b/MESA_FORMAT_Z_UNORM32/g
s/MESA_FORMAT_S8\b/MESA_FORMAT_S_UINT8/g
s/MESA_FORMAT_SRGB8\b/MESA_FORMAT_BGR_SRGB8/g
s/MESA_FORMAT_RGBA_16\b/MESA_FORMAT_RGBA_UNORM16/g
s/MESA_FORMAT_SL8\b/MESA_FORMAT_L_SRGB8/g
s/MESA_FORMAT_Z32_FLOAT\b/MESA_FORMAT_Z_FLOAT32/g
s/MESA_FORMAT_XBGR16161616_UNORM\b/MESA_FORMAT_RGBX_UNORM16/g
s/MESA_FORMAT_XBGR16161616_SNORM\b/MESA_FORMAT_RGBX_SNORM16/g
s/MESA_FORMAT_XBGR16161616_FLOAT\b/MESA_FORMAT_RGBX_FLOAT16/g
s/MESA_FORMAT_XBGR16161616_UINT\b/MESA_FORMAT_RGBX_UINT16/g
s/MESA_FORMAT_XBGR16161616_SINT\b/MESA_FORMAT_RGBX_SINT16/g
s/MESA_FORMAT_XBGR32323232_FLOAT\b/MESA_FORMAT_RGBX_FLOAT32/g
s/MESA_FORMAT_XBGR32323232_UINT\b/MESA_FORMAT_RGBX_UINT32/g
s/MESA_FORMAT_XBGR32323232_SINT\b/MESA_FORMAT_RGBX_SINT32/g
s/MESA_FORMAT_XBGR8888_UINT\b/MESA_FORMAT_RGBX_UINT8/g
s/MESA_FORMAT_XBGR8888_SINT\b/MESA_FORMAT_RGBX_SINT8/g
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_texture.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_util.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_surface.c | 40 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_fb.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_frag.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv20_state_fb.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv20_state_tex.c | 12 |
12 files changed, 52 insertions, 52 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index 72af5365c86..5d1853374e1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -60,7 +60,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat) break; case GL_DEPTH_COMPONENT16: rb->_BaseFormat = GL_DEPTH_COMPONENT; - rb->Format = MESA_FORMAT_Z16; + rb->Format = MESA_FORMAT_Z_UNORM16; s->cpp = 2; break; case GL_DEPTH_COMPONENT: @@ -277,7 +277,7 @@ validate_format_bpp(mesa_format format) case MESA_FORMAT_Z24_S8: return 32; case MESA_FORMAT_RGB565: - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return 16; default: return 0; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 1a637cc0495..6882e506190 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -210,7 +210,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_LUMINANCE16: case GL_LUMINANCE8: case GL_COMPRESSED_LUMINANCE: - return MESA_FORMAT_L8; + return MESA_FORMAT_L_UNORM8; case GL_ALPHA: case GL_ALPHA4: @@ -218,14 +218,14 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_ALPHA16: case GL_ALPHA8: case GL_COMPRESSED_ALPHA: - return MESA_FORMAT_A8; + return MESA_FORMAT_A_UNORM8; case GL_INTENSITY: case GL_INTENSITY4: case GL_INTENSITY12: case GL_INTENSITY16: case GL_INTENSITY8: - return MESA_FORMAT_I8; + return MESA_FORMAT_I_UNORM8; case GL_RGB_S3TC: case GL_RGB4_S3TC: @@ -398,9 +398,9 @@ nouveau_texture_reallocate(struct gl_context *ctx, struct gl_texture_object *t) static unsigned get_teximage_placement(struct gl_texture_image *ti) { - if (ti->TexFormat == MESA_FORMAT_A8 || - ti->TexFormat == MESA_FORMAT_L8 || - ti->TexFormat == MESA_FORMAT_I8) + if (ti->TexFormat == MESA_FORMAT_A_UNORM8 || + ti->TexFormat == MESA_FORMAT_L_UNORM8 || + ti->TexFormat == MESA_FORMAT_I_UNORM8) /* 1 cpp formats will have to be swizzled by the CPU, * so leave them in system RAM for now. */ return NOUVEAU_BO_MAP; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h index 13dc0f936fb..547d1be35a7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_util.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h @@ -61,7 +61,7 @@ pack_zs_i(mesa_format f, uint32_t z, uint8_t s) return (z & 0xffffff00) | (s & 0xff); case MESA_FORMAT_Z24_X8: return (z & 0xffffff00); - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return (z & 0xffff0000) >> 16; default: assert(0); diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c index 21399532232..93dcd879d34 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_context.c +++ b/src/mesa/drivers/dri/nouveau/nv04_context.c @@ -37,8 +37,8 @@ texunit_needs_combiners(struct gl_texture_unit *u) struct gl_texture_object *t = u->_Current; struct gl_texture_image *ti = t->Image[0][t->BaseLevel]; - return ti->TexFormat == MESA_FORMAT_A8 || - ti->TexFormat == MESA_FORMAT_L8 || + return ti->TexFormat == MESA_FORMAT_A_UNORM8 || + ti->TexFormat == MESA_FORMAT_L_UNORM8 || u->EnvMode == GL_COMBINE || u->EnvMode == GL_COMBINE4_NV || u->EnvMode == GL_BLEND || diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c index 61e259f388a..17d27814063 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c @@ -141,13 +141,13 @@ get_input_arg(struct combiner_state *rc, int arg, int flags) struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current; mesa_format format = t->Image[0][t->BaseLevel]->TexFormat; - if (format == MESA_FORMAT_A8) { + if (format == MESA_FORMAT_A_UNORM8) { /* Emulated using I8. */ if (is_color_operand(operand)) return COMBINER_SOURCE(ZERO) | get_input_mapping(rc, operand, flags); - } else if (format == MESA_FORMAT_L8) { + } else if (format == MESA_FORMAT_L_UNORM8) { /* Emulated using I8. */ if (!is_color_operand(operand)) return COMBINER_SOURCE(ZERO) | diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c index ae9548969fb..c4a20fa575c 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c @@ -38,9 +38,9 @@ static uint32_t get_tex_format(struct gl_texture_image *ti) { switch (ti->TexFormat) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8; case MESA_FORMAT_ARGB1555: return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5; diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c index c8390717051..0d8cf3b59e3 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_surface.c +++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c @@ -37,9 +37,9 @@ static inline int swzsurf_format(mesa_format format) { switch (format) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: case MESA_FORMAT_RGB332: return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y8; @@ -54,7 +54,7 @@ swzsurf_format(mesa_format format) case MESA_FORMAT_AL88_REV: case MESA_FORMAT_YCBCR: case MESA_FORMAT_YCBCR_REV: - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5; case MESA_FORMAT_A8B8G8R8_UNORM: @@ -64,7 +64,7 @@ swzsurf_format(mesa_format format) case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: - case MESA_FORMAT_Z32: + case MESA_FORMAT_Z_UNORM32: return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8; default: @@ -76,9 +76,9 @@ static inline int surf2d_format(mesa_format format) { switch (format) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: case MESA_FORMAT_RGB332: return NV04_CONTEXT_SURFACES_2D_FORMAT_Y8; @@ -93,7 +93,7 @@ surf2d_format(mesa_format format) case MESA_FORMAT_AL88_REV: case MESA_FORMAT_YCBCR: case MESA_FORMAT_YCBCR_REV: - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5; case MESA_FORMAT_A8B8G8R8_UNORM: @@ -103,7 +103,7 @@ surf2d_format(mesa_format format) case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: - case MESA_FORMAT_Z32: + case MESA_FORMAT_Z_UNORM32: return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32; default: @@ -115,9 +115,9 @@ static inline int rect_format(mesa_format format) { switch (format) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: case MESA_FORMAT_RGB332: return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8; @@ -132,7 +132,7 @@ rect_format(mesa_format format) case MESA_FORMAT_AL88_REV: case MESA_FORMAT_YCBCR: case MESA_FORMAT_YCBCR_REV: - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5; case MESA_FORMAT_A8B8G8R8_UNORM: @@ -142,7 +142,7 @@ rect_format(mesa_format format) case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: - case MESA_FORMAT_Z32: + case MESA_FORMAT_Z_UNORM32: return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8; default: @@ -154,9 +154,9 @@ static inline int sifm_format(mesa_format format) { switch (format) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: case MESA_FORMAT_RGB332: return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_AY8; @@ -171,7 +171,7 @@ sifm_format(mesa_format format) case MESA_FORMAT_AL88_REV: case MESA_FORMAT_YCBCR: case MESA_FORMAT_YCBCR_REV: - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5; case MESA_FORMAT_A8B8G8R8_UNORM: @@ -181,7 +181,7 @@ sifm_format(mesa_format format) case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: - case MESA_FORMAT_Z32: + case MESA_FORMAT_Z_UNORM32: return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8; default: diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c index 9badefa3db6..4cd47abbd70 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c @@ -42,7 +42,7 @@ get_rt_format(mesa_format format) return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: return NV10_3D_RT_FORMAT_COLOR_R5G6B5; - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV10_3D_RT_FORMAT_DEPTH_Z16; case MESA_FORMAT_Z24_S8: return NV10_3D_RT_FORMAT_DEPTH_Z24S8; diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c index f71cb0d28a4..10f067fdec1 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c @@ -172,13 +172,13 @@ get_input_arg(struct combiner_state *rc, int arg, int flags) struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current; mesa_format format = t->Image[0][t->BaseLevel]->TexFormat; - if (format == MESA_FORMAT_A8) { + if (format == MESA_FORMAT_A_UNORM8) { /* Emulated using I8. */ if (is_color_operand(operand)) return RC_IN_SOURCE(ZERO) | get_input_mapping(rc, operand, flags); - } else if (format == MESA_FORMAT_L8) { + } else if (format == MESA_FORMAT_L_UNORM8) { /* Sometimes emulated using I8. */ if (!is_color_operand(operand)) return RC_IN_SOURCE(ZERO) | diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c index 49e908f949a..316ee2abe6a 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c @@ -105,11 +105,11 @@ get_tex_format_pot(struct gl_texture_image *ti) case MESA_FORMAT_RGB565: return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5; - case MESA_FORMAT_A8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_I_UNORM8: return NV10_3D_TEX_FORMAT_FORMAT_I8; - case MESA_FORMAT_L8: + case MESA_FORMAT_L_UNORM8: return NV10_3D_TEX_FORMAT_FORMAT_L8; case MESA_FORMAT_RGB_DXT1: @@ -141,9 +141,9 @@ get_tex_format_rect(struct gl_texture_image *ti) case MESA_FORMAT_B8G8R8X8_UNORM: return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT; - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_L_UNORM8: + case MESA_FORMAT_I_UNORM8: return NV10_3D_TEX_FORMAT_FORMAT_I8_RECT; default: diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c index cf216a69950..6b6cf3e3d65 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c @@ -42,7 +42,7 @@ get_rt_format(mesa_format format) return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: return NV20_3D_RT_FORMAT_COLOR_R5G6B5; - case MESA_FORMAT_Z16: + case MESA_FORMAT_Z_UNORM16: return NV20_3D_RT_FORMAT_DEPTH_Z16; case MESA_FORMAT_Z24_S8: return NV20_3D_RT_FORMAT_DEPTH_Z24S8; diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c index 7af721850e2..198e4f2a489 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c @@ -102,11 +102,11 @@ get_tex_format_pot(struct gl_texture_image *ti) case MESA_FORMAT_RGB565: return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5; - case MESA_FORMAT_A8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_I_UNORM8: return NV20_3D_TEX_FORMAT_FORMAT_I8; - case MESA_FORMAT_L8: + case MESA_FORMAT_L_UNORM8: return NV20_3D_TEX_FORMAT_FORMAT_L8; case MESA_FORMAT_RGB_DXT1: @@ -143,11 +143,11 @@ get_tex_format_rect(struct gl_texture_image *ti) case MESA_FORMAT_RGB565: return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT; - case MESA_FORMAT_L8: + case MESA_FORMAT_L_UNORM8: return NV20_3D_TEX_FORMAT_FORMAT_L8_RECT; - case MESA_FORMAT_A8: - case MESA_FORMAT_I8: + case MESA_FORMAT_A_UNORM8: + case MESA_FORMAT_I_UNORM8: return NV20_3D_TEX_FORMAT_FORMAT_I8_RECT; default: |