summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-11-10 17:52:36 +0100
committerMarek Olšák <[email protected]>2011-11-10 18:09:10 +0100
commit6a490149d9b8b77ead81b4227f2860ec22095217 (patch)
tree391394c37024a44f1e09787366ef607ed93d08fc /src
parent5222e16e2b611064c0add9eef7f56488c9b8fbe6 (diff)
r600g: turn some CS overflow checks into assertions
They're not really exhaustive and not so useful either.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/evergreen_hw_context.c7
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c
index 5eb6332afba..96e8d181189 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -1156,12 +1156,7 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
}
r600_need_cs_space(ctx, 0, TRUE);
-
- /* at this point everything is flushed and ctx->pm4_cdwords = 0 */
- if (unlikely((ctx->pm4_dirty_cdwords + ndwords) > RADEON_MAX_CMDBUF_DWORDS)) {
- R600_ERR("context is too big to be scheduled\n");
- return;
- }
+ assert(ctx->pm4_cdwords + ctx->pm4_dirty_cdwords + ndwords < RADEON_MAX_CMDBUF_DWORDS);
/* enough room to copy packet */
LIST_FOR_EACH_ENTRY_SAFE(dirty_block, next_block, &ctx->dirty,list) {
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index eb80fa94503..3a0cde39462 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -1460,12 +1460,7 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
}
r600_need_cs_space(ctx, 0, TRUE);
-
- /* at this point everything is flushed and ctx->pm4_cdwords = 0 */
- if (unlikely((ctx->pm4_dirty_cdwords + ndwords) > RADEON_MAX_CMDBUF_DWORDS)) {
- R600_ERR("context is too big to be scheduled\n");
- return;
- }
+ assert(ctx->pm4_cdwords + ctx->pm4_dirty_cdwords + ndwords < RADEON_MAX_CMDBUF_DWORDS);
/* enough room to copy packet */
LIST_FOR_EACH_ENTRY_SAFE(dirty_block, next_block, &ctx->dirty, list) {