aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-19 12:32:24 -0500
committerKristian Høgsberg <[email protected]>2010-02-19 12:32:24 -0500
commit298be2b028263b2c343a707662c6fbfa18293cb2 (patch)
tree97ebdbbd457cbb2803ab03125355885c49d22f55 /src/mesa/drivers/dri/i915
parent32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (diff)
Replace the _mesa_*printf() wrappers with the plain libc versions
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_debug.c178
-rw-r--r--src/mesa/drivers/dri/i915/i915_debug_fp.c80
-rw-r--r--src/mesa/drivers/dri/i915/i915_tex_layout.c4
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c8
5 files changed, 134 insertions, 138 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index ed9a44ff246..4d86aae87d9 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -108,7 +108,7 @@ i915CreateContext(const __GLcontextModes * mesaVis,
return GL_FALSE;
if (0)
- _mesa_printf("\ntexmem-0-3 branch\n\n");
+ printf("\ntexmem-0-3 branch\n\n");
i915InitVtbl(i915);
diff --git a/src/mesa/drivers/dri/i915/i915_debug.c b/src/mesa/drivers/dri/i915/i915_debug.c
index fecfac30339..4569fb918ea 100644
--- a/src/mesa/drivers/dri/i915/i915_debug.c
+++ b/src/mesa/drivers/dri/i915/i915_debug.c
@@ -31,27 +31,25 @@
#include "i915_context.h"
#include "i915_debug.h"
-#define PRINTF( ... ) _mesa_printf( __VA_ARGS__ )
-
static GLboolean debug( struct debug_stream *stream, const char *name, GLuint len )
{
GLuint i;
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
if (len == 0) {
- PRINTF("Error - zero length packet (0x%08x)\n", stream->ptr[0]);
+ printf("Error - zero length packet (0x%08x)\n", stream->ptr[0]);
assert(0);
return GL_FALSE;
}
if (stream->print_addresses)
- PRINTF("%08x: ", stream->offset);
+ printf("%08x: ", stream->offset);
- PRINTF("%s (%d dwords):\n", name, len);
+ printf("%s (%d dwords):\n", name, len);
for (i = 0; i < len; i++)
- PRINTF("\t0x%08x\n", ptr[i]);
- PRINTF("\n");
+ printf("\t0x%08x\n", ptr[i]);
+ printf("\n");
stream->offset += len * sizeof(GLuint);
@@ -88,17 +86,17 @@ static GLboolean debug_prim( struct debug_stream *stream, const char *name,
- PRINTF("%s %s (%d dwords):\n", name, prim, len);
- PRINTF("\t0x%08x\n", ptr[0]);
+ printf("%s %s (%d dwords):\n", name, prim, len);
+ printf("\t0x%08x\n", ptr[0]);
for (i = 1; i < len; i++) {
if (dump_floats)
- PRINTF("\t0x%08x // %f\n", ptr[i], *(GLfloat *)&ptr[i]);
+ printf("\t0x%08x // %f\n", ptr[i], *(GLfloat *)&ptr[i]);
else
- PRINTF("\t0x%08x\n", ptr[i]);
+ printf("\t0x%08x\n", ptr[i]);
}
- PRINTF("\n");
+ printf("\n");
stream->offset += len * sizeof(GLuint);
@@ -113,15 +111,15 @@ static GLboolean debug_program( struct debug_stream *stream, const char *name, G
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
if (len == 0) {
- PRINTF("Error - zero length packet (0x%08x)\n", stream->ptr[0]);
+ printf("Error - zero length packet (0x%08x)\n", stream->ptr[0]);
assert(0);
return GL_FALSE;
}
if (stream->print_addresses)
- PRINTF("%08x: ", stream->offset);
+ printf("%08x: ", stream->offset);
- PRINTF("%s (%d dwords):\n", name, len);
+ printf("%s (%d dwords):\n", name, len);
i915_disassemble_program( ptr, len );
stream->offset += len * sizeof(GLuint);
@@ -135,17 +133,17 @@ static GLboolean debug_chain( struct debug_stream *stream, const char *name, GLu
GLuint old_offset = stream->offset + len * sizeof(GLuint);
GLuint i;
- PRINTF("%s (%d dwords):\n", name, len);
+ printf("%s (%d dwords):\n", name, len);
for (i = 0; i < len; i++)
- PRINTF("\t0x%08x\n", ptr[i]);
+ printf("\t0x%08x\n", ptr[i]);
stream->offset = ptr[1] & ~0x3;
if (stream->offset < old_offset)
- PRINTF("\n... skipping backwards from 0x%x --> 0x%x ...\n\n",
+ printf("\n... skipping backwards from 0x%x --> 0x%x ...\n\n",
old_offset, stream->offset );
else
- PRINTF("\n... skipping from 0x%x --> 0x%x ...\n\n",
+ printf("\n... skipping from 0x%x --> 0x%x ...\n\n",
old_offset, stream->offset );
@@ -165,10 +163,10 @@ static GLboolean debug_variable_length_prim( struct debug_stream *stream )
len = 1+(i+2)/2;
- PRINTF("3DPRIM, %s variable length %d indicies (%d dwords):\n", prim, i, len);
+ printf("3DPRIM, %s variable length %d indicies (%d dwords):\n", prim, i, len);
for (i = 0; i < len; i++)
- PRINTF("\t0x%08x\n", ptr[i]);
- PRINTF("\n");
+ printf("\t0x%08x\n", ptr[i]);
+ printf("\n");
stream->offset += len * sizeof(GLuint);
return GL_TRUE;
@@ -178,9 +176,9 @@ static GLboolean debug_variable_length_prim( struct debug_stream *stream )
#define BITS( dw, hi, lo, ... ) \
do { \
unsigned himask = 0xffffffffU >> (31 - (hi)); \
- PRINTF("\t\t "); \
- PRINTF(__VA_ARGS__); \
- PRINTF(": 0x%x\n", ((dw) & himask) >> (lo)); \
+ printf("\t\t "); \
+ printf(__VA_ARGS__); \
+ printf(": 0x%x\n", ((dw) & himask) >> (lo)); \
} while (0)
#define MBZ( dw, hi, lo) do { \
@@ -194,9 +192,9 @@ do { \
#define FLAG( dw, bit, ... ) \
do { \
if (((dw) >> (bit)) & 1) { \
- PRINTF("\t\t "); \
- PRINTF(__VA_ARGS__); \
- PRINTF("\n"); \
+ printf("\t\t "); \
+ printf(__VA_ARGS__); \
+ printf("\n"); \
} \
} while (0)
@@ -208,17 +206,17 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
GLuint bits = (ptr[0] >> 4) & 0xff;
GLuint j = 0;
- PRINTF("%s (%d dwords, flags: %x):\n", name, len, bits);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords, flags: %x):\n", name, len, bits);
+ printf("\t0x%08x\n", ptr[j++]);
if (bits & (1<<0)) {
- PRINTF("\t LIS0: 0x%08x\n", ptr[j]);
- PRINTF("\t vb address: 0x%08x\n", (ptr[j] & ~0x3));
+ printf("\t LIS0: 0x%08x\n", ptr[j]);
+ printf("\t vb address: 0x%08x\n", (ptr[j] & ~0x3));
BITS(ptr[j], 0, 0, "vb invalidate disable");
j++;
}
if (bits & (1<<1)) {
- PRINTF("\t LIS1: 0x%08x\n", ptr[j]);
+ printf("\t LIS1: 0x%08x\n", ptr[j]);
BITS(ptr[j], 29, 24, "vb dword width");
BITS(ptr[j], 21, 16, "vb dword pitch");
BITS(ptr[j], 15, 0, "vb max index");
@@ -226,7 +224,7 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
}
if (bits & (1<<2)) {
int i;
- PRINTF("\t LIS2: 0x%08x\n", ptr[j]);
+ printf("\t LIS2: 0x%08x\n", ptr[j]);
for (i = 0; i < 8; i++) {
unsigned tc = (ptr[j] >> (i * 4)) & 0xf;
if (tc != 0xf)
@@ -235,11 +233,11 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
j++;
}
if (bits & (1<<3)) {
- PRINTF("\t LIS3: 0x%08x\n", ptr[j]);
+ printf("\t LIS3: 0x%08x\n", ptr[j]);
j++;
}
if (bits & (1<<4)) {
- PRINTF("\t LIS4: 0x%08x\n", ptr[j]);
+ printf("\t LIS4: 0x%08x\n", ptr[j]);
BITS(ptr[j], 31, 23, "point width");
BITS(ptr[j], 22, 19, "line width");
FLAG(ptr[j], 18, "alpha flatshade");
@@ -261,7 +259,7 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
j++;
}
if (bits & (1<<5)) {
- PRINTF("\t LIS5: 0x%08x\n", ptr[j]);
+ printf("\t LIS5: 0x%08x\n", ptr[j]);
BITS(ptr[j], 31, 28, "rgba write disables");
FLAG(ptr[j], 27, "force dflt point width");
FLAG(ptr[j], 26, "last pixel enable");
@@ -279,7 +277,7 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
j++;
}
if (bits & (1<<6)) {
- PRINTF("\t LIS6: 0x%08x\n", ptr[j]);
+ printf("\t LIS6: 0x%08x\n", ptr[j]);
FLAG(ptr[j], 31, "alpha test enable");
BITS(ptr[j], 30, 28, "alpha func");
BITS(ptr[j], 27, 20, "alpha ref");
@@ -296,7 +294,7 @@ static GLboolean debug_load_immediate( struct debug_stream *stream,
}
- PRINTF("\n");
+ printf("\n");
assert(j == len);
@@ -315,34 +313,34 @@ static GLboolean debug_load_indirect( struct debug_stream *stream,
GLuint bits = (ptr[0] >> 8) & 0x3f;
GLuint i, j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
for (i = 0; i < 6; i++) {
if (bits & (1<<i)) {
switch (1<<(8+i)) {
case LI0_STATE_STATIC_INDIRECT:
- PRINTF(" STATIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
- PRINTF(" 0x%08x\n", ptr[j++]);
+ printf(" STATIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" 0x%08x\n", ptr[j++]);
break;
case LI0_STATE_DYNAMIC_INDIRECT:
- PRINTF(" DYNAMIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" DYNAMIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
break;
case LI0_STATE_SAMPLER:
- PRINTF(" SAMPLER: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
- PRINTF(" 0x%08x\n", ptr[j++]);
+ printf(" SAMPLER: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" 0x%08x\n", ptr[j++]);
break;
case LI0_STATE_MAP:
- PRINTF(" MAP: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
- PRINTF(" 0x%08x\n", ptr[j++]);
+ printf(" MAP: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" 0x%08x\n", ptr[j++]);
break;
case LI0_STATE_PROGRAM:
- PRINTF(" PROGRAM: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
- PRINTF(" 0x%08x\n", ptr[j++]);
+ printf(" PROGRAM: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" 0x%08x\n", ptr[j++]);
break;
case LI0_STATE_CONSTANTS:
- PRINTF(" CONSTANTS: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
- PRINTF(" 0x%08x\n", ptr[j++]);
+ printf(" CONSTANTS: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++;
+ printf(" 0x%08x\n", ptr[j++]);
break;
default:
assert(0);
@@ -352,10 +350,10 @@ static GLboolean debug_load_indirect( struct debug_stream *stream,
}
if (bits == 0) {
- PRINTF("\t DUMMY: 0x%08x\n", ptr[j++]);
+ printf("\t DUMMY: 0x%08x\n", ptr[j++]);
}
- PRINTF("\n");
+ printf("\n");
assert(j == len);
@@ -368,7 +366,7 @@ static GLboolean debug_load_indirect( struct debug_stream *stream,
static void BR13( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x\n", val);
+ printf("\t0x%08x\n", val);
FLAG(val, 30, "clipping enable");
BITS(val, 25, 24, "color depth (3==32bpp)");
BITS(val, 23, 16, "raster op");
@@ -384,11 +382,11 @@ static void BR2223( struct debug_stream *stream,
BR22.val = val22;
BR23.val = val23;
- PRINTF("\t0x%08x\n", val22);
+ printf("\t0x%08x\n", val22);
BITS(val22, 31, 16, "dest y1");
BITS(val22, 15, 0, "dest x1");
- PRINTF("\t0x%08x\n", val23);
+ printf("\t0x%08x\n", val23);
BITS(val23, 31, 16, "dest y2");
BITS(val23, 15, 0, "dest x2");
@@ -400,13 +398,13 @@ static void BR2223( struct debug_stream *stream,
static void BR09( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x -- dest address\n", val);
+ printf("\t0x%08x -- dest address\n", val);
}
static void BR26( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x\n", val);
+ printf("\t0x%08x\n", val);
BITS(val, 31, 16, "src y1");
BITS(val, 15, 0, "src x1");
}
@@ -414,20 +412,20 @@ static void BR26( struct debug_stream *stream,
static void BR11( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x\n", val);
+ printf("\t0x%08x\n", val);
BITS(val, 15, 0, "src pitch");
}
static void BR12( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x -- src address\n", val);
+ printf("\t0x%08x -- src address\n", val);
}
static void BR16( struct debug_stream *stream,
GLuint val )
{
- PRINTF("\t0x%08x -- color\n", val);
+ printf("\t0x%08x -- color\n", val);
}
static GLboolean debug_copy_blit( struct debug_stream *stream,
@@ -437,8 +435,8 @@ static GLboolean debug_copy_blit( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
BR13(stream, ptr[j++]);
BR2223(stream, ptr[j], ptr[j+1]);
@@ -460,8 +458,8 @@ static GLboolean debug_color_blit( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
BR13(stream, ptr[j++]);
BR2223(stream, ptr[j], ptr[j+1]);
@@ -481,8 +479,8 @@ static GLboolean debug_modes4( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j]);
BITS(ptr[j], 21, 18, "logicop func");
FLAG(ptr[j], 17, "stencil test mask modify-enable");
FLAG(ptr[j], 16, "stencil write mask modify-enable");
@@ -502,26 +500,26 @@ static GLboolean debug_map_state( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
{
- PRINTF("\t0x%08x\n", ptr[j]);
+ printf("\t0x%08x\n", ptr[j]);
BITS(ptr[j], 15, 0, "map mask");
j++;
}
while (j < len) {
{
- PRINTF("\t TMn.0: 0x%08x\n", ptr[j]);
- PRINTF("\t map address: 0x%08x\n", (ptr[j] & ~0x3));
+ printf("\t TMn.0: 0x%08x\n", ptr[j]);
+ printf("\t map address: 0x%08x\n", (ptr[j] & ~0x3));
FLAG(ptr[j], 1, "vertical line stride");
FLAG(ptr[j], 0, "vertical line stride offset");
j++;
}
{
- PRINTF("\t TMn.1: 0x%08x\n", ptr[j]);
+ printf("\t TMn.1: 0x%08x\n", ptr[j]);
BITS(ptr[j], 31, 21, "height");
BITS(ptr[j], 20, 10, "width");
BITS(ptr[j], 9, 7, "surface format");
@@ -532,7 +530,7 @@ static GLboolean debug_map_state( struct debug_stream *stream,
j++;
}
{
- PRINTF("\t TMn.2: 0x%08x\n", ptr[j]);
+ printf("\t TMn.2: 0x%08x\n", ptr[j]);
BITS(ptr[j], 31, 21, "dword pitch");
BITS(ptr[j], 20, 15, "cube face enables");
BITS(ptr[j], 14, 9, "max lod");
@@ -554,18 +552,18 @@ static GLboolean debug_sampler_state( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
{
- PRINTF("\t0x%08x\n", ptr[j]);
+ printf("\t0x%08x\n", ptr[j]);
BITS(ptr[j], 15, 0, "sampler mask");
j++;
}
while (j < len) {
{
- PRINTF("\t TSn.0: 0x%08x\n", ptr[j]);
+ printf("\t TSn.0: 0x%08x\n", ptr[j]);
FLAG(ptr[j], 31, "reverse gamma");
FLAG(ptr[j], 30, "planar to packed");
FLAG(ptr[j], 29, "yuv->rgb");
@@ -582,7 +580,7 @@ static GLboolean debug_sampler_state( struct debug_stream *stream,
}
{
- PRINTF("\t TSn.1: 0x%08x\n", ptr[j]);
+ printf("\t TSn.1: 0x%08x\n", ptr[j]);
BITS(ptr[j], 31, 24, "min lod");
MBZ( ptr[j], 23, 18 );
FLAG(ptr[j], 17, "kill pixel enable");
@@ -597,7 +595,7 @@ static GLboolean debug_sampler_state( struct debug_stream *stream,
j++;
}
{
- PRINTF("\t TSn.2: 0x%08x (default color)\n", ptr[j]);
+ printf("\t TSn.2: 0x%08x (default color)\n", ptr[j]);
j++;
}
}
@@ -614,11 +612,11 @@ static GLboolean debug_dest_vars( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
{
- PRINTF("\t0x%08x\n", ptr[j]);
+ printf("\t0x%08x\n", ptr[j]);
FLAG(ptr[j], 31, "early classic ztest");
FLAG(ptr[j], 30, "opengl tex default color");
FLAG(ptr[j], 29, "bypass iz");
@@ -649,11 +647,11 @@ static GLboolean debug_buf_info( struct debug_stream *stream,
GLuint *ptr = (GLuint *)(stream->ptr + stream->offset);
int j = 0;
- PRINTF("%s (%d dwords):\n", name, len);
- PRINTF("\t0x%08x\n", ptr[j++]);
+ printf("%s (%d dwords):\n", name, len);
+ printf("\t0x%08x\n", ptr[j++]);
{
- PRINTF("\t0x%08x\n", ptr[j]);
+ printf("\t0x%08x\n", ptr[j]);
BITS(ptr[j], 28, 28, "aux buffer id");
BITS(ptr[j], 27, 24, "buffer id (7=depth, 3=back)");
FLAG(ptr[j], 23, "use fence regs");
@@ -665,7 +663,7 @@ static GLboolean debug_buf_info( struct debug_stream *stream,
j++;
}
- PRINTF("\t0x%08x -- buffer base address\n", ptr[j++]);
+ printf("\t0x%08x -- buffer base address\n", ptr[j++]);
stream->offset += len * sizeof(GLuint);
assert(j == len);
@@ -826,7 +824,7 @@ i915_dump_batchbuffer( GLuint *start,
GLuint bytes = (end - start) * 4;
GLboolean done = GL_FALSE;
- PRINTF("\n\nBATCH: (%d)\n", bytes / 4);
+ printf("\n\nBATCH: (%d)\n", bytes / 4);
stream.offset = 0;
stream.ptr = (char *)start;
@@ -843,7 +841,7 @@ i915_dump_batchbuffer( GLuint *start,
stream.offset >= 0);
}
- PRINTF("END-BATCH\n\n\n");
+ printf("END-BATCH\n\n\n");
}
diff --git a/src/mesa/drivers/dri/i915/i915_debug_fp.c b/src/mesa/drivers/dri/i915/i915_debug_fp.c
index bf500e54fa2..adfc9e89454 100644
--- a/src/mesa/drivers/dri/i915/i915_debug_fp.c
+++ b/src/mesa/drivers/dri/i915/i915_debug_fp.c
@@ -31,8 +31,6 @@
#include "i915_debug.h"
#include "main/imports.h"
-#define PRINTF( ... ) _mesa_printf( __VA_ARGS__ )
-
static const char *opcodes[0x20] = {
"NOP",
"ADD",
@@ -123,27 +121,27 @@ print_reg_type_nr(GLuint type, GLuint nr)
case REG_TYPE_T:
switch (nr) {
case T_DIFFUSE:
- PRINTF("T_DIFFUSE");
+ printf("T_DIFFUSE");
return;
case T_SPECULAR:
- PRINTF("T_SPECULAR");
+ printf("T_SPECULAR");
return;
case T_FOG_W:
- PRINTF("T_FOG_W");
+ printf("T_FOG_W");
return;
default:
- PRINTF("T_TEX%d", nr);
+ printf("T_TEX%d", nr);
return;
}
case REG_TYPE_OC:
if (nr == 0) {
- PRINTF("oC");
+ printf("oC");
return;
}
break;
case REG_TYPE_OD:
if (nr == 0) {
- PRINTF("oD");
+ printf("oD");
return;
}
break;
@@ -151,7 +149,7 @@ print_reg_type_nr(GLuint type, GLuint nr)
break;
}
- PRINTF("%s[%d]", regname[type], nr);
+ printf("%s[%d]", regname[type], nr);
}
#define REG_SWIZZLE_MASK 0x7777
@@ -172,33 +170,33 @@ print_reg_neg_swizzle(GLuint reg)
(reg & REG_NEGATE_MASK) == 0)
return;
- PRINTF(".");
+ printf(".");
for (i = 3; i >= 0; i--) {
if (reg & (1 << ((i * 4) + 3)))
- PRINTF("-");
+ printf("-");
switch ((reg >> (i * 4)) & 0x7) {
case 0:
- PRINTF("x");
+ printf("x");
break;
case 1:
- PRINTF("y");
+ printf("y");
break;
case 2:
- PRINTF("z");
+ printf("z");
break;
case 3:
- PRINTF("w");
+ printf("w");
break;
case 4:
- PRINTF("0");
+ printf("0");
break;
case 5:
- PRINTF("1");
+ printf("1");
break;
default:
- PRINTF("?");
+ printf("?");
break;
}
}
@@ -223,15 +221,15 @@ print_dest_reg(GLuint dword)
print_reg_type_nr(type, nr);
if ((dword & A0_DEST_CHANNEL_ALL) == A0_DEST_CHANNEL_ALL)
return;
- PRINTF(".");
+ printf(".");
if (dword & A0_DEST_CHANNEL_X)
- PRINTF("x");
+ printf("x");
if (dword & A0_DEST_CHANNEL_Y)
- PRINTF("y");
+ printf("y");
if (dword & A0_DEST_CHANNEL_Z)
- PRINTF("z");
+ printf("z");
if (dword & A0_DEST_CHANNEL_W)
- PRINTF("w");
+ printf("w");
}
@@ -246,29 +244,29 @@ print_arith_op(GLuint opcode, const GLuint * program)
if (opcode != A0_NOP) {
print_dest_reg(program[0]);
if (program[0] & A0_DEST_SATURATE)
- PRINTF(" = SATURATE ");
+ printf(" = SATURATE ");
else
- PRINTF(" = ");
+ printf(" = ");
}
- PRINTF("%s ", opcodes[opcode]);
+ printf("%s ", opcodes[opcode]);
print_src_reg(GET_SRC0_REG(program[0], program[1]));
if (args[opcode] == 1) {
- PRINTF("\n");
+ printf("\n");
return;
}
- PRINTF(", ");
+ printf(", ");
print_src_reg(GET_SRC1_REG(program[1], program[2]));
if (args[opcode] == 2) {
- PRINTF("\n");
+ printf("\n");
return;
}
- PRINTF(", ");
+ printf(", ");
print_src_reg(GET_SRC2_REG(program[2]));
- PRINTF("\n");
+ printf("\n");
return;
}
@@ -277,24 +275,24 @@ static void
print_tex_op(GLuint opcode, const GLuint * program)
{
print_dest_reg(program[0] | A0_DEST_CHANNEL_ALL);
- PRINTF(" = ");
+ printf(" = ");
- PRINTF("%s ", opcodes[opcode]);
+ printf("%s ", opcodes[opcode]);
- PRINTF("S[%d],", program[0] & T0_SAMPLER_NR_MASK);
+ printf("S[%d],", program[0] & T0_SAMPLER_NR_MASK);
print_reg_type_nr((program[1] >> T1_ADDRESS_REG_TYPE_SHIFT) &
REG_TYPE_MASK,
(program[1] >> T1_ADDRESS_REG_NR_SHIFT) & REG_NR_MASK);
- PRINTF("\n");
+ printf("\n");
}
static void
print_dcl_op(GLuint opcode, const GLuint * program)
{
- PRINTF("%s ", opcodes[opcode]);
+ printf("%s ", opcodes[opcode]);
print_dest_reg(program[0] | A0_DEST_CHANNEL_ALL);
- PRINTF("\n");
+ printf("\n");
}
@@ -304,7 +302,7 @@ i915_disassemble_program(const GLuint * program, GLuint sz)
GLuint size = program[0] & 0x1ff;
GLint i;
- PRINTF("\t\tBEGIN\n");
+ printf("\t\tBEGIN\n");
assert(size + 2 == sz);
@@ -312,7 +310,7 @@ i915_disassemble_program(const GLuint * program, GLuint sz)
for (i = 1; i < sz; i += 3, program += 3) {
GLuint opcode = program[0] & (0x1f << 24);
- PRINTF("\t\t");
+ printf("\t\t");
if ((GLint) opcode >= A0_NOP && opcode <= A0_SLT)
print_arith_op(opcode >> 24, program);
@@ -321,10 +319,10 @@ i915_disassemble_program(const GLuint * program, GLuint sz)
else if (opcode == D0_DCL)
print_dcl_op(opcode >> 24, program);
else
- PRINTF("Unknown opcode 0x%x\n", opcode);
+ printf("Unknown opcode 0x%x\n", opcode);
}
- PRINTF("\t\tEND\n\n");
+ printf("\t\tEND\n\n");
}
diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c
index d9588e5b56d..fe3908f580a 100644
--- a/src/mesa/drivers/dri/i915/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c
@@ -145,8 +145,8 @@ i915_miptree_layout_cube(struct intel_context *intel,
intel_miptree_set_image_offset(mt, level, face, x, y);
if (d == 0)
- _mesa_printf("cube mipmap %d/%d (%d..%d) is 0x0\n",
- face, level, mt->first_level, mt->last_level);
+ printf("cube mipmap %d/%d (%d..%d) is 0x0\n",
+ face, level, mt->first_level, mt->last_level);
d >>= 1;
x += step_offsets[face][0] * d;
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 6d498c56542..3816adae942 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -66,7 +66,7 @@ intel_flush_inline_primitive(struct intel_context *intel)
assert(intel->prim.primitive != ~0);
-/* _mesa_printf("/\n"); */
+/* printf("/\n"); */
if (used < 8)
goto do_discard;
@@ -93,7 +93,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim)
intel->no_batch_wrap = GL_TRUE;
- /*_mesa_printf("%s *", __progname);*/
+ /*printf("%s *", __progname);*/
/* Emit a slot which will be filled with the inline primitive
* command later.
@@ -111,7 +111,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim)
ADVANCE_BATCH();
intel->no_batch_wrap = GL_FALSE;
-/* _mesa_printf(">"); */
+/* printf(">"); */
}
static void intel_wrap_inline(struct intel_context *intel)
@@ -133,7 +133,7 @@ static GLuint *intel_extend_inline(struct intel_context *intel, GLuint dwords)
if (intel_batchbuffer_space(intel->batch) < sz)
intel_wrap_inline(intel);
-/* _mesa_printf("."); */
+/* printf("."); */
intel->vtbl.assert_not_dirty(intel);