summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r600
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2009-08-25 02:23:52 +0300
committerPauli Nieminen <[email protected]>2009-08-25 02:23:52 +0300
commit4297f32c246cc5b726d02745456c06952322958d (patch)
tree5a665c0a013dbf2921158c501d9420ef60811431 /src/mesa/drivers/dri/r600
parent55c0457fe9574452b3c2558ada160c42a3e1fbdc (diff)
radeon/r200/r300/r600: Warn if we emit more than prediction was.
Prediction code making too small prediction may cause space check aserttion failure later in rendering. So warning about any failure to predict correctly should be fixed.
Diffstat (limited to 'src/mesa/drivers/dri/r600')
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index 899c2cf05c3..9b0b5443d6a 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -53,6 +53,8 @@
#include "r700_fragprog.h"
#include "r700_state.h"
+#include "radeon_common_context.h"
+
void r700WaitForIdle(context_t *context);
void r700WaitForIdleClean(context_t *context);
GLboolean r700SendTextureState(context_t *context);
@@ -384,7 +386,9 @@ static GLboolean r700RunRender(GLcontext * ctx,
fprintf(stderr, "%s: cs end at %d\n",
__func__, context->radeon.cmdbuf.cs->cdw);
- assert(context->radeon.cmdbuf.cs->cdw <= emit_end);
+ if ( emit_end < context->radeon.cmdbuf.cs->cdw )
+ WARN_ONCE("Rendering was %d commands larger than predicted size."
+ " We might overflow command buffer.\n", context->radeon.cmdbuf.cs->cdw - emit_end);
return GL_FALSE;
}