struct panfrost_rasterizer *rasterizer = ctx->rasterizer;
if (!panfrost_writes_point_size(ctx)) {
- bool points = prefix->draw_mode == MALI_POINTS;
+ bool points = prefix->draw_mode == MALI_DRAW_MODE_POINTS;
float val = 0.0f;
if (rasterizer)
panfrost_flush_all_batches(ctx, 0);
}
-#define DEFINE_CASE(c) case PIPE_PRIM_##c: return MALI_##c;
+#define DEFINE_CASE(c) case PIPE_PRIM_##c: return MALI_DRAW_MODE_##c;
static int
g2m_draw_mode(enum pipe_prim_type mode)
typedef uint64_t u64;
typedef uint64_t mali_ptr;
-enum mali_draw_mode {
- MALI_DRAW_NONE = 0x0,
- MALI_POINTS = 0x1,
- MALI_LINES = 0x2,
- MALI_LINE_STRIP = 0x4,
- MALI_LINE_LOOP = 0x6,
- MALI_TRIANGLES = 0x8,
- MALI_TRIANGLE_STRIP = 0xA,
- MALI_TRIANGLE_FAN = 0xC,
- MALI_POLYGON = 0xD,
- MALI_QUADS = 0xE,
- MALI_QUAD_STRIP = 0xF,
-
- /* All other modes invalid */
-};
-
/* Applies to tiler_gl_enables */
#define MALI_OCCLUSION_QUERY (1 << 3)
#undef DEFINE_CASE
-static char *
-pandecode_draw_mode(enum mali_draw_mode mode)
-{
-#define DEFINE_CASE(name) case MALI_ ## name: return "MALI_" #name
-
- switch (mode) {
- DEFINE_CASE(DRAW_NONE);
- DEFINE_CASE(POINTS);
- DEFINE_CASE(LINES);
- DEFINE_CASE(TRIANGLES);
- DEFINE_CASE(TRIANGLE_STRIP);
- DEFINE_CASE(TRIANGLE_FAN);
- DEFINE_CASE(LINE_STRIP);
- DEFINE_CASE(LINE_LOOP);
- DEFINE_CASE(POLYGON);
- DEFINE_CASE(QUADS);
- DEFINE_CASE(QUAD_STRIP);
-
- default:
- pandecode_msg("XXX: invalid draw mode %X\n", mode);
- return "";
- }
-
-#undef DEFINE_CASE
-}
-
#define DEFINE_CASE(name) case MALI_FUNC_ ## name: return "MALI_FUNC_" #name
static char *
pandecode_func(enum mali_func mode)
pandecode_prop("workgroups_x_shift_3 = 0x%" PRIx32, p->workgroups_x_shift_3);
- if (p->draw_mode != MALI_DRAW_NONE)
- pandecode_prop("draw_mode = %s", pandecode_draw_mode(p->draw_mode));
+ if (p->draw_mode != MALI_DRAW_MODE_NONE)
+ pandecode_prop("draw_mode = %s", mali_draw_mode_as_str(p->draw_mode));
/* Index count only exists for tiler jobs anyway */
<value name="Fragment" value="9"/>
</enum>
+ <enum name="Draw Mode">
+ <value name="None" value="0"/>
+ <value name="Points" value="1"/>
+ <value name="Lines" value="2"/>
+ <value name="Line strip" value="4"/>
+ <value name="Line loop" value="6"/>
+ <value name="Triangles" value="8"/>
+ <value name="Triangle strip" value="10"/>
+ <value name="Triangle fan" value="12"/>
+ <value name="Polygon" value="13"/>
+ <value name="Quads" value="14"/>
+ <value name="Quad strip" value="15"/>
+ </enum>
+
</panxml>
struct midgard_payload_vertex_tiler payload = {
.prefix = {
- .draw_mode = MALI_TRIANGLES,
+ .draw_mode = MALI_DRAW_MODE_TRIANGLES,
.unknown_draw = 0x3000,
.index_count = MALI_POSITIVE(vertex_count)
},