[Mesa-dev] [PATCH] state_tracker: replace __FUNCTION__ with __func__
Marius Predut
marius.predut at intel.com
Tue Apr 7 12:04:38 PDT 2015
Consistently just use C99's __func__ everywhere.
The patch was verified with Microsoft Visual studio 2013
redistributable package(RTM version number: 18.0.21005.1)
Next MSVC versions intends to support __func__.
No functional changes.
Signed-off-by: Marius Predut <marius.predut at intel.com>
---
src/mesa/state_tracker/st_atom.c | 2 +-
src/mesa/state_tracker/st_atom_constbuf.c | 2 +-
src/mesa/state_tracker/st_cb_clear.c | 2 +-
src/mesa/state_tracker/st_cb_texture.c | 18 +++++++++---------
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 +-
src/mesa/state_tracker/st_program.c | 2 +-
src/mesa/state_tracker/st_texture.c | 6 +++---
8 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index f0fe11f..428f2d9 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -183,7 +183,7 @@ void st_validate_state( struct st_context *st )
if (state->st == 0)
return;
- /*printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);*/
+ /*printf("%s %x/%x\n", __func__, state->mesa, state->st);*/
#ifdef DEBUG
if (1) {
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 7984bf7..a54e0d9 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -92,7 +92,7 @@ void st_upload_constants( struct st_context *st,
if (ST_DEBUG & DEBUG_CONSTANTS) {
debug_printf("%s(shader=%d, numParams=%d, stateFlags=0x%x)\n",
- __FUNCTION__, shader_type, params->NumParameters,
+ __func__, shader_type, params->NumParameters,
params->StateFlags);
_mesa_print_parameter_list(params);
}
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index dd81a62..f10e906 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -247,7 +247,7 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers)
util_framebuffer_get_num_layers(&st->state.framebuffer);
/*
- printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__,
+ printf("%s %s%s%s %f,%f %f,%f\n", __func__,
color ? "color, " : "",
depth ? "depth, " : "",
stencil ? "stencil" : "",
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 5c520b4..6b35d61 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -123,7 +123,7 @@ gl_target_to_pipe(GLenum target)
static struct gl_texture_image *
st_NewTextureImage(struct gl_context * ctx)
{
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
(void) ctx;
return (struct gl_texture_image *) ST_CALLOC_STRUCT(st_texture_image);
}
@@ -144,7 +144,7 @@ st_NewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
{
struct st_texture_object *obj = ST_CALLOC_STRUCT(st_texture_object);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
_mesa_initialize_texture_object(ctx, &obj->base, name, target);
return &obj->base;
@@ -172,7 +172,7 @@ st_FreeTextureImageBuffer(struct gl_context *ctx,
{
struct st_texture_image *stImage = st_texture_image(texImage);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (stImage->pt) {
pipe_resource_reference(&stImage->pt, NULL);
@@ -405,7 +405,7 @@ guess_and_alloc_texture(struct st_context *st,
GLuint ptWidth, ptHeight, ptDepth, ptLayers;
enum pipe_format fmt;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
assert(!stObj->pt);
@@ -473,7 +473,7 @@ guess_and_alloc_texture(struct st_context *st,
stObj->lastLevel = lastLevel;
- DBG("%s returning %d\n", __FUNCTION__, (stObj->pt != NULL));
+ DBG("%s returning %d\n", __func__, (stObj->pt != NULL));
return stObj->pt != NULL;
}
@@ -496,7 +496,7 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
GLuint height = texImage->Height;
GLuint depth = texImage->Depth;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
assert(!stImage->pt); /* xxx this might be wrong */
@@ -1148,7 +1148,7 @@ st_GetTexImage(struct gl_context * ctx,
}
if (ST_DEBUG & DEBUG_FALLBACK)
- debug_printf("%s: fallback format translation\n", __FUNCTION__);
+ debug_printf("%s: fallback format translation\n", __func__);
dstMesaFormat = _mesa_format_from_format_and_type(format, type);
dstStride = _mesa_image_row_stride(&ctx->Pack, width, format, type);
@@ -1234,7 +1234,7 @@ fallback_copy_texsubimage(struct gl_context *ctx,
struct pipe_transfer *transfer;
if (ST_DEBUG & DEBUG_FALLBACK)
- debug_printf("%s: fallback processing\n", __FUNCTION__);
+ debug_printf("%s: fallback processing\n", __func__);
if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) {
srcY = strb->Base.Height - srcY - height;
@@ -1389,7 +1389,7 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
texImage->TexFormat != MESA_FORMAT_ETC1_RGB8);
if (!strb || !strb->surface || !stImage->pt) {
- debug_printf("%s: null strb or stImage\n", __FUNCTION__);
+ debug_printf("%s: null strb or stImage\n", __func__);
return;
}
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index b619326..0105481 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5503,7 +5503,7 @@ out:
free(t->immediates);
if (t->error) {
- debug_printf("%s: translate error flag set\n", __FUNCTION__);
+ debug_printf("%s: translate error flag set\n", __func__);
}
free(t);
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 2f10161..98d525c 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -1249,7 +1249,7 @@ out:
free(t->constants);
if (t->error) {
- debug_printf("%s: translate error flag set\n", __FUNCTION__);
+ debug_printf("%s: translate error flag set\n", __func__);
}
return ret;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 4cfd817..3b0ac4a 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -403,7 +403,7 @@ st_translate_vertex_program(struct st_context *st,
return vpv;
fail:
- debug_printf("%s: failed to translate Mesa program:\n", __FUNCTION__);
+ debug_printf("%s: failed to translate Mesa program:\n", __func__);
_mesa_print_program(&stvp->Base.Base);
debug_assert(0);
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index ca7c83c..7993ed5 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -74,7 +74,7 @@ st_texture_create(struct st_context *st,
if (target == PIPE_TEXTURE_CUBE)
assert(layers == 6);
- DBG("%s target %d format %s last_level %d\n", __FUNCTION__,
+ DBG("%s target %d format %s last_level %d\n", __func__,
(int) target, util_format_name(format), last_level);
assert(format);
@@ -250,7 +250,7 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage,
GLuint level;
void *map;
- DBG("%s \n", __FUNCTION__);
+ DBG("%s \n", __func__);
if (!stImage->pt)
return NULL;
@@ -304,7 +304,7 @@ st_texture_image_unmap(struct st_context *st,
slice += stObj->base.MinLayer;
transfer = &stImage->transfer[slice + stImage->base.Face].transfer;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
pipe_transfer_unmap(pipe, *transfer);
*transfer = NULL;
--
1.7.9.5
More information about the mesa-dev
mailing list