DBG("%p: needs_flush=%d", batch, batch->needs_flush);
if (!batch->needs_flush) {
- if (force) {
- fd_gmem_render_noop(batch);
- goto out;
- }
return;
}
debug_assert(batch->reference.count > 0);
-out:
if (batch == batch->ctx->batch) {
batch_reset(batch);
} else {
flush_ring(batch);
}
-/* special case for when we need to create a fence but have no rendering
- * to flush.. just emit a no-op string-marker packet.
- */
-void
-fd_gmem_render_noop(struct fd_batch *batch)
-{
- struct fd_context *ctx = batch->ctx;
- struct pipe_context *pctx = &ctx->base;
-
- pctx->emit_string_marker(pctx, "noop", 4);
- /* emit IB to drawcmds (which contain the string marker): */
- ctx->emit_ib(batch->gmem, batch->draw);
- flush_ring(batch);
-}
-
/* tile needs restore if it isn't completely contained within the
* cleared scissor:
*/
struct fd_batch;
void fd_gmem_render_tiles(struct fd_batch *batch);
-void fd_gmem_render_noop(struct fd_batch *batch);
bool fd_gmem_needs_restore(struct fd_batch *batch, struct fd_tile *tile,
uint32_t buffers);
static inline void
__OUT_IB(struct fd_ringbuffer *ring, bool prefetch, struct fd_ringbuffer *target)
{
+ if (target->cur == target->start)
+ return;
+
unsigned count = fd_ringbuffer_cmd_count(target);
debug_assert(__gpu_id(ring) < 500);
static inline void
__OUT_IB5(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
{
+ if (target->cur == target->start)
+ return;
+
unsigned count = fd_ringbuffer_cmd_count(target);
for (unsigned i = 0; i < count; i++) {