summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i965simple
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i965simple')
-rw-r--r--src/mesa/pipe/i965simple/brw_cc.c2
-rw-r--r--src/mesa/pipe/i965simple/brw_curbe.c6
-rw-r--r--src/mesa/pipe/i965simple/brw_eu_debug.c10
-rw-r--r--src/mesa/pipe/i965simple/brw_eu_emit.c4
-rw-r--r--src/mesa/pipe/i965simple/brw_sf.c8
-rw-r--r--src/mesa/pipe/i965simple/brw_sf_emit.c14
-rw-r--r--src/mesa/pipe/i965simple/brw_state.c2
-rw-r--r--src/mesa/pipe/i965simple/brw_state_cache.c6
-rw-r--r--src/mesa/pipe/i965simple/brw_state_pool.c4
-rw-r--r--src/mesa/pipe/i965simple/brw_urb.c6
-rw-r--r--src/mesa/pipe/i965simple/brw_vs_emit.c2
-rw-r--r--src/mesa/pipe/i965simple/brw_wm.c2
-rw-r--r--src/mesa/pipe/i965simple/brw_wm_glsl.c2
-rw-r--r--src/mesa/pipe/i965simple/brw_wm_sampler_state.c2
14 files changed, 36 insertions, 34 deletions
diff --git a/src/mesa/pipe/i965simple/brw_cc.c b/src/mesa/pipe/i965simple/brw_cc.c
index dcee731895..337e4f95f6 100644
--- a/src/mesa/pipe/i965simple/brw_cc.c
+++ b/src/mesa/pipe/i965simple/brw_cc.c
@@ -58,7 +58,7 @@ static int brw_translate_compare_func(int func)
return BRW_COMPAREFUNCTION_ALWAYS;
}
- fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func);
+ debug_printf("Unknown value in %s: %x\n", __FUNCTION__, func);
return BRW_COMPAREFUNCTION_ALWAYS;
}
diff --git a/src/mesa/pipe/i965simple/brw_curbe.c b/src/mesa/pipe/i965simple/brw_curbe.c
index 2733eb4e75..52bbd525c1 100644
--- a/src/mesa/pipe/i965simple/brw_curbe.c
+++ b/src/mesa/pipe/i965simple/brw_curbe.c
@@ -273,10 +273,10 @@ static void upload_constant_buffer(struct brw_context *brw)
if (1) {
for (i = 0; i < sz; i+=4)
- _mesa_printf("curbe %d.%d: %f %f %f %f\n", i/8, i&4,
+ debug_printf("curbe %d.%d: %f %f %f %f\n", i/8, i&4,
buf[i+0], buf[i+1], buf[i+2], buf[i+3]);
- _mesa_printf("last_buf %p buf %p sz %d/%d cmp %d\n",
+ debug_printf("last_buf %p buf %p sz %d/%d cmp %d\n",
brw->curbe.last_buf, buf,
bufsz, brw->curbe.last_bufsz,
brw->curbe.last_buf ? memcmp(buf, brw->curbe.last_buf, bufsz) : -1);
@@ -299,7 +299,7 @@ static void upload_constant_buffer(struct brw_context *brw)
bufsz,
1 << 6,
&brw->curbe.gs_offset)) {
- _mesa_printf("out of GS memory for curbe\n");
+ debug_printf("out of GS memory for curbe\n");
assert(0);
return;
}
diff --git a/src/mesa/pipe/i965simple/brw_eu_debug.c b/src/mesa/pipe/i965simple/brw_eu_debug.c
index be692f6502..4a94ddefa6 100644
--- a/src/mesa/pipe/i965simple/brw_eu_debug.c
+++ b/src/mesa/pipe/i965simple/brw_eu_debug.c
@@ -30,6 +30,8 @@
*/
+#include "pipe/p_debug.h"
+
#include "brw_eu.h"
void brw_print_reg( struct brw_reg hwreg )
@@ -52,7 +54,7 @@ void brw_print_reg( struct brw_reg hwreg )
"f"
};
- _mesa_printf("%s%s",
+ debug_printf("%s%s",
hwreg.abs ? "abs/" : "",
hwreg.negate ? "-" : "");
@@ -63,17 +65,17 @@ void brw_print_reg( struct brw_reg hwreg )
hwreg.width == BRW_WIDTH_8 &&
hwreg.hstride == BRW_HORIZONTAL_STRIDE_1 &&
hwreg.type == BRW_REGISTER_TYPE_F) {
- _mesa_printf("vec%d", hwreg.nr);
+ debug_printf("vec%d", hwreg.nr);
}
else if (hwreg.file == BRW_GENERAL_REGISTER_FILE &&
hwreg.vstride == BRW_VERTICAL_STRIDE_0 &&
hwreg.width == BRW_WIDTH_1 &&
hwreg.hstride == BRW_HORIZONTAL_STRIDE_0 &&
hwreg.type == BRW_REGISTER_TYPE_F) {
- _mesa_printf("scl%d.%d", hwreg.nr, hwreg.subnr / 4);
+ debug_printf("scl%d.%d", hwreg.nr, hwreg.subnr / 4);
}
else {
- _mesa_printf("%s%d.%d<%d;%d,%d>:%s",
+ debug_printf("%s%d.%d<%d;%d,%d>:%s",
file[hwreg.file],
hwreg.nr,
hwreg.subnr / type_sz(hwreg.type),
diff --git a/src/mesa/pipe/i965simple/brw_eu_emit.c b/src/mesa/pipe/i965simple/brw_eu_emit.c
index 2423536dd1..400a80b6fb 100644
--- a/src/mesa/pipe/i965simple/brw_eu_emit.c
+++ b/src/mesa/pipe/i965simple/brw_eu_emit.c
@@ -953,7 +953,7 @@ void brw_SAMPLE(struct brw_compile *p,
boolean need_stall = 0;
if(writemask == 0) {
-/* _mesa_printf("%s: zero writemask??\n", __FUNCTION__); */
+/* debug_printf("%s: zero writemask??\n", __FUNCTION__); */
return;
}
@@ -985,7 +985,7 @@ void brw_SAMPLE(struct brw_compile *p,
if (newmask != writemask) {
need_stall = 1;
-/* _mesa_printf("need stall %x %x\n", newmask , writemask); */
+/* debug_printf("need stall %x %x\n", newmask , writemask); */
}
else {
struct brw_reg m1 = brw_message_reg(msg_reg_nr);
diff --git a/src/mesa/pipe/i965simple/brw_sf.c b/src/mesa/pipe/i965simple/brw_sf.c
index b89b2e4087..7c83b81c85 100644
--- a/src/mesa/pipe/i965simple/brw_sf.c
+++ b/src/mesa/pipe/i965simple/brw_sf.c
@@ -175,7 +175,7 @@ static void upload_sf_prog( struct brw_context *brw )
//int semantic = parse.FullToken.FullDeclaration.Semantic.SemanticName;
//int semantic_index = parse.FullToken.FullDeclaration.Semantic.SemanticIndex;
- fprintf(stderr, "fs input %d..%d interp mode %d\n", first, last, interp_mode);
+ debug_printf("fs input %d..%d interp mode %d\n", first, last, interp_mode);
switch (interp_mode) {
case TGSI_INTERPOLATE_CONSTANT:
@@ -213,9 +213,9 @@ static void upload_sf_prog( struct brw_context *brw )
key.linear_mask |= 1;
key.const_mask <<= 1;
- fprintf(stderr, "key.persp_mask: %x\n", key.persp_mask);
- fprintf(stderr, "key.linear_mask: %x\n", key.linear_mask);
- fprintf(stderr, "key.const_mask: %x\n", key.const_mask);
+ debug_printf("key.persp_mask: %x\n", key.persp_mask);
+ debug_printf("key.linear_mask: %x\n", key.linear_mask);
+ debug_printf("key.const_mask: %x\n", key.const_mask);
// key.do_point_sprite = brw->attribs.Point->PointSprite;
diff --git a/src/mesa/pipe/i965simple/brw_sf_emit.c b/src/mesa/pipe/i965simple/brw_sf_emit.c
index 6ff5254ff7..78d6fa5e9e 100644
--- a/src/mesa/pipe/i965simple/brw_sf_emit.c
+++ b/src/mesa/pipe/i965simple/brw_sf_emit.c
@@ -137,8 +137,8 @@ static boolean calculate_masks( struct brw_sf_compile *c,
unsigned persp_mask = c->key.persp_mask;
unsigned linear_mask = c->key.linear_mask;
- fprintf(stderr, "persp_mask: %x\n", persp_mask);
- fprintf(stderr, "linear_mask: %x\n", linear_mask);
+ debug_printf("persp_mask: %x\n", persp_mask);
+ debug_printf("linear_mask: %x\n", linear_mask);
*pc_persp = 0;
*pc_linear = 0;
@@ -162,9 +162,9 @@ static boolean calculate_masks( struct brw_sf_compile *c,
*pc_linear |= 0xf0;
}
- fprintf(stderr, "pc: %x\n", *pc);
- fprintf(stderr, "pc_persp: %x\n", *pc_persp);
- fprintf(stderr, "pc_linear: %x\n", *pc_linear);
+ debug_printf("pc: %x\n", *pc);
+ debug_printf("pc_persp: %x\n", *pc_persp);
+ debug_printf("pc_linear: %x\n", *pc_linear);
return is_last_attr;
@@ -177,7 +177,7 @@ void brw_emit_tri_setup( struct brw_sf_compile *c )
struct brw_compile *p = &c->func;
unsigned i;
- fprintf(stderr, "%s START ==============\n", __FUNCTION__);
+ debug_printf("%s START ==============\n", __FUNCTION__);
c->nr_verts = 3;
alloc_regs(c);
@@ -250,7 +250,7 @@ void brw_emit_tri_setup( struct brw_sf_compile *c )
}
}
- fprintf(stderr, "%s DONE ==============\n", __FUNCTION__);
+ debug_printf("%s DONE ==============\n", __FUNCTION__);
}
diff --git a/src/mesa/pipe/i965simple/brw_state.c b/src/mesa/pipe/i965simple/brw_state.c
index daf14ff4ff..95dfce88e4 100644
--- a/src/mesa/pipe/i965simple/brw_state.c
+++ b/src/mesa/pipe/i965simple/brw_state.c
@@ -225,7 +225,7 @@ static void brw_bind_vs_state(struct pipe_context *pipe, void *vs)
brw->attribs.VertexProgram = (struct brw_vertex_program *)vs;
brw->state.dirty.brw |= BRW_NEW_VS;
- printf("YYYYYYYYYYYYY BINDING VERTEX SHADER\n");
+ debug_printf("YYYYYYYYYYYYY BINDING VERTEX SHADER\n");
}
static void brw_delete_vs_state(struct pipe_context *pipe, void *shader)
diff --git a/src/mesa/pipe/i965simple/brw_state_cache.c b/src/mesa/pipe/i965simple/brw_state_cache.c
index c5738733f4..b3a5124461 100644
--- a/src/mesa/pipe/i965simple/brw_state_cache.c
+++ b/src/mesa/pipe/i965simple/brw_state_cache.c
@@ -149,7 +149,7 @@ unsigned brw_upload_cache( struct brw_cache *cache,
if (!brw_pool_alloc(cache->pool, data_size, 1 << 6, &offset)) {
/* Should not be possible:
*/
- printf("brw_pool_alloc failed\n");
+ debug_printf("brw_pool_alloc failed\n");
exit(1);
}
@@ -177,7 +177,7 @@ unsigned brw_upload_cache( struct brw_cache *cache,
}
if (BRW_DEBUG & DEBUG_STATE)
- printf("upload %s: %d bytes to pool buffer %p offset %x\n",
+ debug_printf("upload %s: %d bytes to pool buffer %p offset %x\n",
cache->name,
data_size,
(void*)cache->pool->buffer,
@@ -416,7 +416,7 @@ void brw_clear_all_caches( struct brw_context *brw )
int i;
if (BRW_DEBUG & DEBUG_STATE)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ debug_printf("%s\n", __FUNCTION__);
for (i = 0; i < BRW_MAX_CACHE; i++)
clear_cache(&brw->cache[i]);
diff --git a/src/mesa/pipe/i965simple/brw_state_pool.c b/src/mesa/pipe/i965simple/brw_state_pool.c
index 7c67f0ee25..f3174bfe0a 100644
--- a/src/mesa/pipe/i965simple/brw_state_pool.c
+++ b/src/mesa/pipe/i965simple/brw_state_pool.c
@@ -58,7 +58,7 @@ boolean brw_pool_alloc( struct brw_mem_pool *pool,
size = align(size, 4);
if (pool->offset + fixup + size >= pool->size) {
- printf("%s failed\n", __FUNCTION__);
+ debug_printf("%s failed\n", __FUNCTION__);
assert(0);
exit(0);
}
@@ -74,7 +74,7 @@ static
void brw_invalidate_pool( struct brw_mem_pool *pool )
{
if (BRW_DEBUG & DEBUG_STATE)
- printf("\n\n\n %s \n\n\n", __FUNCTION__);
+ debug_printf("\n\n\n %s \n\n\n", __FUNCTION__);
pool->offset = 0;
diff --git a/src/mesa/pipe/i965simple/brw_urb.c b/src/mesa/pipe/i965simple/brw_urb.c
index b284526aa6..101a4367b9 100644
--- a/src/mesa/pipe/i965simple/brw_urb.c
+++ b/src/mesa/pipe/i965simple/brw_urb.c
@@ -120,18 +120,18 @@ static void recalculate_urb_fence( struct brw_context *brw )
* entries and the values for minimum nr of entries
* provided above.
*/
- fprintf(stderr, "couldn't calculate URB layout!\n");
+ debug_printf("couldn't calculate URB layout!\n");
exit(1);
}
if (BRW_DEBUG & (DEBUG_URB|DEBUG_FALLBACKS))
- printf("URB CONSTRAINED\n");
+ debug_printf("URB CONSTRAINED\n");
}
else
brw->urb.constrained = 0;
if (BRW_DEBUG & DEBUG_URB)
- printf("URB fence: %d ..VS.. %d ..GS.. %d ..CLP.. %d ..SF.. %d ..CS.. %d\n",
+ debug_printf("URB fence: %d ..VS.. %d ..GS.. %d ..CLP.. %d ..SF.. %d ..CS.. %d\n",
brw->urb.vs_start,
brw->urb.gs_start,
brw->urb.clip_start,
diff --git a/src/mesa/pipe/i965simple/brw_vs_emit.c b/src/mesa/pipe/i965simple/brw_vs_emit.c
index b32c233dd2..98915ba101 100644
--- a/src/mesa/pipe/i965simple/brw_vs_emit.c
+++ b/src/mesa/pipe/i965simple/brw_vs_emit.c
@@ -1228,7 +1228,7 @@ static void process_instruction(struct brw_vs_compile *c,
case TGSI_OPCODE_ENDSUB:
break;
default:
- printf("Unsupport opcode %d in vertex shader\n", inst->Instruction.Opcode);
+ debug_printf("Unsupport opcode %d in vertex shader\n", inst->Instruction.Opcode);
break;
}
diff --git a/src/mesa/pipe/i965simple/brw_wm.c b/src/mesa/pipe/i965simple/brw_wm.c
index 0ee0fbed51..539b170744 100644
--- a/src/mesa/pipe/i965simple/brw_wm.c
+++ b/src/mesa/pipe/i965simple/brw_wm.c
@@ -57,7 +57,7 @@ static void do_wm_prog( struct brw_context *brw,
c->pixel_w = brw_null_reg();
- fprintf(stderr, "XXXXXXXX FP\n");
+ debug_printf("XXXXXXXX FP\n");
brw_wm_glsl_emit(c);
diff --git a/src/mesa/pipe/i965simple/brw_wm_glsl.c b/src/mesa/pipe/i965simple/brw_wm_glsl.c
index f4b5c13c06..d95645d108 100644
--- a/src/mesa/pipe/i965simple/brw_wm_glsl.c
+++ b/src/mesa/pipe/i965simple/brw_wm_glsl.c
@@ -982,7 +982,7 @@ static void brw_wm_emit_instruction( struct brw_wm_compile *c,
break;
default:
- _mesa_printf("unsupported IR in fragment shader %d\n",
+ debug_printf("unsupported IR in fragment shader %d\n",
inst->Instruction.Opcode);
}
#if 0
diff --git a/src/mesa/pipe/i965simple/brw_wm_sampler_state.c b/src/mesa/pipe/i965simple/brw_wm_sampler_state.c
index cfb430eb09..de42ffc5b1 100644
--- a/src/mesa/pipe/i965simple/brw_wm_sampler_state.c
+++ b/src/mesa/pipe/i965simple/brw_wm_sampler_state.c
@@ -71,7 +71,7 @@ static int intel_translate_shadow_compare_func(unsigned func)
return COMPAREFUNC_NEVER;
}
- fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func);
+ debug_printf("Unknown value in %s: %x\n", __FUNCTION__, func);
return COMPAREFUNC_NEVER;
}