freedreno/a4xx: use generated headers for draw initiator
authorRob Clark <robclark@freedesktop.org>
Sat, 5 Mar 2016 21:50:09 +0000 (16:50 -0500)
committerRob Clark <robclark@freedesktop.org>
Sun, 13 Mar 2016 16:23:41 +0000 (12:23 -0400)
No need to open-code this.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a4xx/fd4_draw.h

index a6c56404a8af2f9d22abcb60dc9665f76d3f0e77..2b23e33b42fe0f7ae0c8938f1d62985fa6dbbe21 100644 (file)
@@ -41,9 +41,10 @@ static inline uint32_t DRAW4(enum pc_di_primtype prim_type,
                enum pc_di_src_sel source_select, enum a4xx_index_size index_size,
                enum pc_di_vis_cull_mode vis_cull_mode)
 {
-       return (prim_type         << 0) |
-                       (source_select     << 6) |
-                       (index_size        << 10);
+       return CP_DRAW_INDX_OFFSET_0_PRIM_TYPE(prim_type) |
+                       CP_DRAW_INDX_OFFSET_0_SOURCE_SELECT(source_select) |
+                       CP_DRAW_INDX_OFFSET_0_INDEX_SIZE(index_size) |
+                       CP_DRAW_INDX_OFFSET_0_VIS_CULL(vis_cull_mode);
 }
 
 static inline void