diff options
Diffstat (limited to 'src/mesa/drivers/dri/r600/r600_emit.c')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_emit.c | 28 |
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); |