summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r600/r600_emit.c
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2009-08-30 22:08:38 +0300
committerPauli Nieminen <[email protected]>2009-08-31 20:27:49 +0300
commitaabb36fdd58ff891e3a0946e2326d458f5a4d832 (patch)
tree2adeec764f75b78bc6aa13c71c27e91741d69e8f /src/mesa/drivers/dri/r600/r600_emit.c
parentfe62e4c3ff13888a85274c23b88354777760401e (diff)
r600: Convert to shared debug code and add a few new debug messages.
There is only a few functions that have debugging enabled now.
Diffstat (limited to 'src/mesa/drivers/dri/r600/r600_emit.c')
-rw-r--r--src/mesa/drivers/dri/r600/r600_emit.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_emit.c b/src/mesa/drivers/dri/r600/r600_emit.c
index f8c56e7774b..5c250c2418a 100644
--- a/src/mesa/drivers/dri/r600/r600_emit.c
+++ b/src/mesa/drivers/dri/r600/r600_emit.c
@@ -60,28 +60,30 @@ GLboolean r600EmitShader(GLcontext * ctx,
radeonContextPtr radeonctx = RADEON_CONTEXT(ctx);
struct radeon_bo * pbo;
uint32_t *out;
-
shader_again_alloc:
pbo = radeon_bo_open(radeonctx->radeonScreen->bom,
- 0,
- sizeinDWORD * 4,
- 256,
- RADEON_GEM_DOMAIN_GTT,
- 0);
+ 0,
+ sizeinDWORD * 4,
+ 256,
+ RADEON_GEM_DOMAIN_GTT,
+ 0);
+
+ radeon_print(RADEON_SHADER, RADEON_NORMAL, "%s %p size %d: %s\n", __func__, pbo, sizeinDWORD, szShaderUsage);
if (!pbo) {
+ radeon_print(RADEON_MEMORY | RADEON_CS, RADEON_IMPORTANT, "No memory for buffer object. Flushing command buffer.\n");
rcommonFlushCmdBuf(radeonctx, __FUNCTION__);
goto shader_again_alloc;
}
radeon_cs_space_add_persistent_bo(radeonctx->cmdbuf.cs,
- pbo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ pbo,
+ RADEON_GEM_DOMAIN_GTT, 0);
- if (radeon_cs_space_check_with_bo(radeonctx->cmdbuf.cs,
- pbo,
- RADEON_GEM_DOMAIN_GTT, 0)) {
- fprintf(stderr,"failure to revalidate BOs - badness\n");
+ if (radeon_cs_space_check_with_bo(radeonctx->cmdbuf.cs,
+ pbo,
+ RADEON_GEM_DOMAIN_GTT, 0)) {
+ radeon_error("failure to revalidate BOs - badness\n");
return GL_FALSE;
}
@@ -103,6 +105,8 @@ GLboolean r600DeleteShader(GLcontext * ctx,
{
struct radeon_bo * pbo = (struct radeon_bo *)shaderbo;
+ radeon_print(RADEON_SHADER, RADEON_NORMAL, "%s: %p\n", __func__, pbo);
+
if (pbo) {
if (pbo->ptr)
radeon_bo_unmap(pbo);