Consistently just use C99's __func__ everywhere.
No functional changes.
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Marius Predut <marius.predut@intel.com>
mask = mask & 0xff;
- DBG("%s : func: %s, ref : 0x%x, mask: 0x%x\n", __FUNCTION__,
+ DBG("%s : func: %s, ref : 0x%x, mask: 0x%x\n", __func__,
_mesa_lookup_enum_by_nr(func), ref, mask);
{
struct i830_context *i830 = i830_context(ctx);
- DBG("%s : mask 0x%x\n", __FUNCTION__, mask);
+ DBG("%s : mask 0x%x\n", __func__, mask);
mask = mask & 0xff;
struct i830_context *i830 = i830_context(ctx);
int fop, dfop, dpop;
- DBG("%s: fail : %s, zfail: %s, zpass : %s\n", __FUNCTION__,
+ DBG("%s: fail : %s, zfail: %s, zpass : %s\n", __func__,
_mesa_lookup_enum_by_nr(fail),
_mesa_lookup_enum_by_nr(zfail),
_mesa_lookup_enum_by_nr(zpass));
struct i830_context *i830 = i830_context(ctx);
GLubyte r, g, b, a;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
UNCLAMPED_FLOAT_TO_UBYTE(r, color[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(g, color[GCOMP]);
break;
default:
fprintf(stderr, "[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB);
+ __func__, __LINE__, ctx->Color.Blend[0].EquationRGB);
return;
}
break;
default:
fprintf(stderr, "[%s:%u] Invalid alpha blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA);
+ __func__, __LINE__, ctx->Color.Blend[0].EquationA);
return;
}
if (0) {
fprintf(stderr,
"[%s:%u] STATE1: 0x%08x IALPHAB: 0x%08x blend is %sabled\n",
- __FUNCTION__, __LINE__, i830->state.Ctx[I830_CTXREG_STATE1],
+ __func__, __LINE__, i830->state.Ctx[I830_CTXREG_STATE1],
i830->state.Ctx[I830_CTXREG_IALPHAB],
(ctx->Color.BlendEnabled) ? "en" : "dis");
}
static void
i830BlendEquationSeparate(struct gl_context * ctx, GLenum modeRGB, GLenum modeA)
{
- DBG("%s -> %s, %s\n", __FUNCTION__,
+ DBG("%s -> %s, %s\n", __func__,
_mesa_lookup_enum_by_nr(modeRGB),
_mesa_lookup_enum_by_nr(modeA));
i830BlendFuncSeparate(struct gl_context * ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA)
{
- DBG("%s -> RGB(%s, %s) A(%s, %s)\n", __FUNCTION__,
+ DBG("%s -> RGB(%s, %s) A(%s, %s)\n", __func__,
_mesa_lookup_enum_by_nr(sfactorRGB),
_mesa_lookup_enum_by_nr(dfactorRGB),
_mesa_lookup_enum_by_nr(sfactorA),
struct i830_context *i830 = i830_context(ctx);
int test = intel_translate_compare_func(func);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
i830->state.Ctx[I830_CTXREG_STATE3] &= ~DEPTH_TEST_FUNC_MASK;
{
struct i830_context *i830 = i830_context(ctx);
- DBG("%s flag (%d)\n", __FUNCTION__, flag);
+ DBG("%s flag (%d)\n", __func__, flag);
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
flag = false;
if (!ctx->DrawBuffer)
return;
- DBG("%s %d,%d %dx%d\n", __FUNCTION__,
+ DBG("%s %d,%d %dx%d\n", __func__,
ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
x2 = ctx->Scissor.ScissorArray[0].X
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = y1 + ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (inverted)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (inverted)\n", __func__, x1, x2, y1, y2);
}
else {
/* FBO - not inverted
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = ctx->Scissor.ScissorArray[0].Y
+ ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (not inverted)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (not inverted)\n", __func__, x1, x2, y1, y2);
}
x1 = CLAMP(x1, 0, ctx->DrawBuffer->Width - 1);
x2 = CLAMP(x2, 0, ctx->DrawBuffer->Width - 1);
y2 = CLAMP(y2, 0, ctx->DrawBuffer->Height - 1);
- DBG("%s %d..%d,%d..%d (clamped)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (clamped)\n", __func__, x1, x2, y1, y2);
I830_STATECHANGE(i830, I830_UPLOAD_BUFFERS);
i830->state.Buffer[I830_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff);
struct i830_context *i830 = i830_context(ctx);
int tmp = intel_translate_logic_op(opcode);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
i830->state.Ctx[I830_CTXREG_STATE4] &= ~LOGICOP_MASK;
struct i830_context *i830 = i830_context(ctx);
GLuint mode;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (!ctx->Polygon.CullFlag) {
mode = CULLMODE_NONE;
int width;
int state5;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
width = (int) (widthf * 2);
width = CLAMP(width, 1, 15);
struct i830_context *i830 = i830_context(ctx);
GLint point_size = (int) size;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
point_size = CLAMP(point_size, 1, 256);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
struct i830_context *i830 = i830_context(ctx);
GLuint tmp = 0;
- DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, r, g, b, a);
+ DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __func__, r, g, b, a);
tmp = ((i830->state.Ctx[I830_CTXREG_ENABLES_2] & ~WRITEMASK_MASK) |
ENABLE_COLOR_MASK |
static void
i830LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
update_specular(ctx);
{
struct i830_context *i830 = i830_context(ctx);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (pname == GL_FOG_COLOR) {
GLuint color = (((GLubyte) (ctx->Fog.Color[0] * 255.0F) << 16) |
};
if (INTEL_DEBUG & DEBUG_TEXTURE)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
/* The EXT version of the DOT3 extension does not support the
if (0)
- fprintf(stderr, "%s unit %d\n", __FUNCTION__, unit);
+ fprintf(stderr, "%s unit %d\n", __func__, unit);
/* Update i830->state.TexBlend
*/
case MESA_FORMAT_RGBA_DXT5:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
default:
- fprintf(stderr, "%s: bad image format %s\n", __FUNCTION__,
+ fprintf(stderr, "%s: bad image format %s\n", __func__,
_mesa_get_format_name(mesa_format));
abort();
return 0;
}
}
- fprintf(stderr, "%s: out of constants\n", __FUNCTION__);
+ fprintf(stderr, "%s: out of constants\n", __func__);
p->error = 1;
return 0;
}
}
}
- fprintf(stderr, "%s: out of constants\n", __FUNCTION__);
+ fprintf(stderr, "%s: out of constants\n", __func__);
p->error = 1;
return 0;
}
}
}
- fprintf(stderr, "%s: out of constants\n", __FUNCTION__);
+ fprintf(stderr, "%s: out of constants\n", __func__);
p->error = 1;
return 0;
}
}
}
- fprintf(stderr, "%s: out of constants\n", __FUNCTION__);
+ fprintf(stderr, "%s: out of constants\n", __func__);
p->error = 1;
return 0;
}
GLubyte r, g, b, a;
GLuint dw;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
UNCLAMPED_FLOAT_TO_UBYTE(r, color[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(g, color[GCOMP]);
int test = intel_translate_compare_func(func);
GLuint dw;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
dw = i915->state.Ctx[I915_CTXREG_LIS6];
dw &= ~S6_DEPTH_TEST_FUNC_MASK;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint dw;
- DBG("%s flag (%d)\n", __FUNCTION__, flag);
+ DBG("%s flag (%d)\n", __func__, flag);
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
flag = false;
if (!ctx->DrawBuffer)
return;
- DBG("%s %d,%d %dx%d\n", __FUNCTION__,
+ DBG("%s %d,%d %dx%d\n", __func__,
ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
x2 = ctx->Scissor.ScissorArray[0].X
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = y1 + ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (inverted)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (inverted)\n", __func__, x1, x2, y1, y2);
}
else {
/* FBO - not inverted
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = ctx->Scissor.ScissorArray[0].Y
+ ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (not inverted)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (not inverted)\n", __func__, x1, x2, y1, y2);
}
x1 = CLAMP(x1, 0, ctx->DrawBuffer->Width - 1);
x2 = CLAMP(x2, 0, ctx->DrawBuffer->Width - 1);
y2 = CLAMP(y2, 0, ctx->DrawBuffer->Height - 1);
- DBG("%s %d..%d,%d..%d (clamped)\n", __FUNCTION__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (clamped)\n", __func__, x1, x2, y1, y2);
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
i915->state.Buffer[I915_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff);
struct i915_context *i915 = I915_CONTEXT(ctx);
int tmp = intel_translate_logic_op(opcode);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
i915->state.Ctx[I915_CTXREG_STATE4] &= ~LOGICOP_MASK;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint mode, dw;
- DBG("%s %d\n", __FUNCTION__,
+ DBG("%s %d\n", __func__,
ctx->DrawBuffer ? ctx->DrawBuffer->Name : 0);
if (!ctx->Polygon.CullFlag) {
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_LINE_WIDTH_MASK;
int width;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
width = (int) (widthf * 2);
width = CLAMP(width, 1, 0xf);
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK;
GLint point_size = (int) round(size);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
point_size = CLAMP(point_size, 1, 255);
lis4 |= point_size << S4_POINT_WIDTH_SHIFT;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint tmp = i915->state.Ctx[I915_CTXREG_LIS5] & ~S5_WRITEDISABLE_MASK;
- DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, r, g, b,
+ DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __func__, r, g, b,
a);
if (!r)
static void
i915LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
update_specular(ctx);
break;
}
- DBG("%s: %dx%dx%d\n", __FUNCTION__,
+ DBG("%s: %dx%dx%d\n", __func__,
mt->total_width, mt->total_height, mt->cpp);
}
break;
}
- DBG("%s: %dx%dx%d\n", __FUNCTION__,
+ DBG("%s: %dx%dx%d\n", __func__,
mt->total_width, mt->total_height, mt->cpp);
}
else
return (MAPSURF_32BIT | MT_32BIT_x8L24);
default:
- fprintf(stderr, "%s: bad image format %s\n", __FUNCTION__,
+ fprintf(stderr, "%s: bad image format %s\n", __func__,
_mesa_get_format_name(mesa_format));
abort();
return 0;
assert(get_dirty(state) == 0);
if (INTEL_DEBUG & DEBUG_STATE)
- fprintf(stderr, "%s dirty: %x\n", __FUNCTION__, dirty);
+ fprintf(stderr, "%s dirty: %x\n", __func__, dirty);
if (dirty & I915_UPLOAD_INVARIENT) {
if (INTEL_DEBUG & DEBUG_STATE)
(dst_format != MESA_FORMAT_B8G8R8A8_UNORM &&
dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) {
perf_debug("%s: Can't use hardware blitter from %s to %s, "
- "falling back.\n", __FUNCTION__,
+ "falling back.\n", __func__,
_mesa_get_format_name(src_format),
_mesa_get_format_name(dst_format));
return false;
intel_batchbuffer_require_space(intel, 8 * 4);
DBG("%s src:buf(%p)/%d+%d %d,%d dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
- __FUNCTION__,
+ __func__,
src_buffer, src_pitch, src_offset, src_x, src_y,
dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h);
cpp = region->cpp;
DBG("%s dst:buf(%p)/%d %d,%d sz:%dx%d\n",
- __FUNCTION__,
+ __func__,
region->bo, pitch,
x1, y1, x2 - x1, y2 - y1);
return true;
DBG("%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d, %d bytes %d dwords\n",
- __FUNCTION__,
+ __func__,
dst_buffer, dst_pitch, dst_offset, x, y, w, h, src_size, dwords);
intel_batchbuffer_require_space(intel,
cpp = region->cpp;
DBG("%s dst:buf(%p)/%d %d,%d sz:%dx%d\n",
- __FUNCTION__, region->bo, pitch, x, y, width, height);
+ __func__, region->bo, pitch, x, y, width, height);
BR13 = br13_for_cpp(cpp) | 0xf0 << 16;
CMD = XY_COLOR_BLT_CMD;
}
if (0)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
/* Get SW clears out of the way: Anything without an intel_renderbuffer */
for (i = 0; i < BUFFER_COUNT; i++) {
if (!_mesa_initialize_context(&intel->ctx, api, mesaVis, shareCtx,
functions)) {
*dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
- printf("%s: failed to init mesa context\n", __FUNCTION__);
+ printf("%s: failed to init mesa context\n", __func__);
return false;
}
}
DBG("%s: rb %d (%s) mt mapped: (%d, %d) (%dx%d) -> %p/%d\n",
- __FUNCTION__, rb->Name, _mesa_get_format_name(rb->Format),
+ __func__, rb->Name, _mesa_get_format_name(rb->Format),
x, y, w, h, map, stride);
*out_map = map;
struct swrast_renderbuffer *srb = (struct swrast_renderbuffer *)rb;
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
- DBG("%s: rb %d (%s)\n", __FUNCTION__,
+ DBG("%s: rb %d (%s)\n", __func__,
rb->Name, _mesa_get_format_name(rb->Format));
if (srb->Buffer) {
intel_miptree_release(&irb->mt);
- DBG("%s: %s: %s (%dx%d)\n", __FUNCTION__,
+ DBG("%s: %s: %s (%dx%d)\n", __func__,
_mesa_lookup_enum_by_nr(internalFormat),
_mesa_get_format_name(rb->Format), width, height);
struct intel_mipmap_tree *depth_mt = NULL, *stencil_mt = NULL;
int i;
- DBG("%s() on fb %p (%s)\n", __FUNCTION__,
+ DBG("%s() on fb %p (%s)\n", __func__,
fb, (fb == ctx->DrawBuffer ? "drawbuffer" :
(fb == ctx->ReadBuffer ? "readbuffer" : "other buffer")));
if (!mt)
return NULL;
- DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__,
+ DBG("%s target %s format %s level %d..%d <-- %p\n", __func__,
_mesa_lookup_enum_by_nr(target),
_mesa_get_format_name(format),
first_level, last_level, mt);
if (src) {
src->refcount++;
- DBG("%s %p refcount now %d\n", __FUNCTION__, src, src->refcount);
+ DBG("%s %p refcount now %d\n", __func__, src, src->refcount);
}
*dst = src;
if (!*mt)
return;
- DBG("%s %p refcount will be %d\n", __FUNCTION__, *mt, (*mt)->refcount - 1);
+ DBG("%s %p refcount will be %d\n", __func__, *mt, (*mt)->refcount - 1);
if (--(*mt)->refcount <= 0) {
GLuint i;
- DBG("%s deleting %p\n", __FUNCTION__, *mt);
+ DBG("%s deleting %p\n", __func__, *mt);
intel_region_release(&((*mt)->region));
mt->level[level].level_x = x;
mt->level[level].level_y = y;
- DBG("%s level %d size: %d,%d,%d offset %d,%d\n", __FUNCTION__,
+ DBG("%s level %d size: %d,%d,%d offset %d,%d\n", __func__,
level, w, h, d, x, y);
assert(mt->level[level].slice == NULL);
mt->level[level].slice[img].y_offset = mt->level[level].level_y + y;
DBG("%s level %d img %d pos %d,%d\n",
- __FUNCTION__, level, img,
+ __func__, level, img,
mt->level[level].slice[img].x_offset,
mt->level[level].slice[img].y_offset);
}
map->ptr = base + y * map->stride + x * mt->cpp;
}
- DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __FUNCTION__,
+ DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __func__,
map->x, map->y, map->w, map->h,
mt, _mesa_get_format_name(mt->format),
x, y, map->ptr, map->stride);
intel_batchbuffer_flush(intel);
map->ptr = intel_miptree_map_raw(intel, map->mt);
- DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __FUNCTION__,
+ DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __func__,
map->x, map->y, map->w, map->h,
mt, _mesa_get_format_name(mt->format),
level, slice, map->ptr, map->stride);
if (!map)
return;
- DBG("%s: mt %p (%s) level %d slice %d\n", __FUNCTION__,
+ DBG("%s: mt %p (%s) level %d slice %d\n", __func__,
mt, _mesa_get_format_name(mt->format), level, slice);
if (map->mt) {
GLuint count = 0;
DBG("%s %d,%d %dx%d bitmap %dx%d skip %d src_offset %d mask %d\n",
- __FUNCTION__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
+ __func__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
if (invert) {
first = h-1;
width, height,
(ctx->Color.ColorLogicOpEnabled ?
ctx->Color.LogicOp : GL_COPY))) {
- DBG("%s: blit failure\n", __FUNCTION__);
+ DBG("%s: blit failure\n", __func__);
return false;
}
out:
intel_check_front_buffer_rendering(intel);
- DBG("%s: success\n", __FUNCTION__);
+ DBG("%s: success\n", __func__);
return true;
}
GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type)
{
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (!_mesa_check_conditional_render(ctx))
return;
GLint dst_x, dst_y;
GLuint dirty;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
assert(_mesa_is_bufferobj(pack->BufferObj));
if (ctx->_ImageTransferState ||
!_mesa_format_matches_format_and_type(irb->mt->format, format, type,
false)) {
- DBG("%s - bad format for blit\n", __FUNCTION__);
+ DBG("%s - bad format for blit\n", __func__);
return false;
}
if (pack->SwapBytes || pack->LsbFirst) {
- DBG("%s: bad packing params\n", __FUNCTION__);
+ DBG("%s: bad packing params\n", __func__);
return false;
}
intel_miptree_release(&pbo_mt);
- DBG("%s - DONE\n", __FUNCTION__);
+ DBG("%s - DONE\n", __func__);
return true;
}
intel_flush_rendering_to_batch(ctx);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (_mesa_is_bufferobj(pack->BufferObj)) {
/* Using PBOs, so try the BLT based path. */
return;
}
- perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
+ perf_debug("%s: fallback to CPU mapping in PBO case\n", __func__);
}
/* glReadPixels() wont dirty the front buffer, so reset the dirty
region->bo = buffer;
region->tiling = tiling;
- _DBG("%s <-- %p\n", __FUNCTION__, region);
+ _DBG("%s <-- %p\n", __func__, region);
return region;
}
void
intel_region_reference(struct intel_region **dst, struct intel_region *src)
{
- _DBG("%s: %p(%d) -> %p(%d)\n", __FUNCTION__,
+ _DBG("%s: %p(%d) -> %p(%d)\n", __func__,
*dst, *dst ? (*dst)->refcount : 0, src, src ? src->refcount : 0);
if (src != *dst) {
struct intel_region *region = *region_handle;
if (region == NULL) {
- _DBG("%s NULL\n", __FUNCTION__);
+ _DBG("%s NULL\n", __func__);
return;
}
- _DBG("%s %p %d\n", __FUNCTION__, region, region->refcount - 1);
+ _DBG("%s %p %d\n", __func__, region, region->refcount - 1);
assert(region->refcount > 0);
region->refcount--;
intelDmaPrimitive(struct intel_context *intel, GLenum prim)
{
if (0)
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));
+ fprintf(stderr, "%s %s\n", __func__, _mesa_lookup_enum_by_nr(prim));
INTEL_FIREVERTICES(intel);
intel->vtbl.reduced_primitive_state(intel, reduced_prim[prim]);
intel_set_prim(intel, hw_prim[prim]);
return COMPAREFUNC_NEVER;
}
- fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func);
+ fprintf(stderr, "Unknown value in %s: %x\n", __func__, func);
return COMPAREFUNC_NEVER;
}
return COMPAREFUNC_ALWAYS;
}
- fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func);
+ fprintf(stderr, "Unknown value in %s: %x\n", __func__, func);
return COMPAREFUNC_ALWAYS;
}
return BLENDFACT_INV_CONST_ALPHA;
}
- fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, factor);
+ fprintf(stderr, "Unknown value in %s: %x\n", __func__, factor);
return BLENDFACT_ZERO;
}
static struct gl_texture_image *
intelNewTextureImage(struct gl_context * ctx)
{
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
(void) ctx;
return (struct gl_texture_image *) CALLOC_STRUCT(intel_texture_image);
}
(void) ctx;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (obj == NULL)
return NULL;
intel_miptree_match_image(intel_texobj->mt, image)) {
intel_miptree_reference(&intel_image->mt, intel_texobj->mt);
DBG("%s: alloc obj %p level %d %dx%dx%d using object's miptree %p\n",
- __FUNCTION__, texobj, image->Level,
+ __func__, texobj, image->Level,
image->Width, image->Height, image->Depth, intel_texobj->mt);
} else {
intel_image->mt = intel_miptree_create_for_teximage(intel, intel_texobj,
intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
DBG("%s: alloc obj %p level %d %dx%dx%d using new miptree %p\n",
- __FUNCTION__, texobj, image->Level,
+ __func__, texobj, image->Level,
image->Width, image->Height, image->Depth, intel_image->mt);
}
{
struct intel_texture_image *intelImage = intel_texture_image(texImage);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
intel_miptree_release(&intelImage->mt);
if (!intelImage->mt || !irb || !irb->mt) {
if (unlikely(INTEL_DEBUG & DEBUG_PERF))
fprintf(stderr, "%s fail %p %p (0x%08x)\n",
- __FUNCTION__, intelImage->mt, irb, internalFormat);
+ __func__, intelImage->mt, irb, internalFormat);
return false;
}
}
/* Otherwise, fall back to meta. This will likely be slow. */
- perf_debug("%s - fallback to swrast\n", __FUNCTION__);
+ perf_debug("%s - fallback to swrast\n", __func__);
_mesa_meta_CopyTexSubImage(ctx, dims, texImage,
xoffset, yoffset, slice,
rb, x, y, width, height);
intel_miptree_get_dimensions_for_image(&intelImage->base.Base,
&width, &height, &depth);
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
if (intelImage->base.Base.Level > intelObj->base.BaseLevel &&
(width == 1 ||
if (intel->ctx._ImageTransferState ||
unpack->SkipPixels || unpack->SkipRows) {
- DBG("%s: image transfer\n", __FUNCTION__);
+ DBG("%s: image transfer\n", __func__);
return false;
}
ctx->Driver.AllocTextureImageBuffer(ctx, image);
if (!intelImage->mt) {
- DBG("%s: no miptree\n", __FUNCTION__);
+ DBG("%s: no miptree\n", __func__);
return false;
}
if (!_mesa_format_matches_format_and_type(intelImage->mt->format,
format, type, false)) {
DBG("%s: format mismatch (upload to %s with format 0x%x, type 0x%x)\n",
- __FUNCTION__, _mesa_get_format_name(intelImage->mt->format),
+ __func__, _mesa_get_format_name(intelImage->mt->format),
format, type);
return false;
}
if (image->TexObject->Target == GL_TEXTURE_1D_ARRAY ||
image->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
- DBG("%s: no support for array textures\n", __FUNCTION__);
+ DBG("%s: no support for array textures\n", __func__);
return false;
}
intelImage->mt, image->Level, image->Face,
0, 0, false,
image->Width, image->Height, GL_COPY)) {
- DBG("%s: blit failed\n", __FUNCTION__);
+ DBG("%s: blit failed\n", __func__);
intel_miptree_release(&pbo_mt);
return false;
}
intel_miptree_release(&pbo_mt);
- DBG("%s: success\n", __FUNCTION__);
+ DBG("%s: success\n", __func__);
return true;
}
GLenum format, GLenum type, const void *pixels,
const struct gl_pixelstore_attrib *unpack)
{
- DBG("%s target %s level %d %dx%dx%d\n", __FUNCTION__,
+ DBG("%s target %s level %d %dx%dx%d\n", __func__,
_mesa_lookup_enum_by_nr(texImage->TexObject->Target),
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);
}
DBG("%s: upload image %dx%dx%d pixels %p\n",
- __FUNCTION__, texImage->Width, texImage->Height, texImage->Depth,
+ __func__, texImage->Width, texImage->Height, texImage->Depth,
pixels);
_mesa_store_teximage(ctx, dims, texImage,
return false;
DBG("BLT subimage %s target %s level %d offset %d,%d %dx%d\n",
- __FUNCTION__,
+ __func__,
_mesa_lookup_enum_by_nr(texImage->TexObject->Target),
texImage->Level, xoffset, yoffset, width, height);
SWvertex v[3];
if (0)
- fprintf(stderr, "\n%s\n", __FUNCTION__);
+ fprintf(stderr, "\n%s\n", __func__);
INTEL_FIREVERTICES(intel);
SWvertex v[2];
if (0)
- fprintf(stderr, "\n%s\n", __FUNCTION__);
+ fprintf(stderr, "\n%s\n", __func__);
INTEL_FIREVERTICES(intel);
SWvertex v[1];
if (0)
- fprintf(stderr, "\n%s\n", __FUNCTION__);
+ fprintf(stderr, "\n%s\n", __func__);
INTEL_FIREVERTICES(intel);
GLuint index = 0;
if (INTEL_DEBUG & DEBUG_STATE)
- fprintf(stderr, "\n%s\n", __FUNCTION__);
+ fprintf(stderr, "\n%s\n", __func__);
if ((flags & (ANY_FALLBACK_FLAGS | ANY_RASTER_FLAGS)) || have_wpos) {
struct intel_context *intel = intel_context(ctx);
if (0)
- fprintf(stderr, "%s %s %x\n", __FUNCTION__,
+ fprintf(stderr, "%s %s %x\n", __func__,
_mesa_lookup_enum_by_nr(rprim), hwprim);
intel->vtbl.reduced_primitive_state(intel, rprim);
ctx->Polygon.BackMode != GL_FILL);
if (0)
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));
+ fprintf(stderr, "%s %s\n", __func__, _mesa_lookup_enum_by_nr(prim));
/* Let some clipping routines know which primitive they're dealing
* with.