*/
#include "pipe/p_state.h"
+#include "util/u_draw.h"
#include "util/u_string.h"
#include "util/u_memory.h"
#include "util/u_prim.h"
struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);
unsigned i, prims, buffers = 0, restore_buffers = 0;
+ /* for debugging problems with indirect draw, it is convenient
+ * to be able to emulate it, to determine if game is feeding us
+ * bogus data:
+ */
+ if (info->indirect && (fd_mesa_debug & FD_DBG_NOINDR)) {
+ util_draw_indirect(pctx, info);
+ return;
+ }
+
if (!info->count_from_stream_output && !info->indirect &&
!info->primitive_restart &&
!u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
{"bstat", FD_DBG_BSTAT, "Print batch stats at context destroy"},
{"nogrow", FD_DBG_NOGROW, "Disable \"growable\" cmdstream buffers, even if kernel supports it"},
{"lrz", FD_DBG_LRZ, "Enable experimental LRZ support (a5xx+)"},
+ {"noindirect",FD_DBG_NOINDR, "Disable hw indirect draws (emulate on CPU)"},
DEBUG_NAMED_VALUE_END
};
#define FD_DBG_BSTAT 0x8000
#define FD_DBG_NOGROW 0x10000
#define FD_DBG_LRZ 0x20000
+#define FD_DBG_NOINDR 0x40000
extern int fd_mesa_debug;
extern bool fd_binning_enabled;