From 012e990160edcd0f233b43a39f6efdd34a6ca194 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Sun, 30 Aug 2009 23:39:15 +0300 Subject: r300: Convert to shared debug code. --- src/mesa/drivers/dri/r300/Makefile | 13 ++++----- src/mesa/drivers/dri/r300/r300_cmdbuf.c | 4 +-- src/mesa/drivers/dri/r300/r300_draw.c | 34 +++++++++++++++++------- src/mesa/drivers/dri/r300/r300_fragprog_common.c | 2 +- src/mesa/drivers/dri/r300/r300_ioctl.c | 6 ++--- src/mesa/drivers/dri/r300/r300_render.c | 4 +-- src/mesa/drivers/dri/r300/r300_state.c | 10 +++---- src/mesa/drivers/dri/r300/r300_swtcl.c | 34 ++++++++++++------------ src/mesa/drivers/dri/r300/r300_tex.c | 8 +++--- src/mesa/drivers/dri/r300/r300_vertprog.c | 2 +- 10 files changed, 66 insertions(+), 51 deletions(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/r300/Makefile b/src/mesa/drivers/dri/r300/Makefile index 188efcb7a0..5d8d6f6658 100644 --- a/src/mesa/drivers/dri/r300/Makefile +++ b/src/mesa/drivers/dri/r300/Makefile @@ -27,18 +27,19 @@ COMMON_SOURCES = \ ../common/dri_util.c RADEON_COMMON_SOURCES = \ - radeon_texture.c \ + radeon_bo_legacy.c \ + radeon_buffer_objects.c \ radeon_common_context.c \ radeon_common.c \ + radeon_cs_legacy.c \ radeon_dma.c \ + radeon_debug.c \ + radeon_fbo.c \ radeon_lock.c \ - radeon_bo_legacy.c \ - radeon_cs_legacy.c \ radeon_mipmap_tree.c \ radeon_span.c \ - radeon_fbo.c \ - radeon_buffer_objects.c \ - radeon_queryobj.c + radeon_queryobj.c \ + radeon_texture.c DRIVER_SOURCES = \ radeon_screen.c \ diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 451f1fd0fa..0fe32a5443 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -274,7 +274,7 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom) return; } - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr,"rrb is %p %d %dx%d\n", rrb, offset, rrb->base.Width, rrb->base.Height); cbpitch = (rrb->pitch / rrb->cpp); if (rrb->cpp == 4) @@ -494,7 +494,7 @@ void r300InitCmdBuf(r300ContextPtr r300) r300->radeon.hw.max_state_size = 2 + 2; /* reserve extra space for WAIT_IDLE and tex cache flush */ mtu = r300->radeon.glCtx->Const.MaxTextureUnits; - if (RADEON_DEBUG & DEBUG_TEXTURE) { + if (RADEON_DEBUG & RADEON_TEXTURE) { fprintf(stderr, "Using %d maximum texture units..\n", mtu); } diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c index 2e475b1adf..e9968f9ffe 100644 --- a/src/mesa/drivers/dri/r300/r300_draw.c +++ b/src/mesa/drivers/dri/r300/r300_draw.c @@ -91,6 +91,10 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer } src_ptr = ADD_POINTERS(mesa_ind_buf->obj->Pointer, mesa_ind_buf->ptr); + radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, + "%s: Fixing index buffer format. type %d\n", + __func__, mesa_ind_buf->type); + if (mesa_ind_buf->type == GL_UNSIGNED_BYTE) { GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1); GLubyte *in = (GLubyte *)src_ptr; @@ -146,6 +150,7 @@ static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer r300->ind_buf.bo = NULL; return; } + radeon_print(RADEON_RENDER, RADEON_TRACE, "%s\n", __func__); #if MESA_BIG_ENDIAN if (mesa_ind_buf->type == GL_UNSIGNED_INT) { @@ -239,10 +244,11 @@ static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_ radeonAllocDmaRegion(&r300->radeon, &attr->bo, &attr->bo_offset, sizeof(GLfloat) * input->Size * count, 32); dst_ptr = (GLfloat *)ADD_POINTERS(attr->bo->ptr, attr->bo_offset); - if (RADEON_DEBUG & DEBUG_FALLBACKS) { - fprintf(stderr, "%s: Converting vertex attributes, attribute data format %x,", __FUNCTION__, input->Type); - fprintf(stderr, "stride %d, components %d\n", stride, input->Size); - } + radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, + "%s: Converting vertex attributes, attribute data format %x," + "stride %d, components %d\n" + , __FUNCTION__, input->Type + , stride, input->Size); assert(src_ptr != NULL); @@ -293,6 +299,8 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i mapped_named_bo = GL_TRUE; } + radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, "%s. Vertex alignment doesn't match hw requirements.\n", __func__); + { GLvoid *src_ptr = ADD_POINTERS(input->BufferObj->Pointer, input->Ptr); GLvoid *dst_ptr = ADD_POINTERS(attr->bo->ptr, attr->bo_offset); @@ -320,6 +328,7 @@ static void r300TranslateAttrib(GLcontext *ctx, GLuint attr, int count, const st GLenum type; GLuint stride; + radeon_print(RADEON_RENDER, RADEON_TRACE, "%s\n", __func__); stride = (input->StrideB == 0) ? getTypeSize(input->Type) * input->Size : input->StrideB; if (input->Type == GL_DOUBLE || input->Type == GL_UNSIGNED_INT || input->Type == GL_INT || @@ -442,6 +451,7 @@ static void r300SetVertexFormat(GLcontext *ctx, const struct gl_client_array *ar { r300ContextPtr r300 = R300_CONTEXT(ctx); struct r300_vertex_buffer *vbuf = &r300->vbuf; + radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s\n", __func__); { int i, tmp; @@ -474,6 +484,9 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in GLuint stride; int ret; int i, index; + radeon_print(RADEON_RENDER, RADEON_VERBOSE, + "%s: count %d num_attribs %d\n", + __func__, count, vbuf->num_attribs); for (index = 0; index < vbuf->num_attribs; index++) { struct radeon_aos *aos = &r300->radeon.tcl.aos[index]; @@ -550,6 +563,7 @@ static void r300FreeData(GLcontext *ctx) * to prevent double unref in radeonReleaseArrays * called during context destroy */ + radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s\n", __func__); r300ContextPtr r300 = R300_CONTEXT(ctx); { int i; @@ -592,8 +606,7 @@ static GLuint r300PredictTryDrawPrimsSize(GLcontext *ctx, GLuint nr_prims) else dwords += state_size; - if (RADEON_DEBUG & DEBUG_PRIMS) - fprintf(stderr, "%s: total prediction size is %d.\n", __FUNCTION__, dwords); + radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s: total prediction size is %d.\n", __FUNCTION__, dwords); return dwords; } @@ -608,8 +621,7 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx, struct r300_context *r300 = R300_CONTEXT(ctx); GLuint i; - if (RADEON_DEBUG & DEBUG_PRIMS) - fprintf(stderr, "%s: %u (%d-%d) cs begin at %d\n", + radeon_print(RADEON_RENDER, RADEON_NORMAL, "%s: %u (%d-%d) cs begin at %d\n", __FUNCTION__, nr_prims, min_index, max_index, r300->radeon.cmdbuf.cs->cdw ); if (ctx->NewState) @@ -654,8 +666,7 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx, r300FreeData(ctx); - if (RADEON_DEBUG & DEBUG_PRIMS) - fprintf(stderr, "%s: %u (%d-%d) cs ending at %d\n", + radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s: %u (%d-%d) cs ending at %d\n", __FUNCTION__, nr_prims, min_index, max_index, r300->radeon.cmdbuf.cs->cdw ); if (emit_end < r300->radeon.cmdbuf.cs->cdw) @@ -684,6 +695,9 @@ static void r300DrawPrims(GLcontext *ctx, } if (min_index) { + radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, + "%s: Rebasing primitives. %p nr_prims %d min_index %u max_index %u\n", + __func__, prim, nr_prims, min_index, max_index); vbo_rebase_prims( ctx, arrays, prim, nr_prims, ib, min_index, max_index, r300DrawPrims ); return; } diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index e1dc231027..469c278b51 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -202,7 +202,7 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog struct r300_fragment_program_compiler compiler; rc_init(&compiler.Base); - compiler.Base.Debug = (RADEON_DEBUG & DEBUG_PIXEL) ? GL_TRUE : GL_FALSE; + compiler.Base.Debug = (RADEON_DEBUG & RADEON_PIXEL) ? GL_TRUE : GL_FALSE; compiler.code = &fp->code; compiler.state = fp->state; diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 3303078e39..5cb04e2bb6 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -138,7 +138,7 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, GLuint cbpitch = 0; r300ContextPtr rmesa = r300; - if (RADEON_DEBUG & DEBUG_IOCTL) + if (RADEON_DEBUG & RADEON_IOCTL) fprintf(stderr, "%s: buffer %p (%i,%i %ix%i)\n", __FUNCTION__, rrb, dPriv->x, dPriv->y, dPriv->w, dPriv->h); @@ -705,7 +705,7 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask) int i, ret; struct gl_framebuffer *fb = ctx->DrawBuffer; - if (RADEON_DEBUG & DEBUG_IOCTL) + if (RADEON_DEBUG & RADEON_IOCTL) fprintf(stderr, "r300Clear\n"); if (!r300->radeon.radeonScreen->driScreen->dri2.enabled) { @@ -767,7 +767,7 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask) } if (swrast_mask) { - if (RADEON_DEBUG & DEBUG_FALLBACKS) + if (RADEON_DEBUG & RADEON_FALLBACKS) fprintf(stderr, "%s: swrast clear, mask: %x\n", __FUNCTION__, swrast_mask); _swrast_Clear(ctx, swrast_mask); diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index 446cf40131..b5ddfdc9f8 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -221,7 +221,7 @@ static void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset) int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2; int i; - if (RADEON_DEBUG & DEBUG_VERTS) + if (RADEON_DEBUG & RADEON_VERTS) fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr, offset); @@ -447,7 +447,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode) if (mode) { if ((fallback_warn & bit) == 0) { - if (RADEON_DEBUG & DEBUG_FALLBACKS) + if (RADEON_DEBUG & RADEON_FALLBACKS) _mesa_fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(bit)); fallback_warn |= bit; } diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 4fe9175b61..9301543d38 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1279,7 +1279,7 @@ static void r300SetupTextures(GLcontext * ctx) r300->hw.txe.cmd[R300_TXE_ENABLE] = 0x0; mtu = r300->radeon.glCtx->Const.MaxTextureUnits; - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr, "mtu=%d\n", mtu); if (mtu > R300_MAX_TEXTURE_UNITS) { @@ -1304,7 +1304,7 @@ static void r300SetupTextures(GLcontext * ctx) t->pp_txformat & 0xff); } - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr, "Activating texture unit %d\n", i); @@ -1390,7 +1390,7 @@ static void r300SetupTextures(GLcontext * ctx) r300->vtbl.SetupFragmentShaderTextures(ctx, tmu_mappings); - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr, "TX_ENABLE: %08x last_hw_tmu=%d\n", r300->hw.txe.cmd[R300_TXE_ENABLE], last_hw_tmu); } @@ -1660,7 +1660,7 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state) { r300ContextPtr rmesa = R300_CONTEXT(ctx); - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr, "%s( %s = %s )\n", __FUNCTION__, _mesa_lookup_enum_by_nr(cap), state ? "GL_TRUE" : "GL_FALSE"); @@ -1737,7 +1737,7 @@ static void r300ResetHwState(r300ContextPtr r300) has_tcl = r300->options.hw_tcl_enabled; - if (RADEON_DEBUG & DEBUG_STATE) + if (RADEON_DEBUG & RADEON_STATE) fprintf(stderr, "%s\n", __FUNCTION__); radeon_firevertices(&r300->radeon); diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c index b3793e28d5..ee2c71e1a7 100644 --- a/src/mesa/drivers/dri/r300/r300_swtcl.c +++ b/src/mesa/drivers/dri/r300/r300_swtcl.c @@ -80,10 +80,11 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_ GLuint fp_reads = rmesa->selected_fp->InputsRead; struct vertex_attribute *attrs = rmesa->vbuf.attribs; + radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__); rmesa->swtcl.coloroffset = rmesa->swtcl.specoffset = 0; rmesa->radeon.swtcl.vertex_attr_count = 0; - if (RADEON_DEBUG & DEBUG_VERTS) + if (RADEON_DEBUG & RADEON_VERTS) fprintf(stderr, "%s\n", __func__); /* We always want non Ndc coords format */ @@ -229,6 +230,7 @@ static void r300PrepareVertices(GLcontext *ctx) { r300ContextPtr rmesa = R300_CONTEXT(ctx); GLuint InputsRead, OutputsWritten; + radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__); r300ChooseSwtclVertexFormat(ctx, &InputsRead, &OutputsWritten); r300SetupVAP(ctx, InputsRead, OutputsWritten); @@ -262,6 +264,10 @@ static void r300_predict_emit_size( r300ContextPtr rmesa ) rmesa->radeon.swtcl.emit_prediction += rmesa->radeon.cmdbuf.cs->cdw + vertex_size + scissor_size + prim_size + cache_flush_size * 2 + pre_emit_state; + radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, + "%s, size %d\n", + __func__, rmesa->radeon.cmdbuf.cs->cdw + + vertex_size + scissor_size + prim_size + cache_flush_size * 2 + pre_emit_state); } } @@ -498,8 +504,7 @@ static void r300ChooseRenderState( GLcontext *ctx ) r300ContextPtr rmesa = R300_CONTEXT(ctx); GLuint index = 0; GLuint flags = ctx->_TriangleCaps; - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__); if (flags & DD_TRI_UNFILLED) index |= R300_UNFILLED_BIT; @@ -526,8 +531,7 @@ static void r300ChooseRenderState( GLcontext *ctx ) void r300RenderStart(GLcontext *ctx) { - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__); r300ContextPtr rmesa = R300_CONTEXT( ctx ); r300ChooseRenderState(ctx); @@ -554,8 +558,7 @@ void r300RenderFinish(GLcontext *ctx) static void r300RasterPrimitive( GLcontext *ctx, GLuint hwprim ) { r300ContextPtr rmesa = R300_CONTEXT(ctx); - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__); if (rmesa->radeon.swtcl.hw_primitive != hwprim) { R300_NEWPRIM( rmesa ); @@ -568,8 +571,7 @@ void r300RenderPrimitive(GLcontext *ctx, GLenum prim) r300ContextPtr rmesa = R300_CONTEXT(ctx); rmesa->radeon.swtcl.render_primitive = prim; - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__); if ((prim == GL_TRIANGLES) && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) return; @@ -579,7 +581,7 @@ void r300RenderPrimitive(GLcontext *ctx, GLenum prim) void r300ResetLineStipple(GLcontext *ctx) { - if (RADEON_DEBUG & DEBUG_VERTS) + if (RADEON_DEBUG & RADEON_VERTS) fprintf(stderr, "%s\n", __func__); } @@ -588,8 +590,7 @@ void r300InitSwtcl(GLcontext *ctx) TNLcontext *tnl = TNL_CONTEXT(ctx); r300ContextPtr rmesa = R300_CONTEXT(ctx); static int firsttime = 1; - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_NORMAL, "%s\n", __func__); if (firsttime) { init_rast_tab(); @@ -628,8 +629,8 @@ static void r300EmitVertexAOS(r300ContextPtr rmesa, GLuint vertex_size, struct r { BATCH_LOCALS(&rmesa->radeon); - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s: vertex_size %d, offset 0x%x \n", + radeon_print(RADEON_SWRENDER, RADEON_TRACE, + "%s: vertex_size %d, offset 0x%x \n", __FUNCTION__, vertex_size, offset); BEGIN_BATCH(7); @@ -644,7 +645,7 @@ static void r300EmitVbufPrim(r300ContextPtr rmesa, GLuint primitive, GLuint vert { BATCH_LOCALS(&rmesa->radeon); int type, num_verts; - if (RADEON_DEBUG & DEBUG_VERTS) + if (RADEON_DEBUG & RADEON_VERTS) fprintf(stderr, "%s\n", __func__); type = r300PrimitiveType(rmesa, primitive); @@ -658,8 +659,7 @@ static void r300EmitVbufPrim(r300ContextPtr rmesa, GLuint primitive, GLuint vert void r300_swtcl_flush(GLcontext *ctx, uint32_t current_offset) { - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s\n", __func__); + radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__); r300ContextPtr rmesa = R300_CONTEXT(ctx); r300EmitCacheFlush(rmesa); diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index 0af5bb4f46..433e5a87d4 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -137,7 +137,7 @@ static void r300SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa | R300_TX_MIN_FILTER_ANISO | R300_TX_MIN_FILTER_MIP_LINEAR | aniso_filter(anisotropy); - if (RADEON_DEBUG & DEBUG_TEXTURE) + if (RADEON_DEBUG & RADEON_TEXTURE) fprintf(stderr, "Using maximum anisotropy of %f\n", anisotropy); return; } @@ -197,7 +197,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target, { radeonTexObj* t = radeon_tex_obj(texObj); - if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) { + if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) { fprintf(stderr, "%s( %s )\n", __FUNCTION__, _mesa_lookup_enum_by_nr(pname)); } @@ -260,7 +260,7 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj) r300ContextPtr rmesa = R300_CONTEXT(ctx); radeonTexObj* t = radeon_tex_obj(texObj); - if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) { + if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) { fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj, _mesa_lookup_enum_by_nr(texObj->Target)); @@ -302,7 +302,7 @@ static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx, radeonTexObj* t = CALLOC_STRUCT(radeon_tex_obj); - if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) { + if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) { fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__, t, _mesa_lookup_enum_by_nr(target)); } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 9fe6c18f56..dd0f27f9cb 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -216,7 +216,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx, _mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key)); rc_init(&compiler.Base); - compiler.Base.Debug = (RADEON_DEBUG & DEBUG_VERTS) ? GL_TRUE : GL_FALSE; + compiler.Base.Debug = (RADEON_DEBUG & RADEON_VERTS) ? GL_TRUE : GL_FALSE; compiler.code = &vp->code; compiler.RequiredOutputs = compute_required_outputs(vp->Base, vp->key.FpReads); -- cgit v1.2.3