summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2018-09-20 21:25:27 -0700
committerRob Clark <[email protected]>2018-09-27 16:08:52 -0400
commitadcd83fb22670622ed6362ca30697c9ee990af27 (patch)
treedcb154413e6d42b35f8d46f70e3a13f3f4bb9d9e /src
parentfb1c6b89a212852691dd4f497da2d7bf5af2f3c8 (diff)
freedreno/a6xx: Inline fd6_draw()
Simplify the code a bit by inlining this helper. Signed-off-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_draw.c48
1 files changed, 17 insertions, 31 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index 077088c7eb3..41c439721bd 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -44,34 +44,6 @@
#include "a4xx/fd4_draw.h"
static inline void
-fd6_draw(struct fd_batch *batch, struct fd_ringbuffer *ring,
- enum pc_di_primtype primtype,
- enum pc_di_vis_cull_mode vismode,
- enum pc_di_src_sel src_sel, uint32_t count,
- uint32_t instances, enum a4xx_index_size idx_type,
- uint32_t idx_size, uint32_t idx_offset,
- struct pipe_resource *idx_buffer)
-{
- OUT_PKT7(ring, CP_DRAW_INDX_OFFSET, idx_buffer ? 7 : 3);
- if (vismode == USE_VISIBILITY) {
- /* leave vis mode blank for now, it will be patched up when
- * we know if we are binning or not
- */
- OUT_RINGP(ring, DRAW4(primtype, src_sel, idx_type, 0) | 0x2000,
- &batch->draw_patches);
- } else {
- OUT_RING(ring, DRAW4(primtype, src_sel, idx_type, vismode) | 0x2000);
- }
- OUT_RING(ring, instances); /* NumInstances */
- OUT_RING(ring, count); /* NumIndices */
- if (idx_buffer) {
- OUT_RING(ring, 0x0); /* XXX */
- OUT_RELOC(ring, fd_resource(idx_buffer)->bo, idx_offset, 0, 0);
- OUT_RING (ring, idx_size);
- }
-}
-
-static inline void
fd6_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
enum pc_di_primtype primtype,
enum pc_di_vis_cull_mode vismode,
@@ -126,9 +98,23 @@ fd6_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
src_sel = DI_SRC_SEL_AUTO_INDEX;
}
- fd6_draw(batch, ring, primtype, vismode, src_sel,
- info->count, info->instance_count,
- idx_type, idx_size, idx_offset, idx_buffer);
+ OUT_PKT7(ring, CP_DRAW_INDX_OFFSET, idx_buffer ? 7 : 3);
+ if (vismode == USE_VISIBILITY) {
+ /* leave vis mode blank for now, it will be patched up when
+ * we know if we are binning or not
+ */
+ OUT_RINGP(ring, DRAW4(primtype, src_sel, idx_type, 0) | 0x2000,
+ &batch->draw_patches);
+ } else {
+ OUT_RING(ring, DRAW4(primtype, src_sel, idx_type, vismode) | 0x2000);
+ }
+ OUT_RING(ring, info->instance_count); /* NumInstances */
+ OUT_RING(ring, info->count); /* NumIndices */
+ if (idx_buffer) {
+ OUT_RING(ring, 0x0); /* XXX */
+ OUT_RELOC(ring, fd_resource(idx_buffer)->bo, idx_offset, 0, 0);
+ OUT_RING (ring, idx_size);
+ }
}
static void