Commit 73159176 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Remove tile flags

parent e805827b
......@@ -540,11 +540,11 @@ struct mali_unknown6 {
* Intentional "off-by-one"; finding the tile number is a form of fencepost
* problem. */
#define MALI_MAKE_TILE_COORDS(X, Y, flag) ((X) | ((Y) << 16) | (flag))
#define MALI_MAKE_TILE_COORDS(X, Y) ((X) | ((Y) << 16))
#define MALI_BOUND_TO_TILE(B, bias) ((B - bias) >> MALI_TILE_SHIFT)
#define MALI_COORDINATE_TO_TILE(W, H, flag, bias) MALI_MAKE_TILE_COORDS(MALI_BOUND_TO_TILE(W, bias), MALI_BOUND_TO_TILE(H, bias), flag)
#define MALI_COORDINATE_TO_TILE_MIN(W, H, flag) MALI_COORDINATE_TO_TILE(W, H, flag, 0)
#define MALI_COORDINATE_TO_TILE_MAX(W, H, flag) MALI_COORDINATE_TO_TILE(W, H, flag, 1)
#define MALI_COORDINATE_TO_TILE(W, H, bias) MALI_MAKE_TILE_COORDS(MALI_BOUND_TO_TILE(W, bias), MALI_BOUND_TO_TILE(H, bias))
#define MALI_COORDINATE_TO_TILE_MIN(W, H) MALI_COORDINATE_TO_TILE(W, H, 0)
#define MALI_COORDINATE_TO_TILE_MAX(W, H) MALI_COORDINATE_TO_TILE(W, H, 1)
struct mali_payload_fragment {
/* XXX: WTF? */
......
......@@ -975,15 +975,16 @@ static int panwrap_replay_fragment_job(const struct panwrap_mapped_memory *mem,
/* See the comments by the macro definitions for mathematical context
* on why this is so weird */
panwrap_prop("min_tile_coord = MALI_COORDINATE_TO_TILE_MIN(%d, %d, %d)",
if (MALI_TILE_COORD_FLAGS(s->max_tile_coord) || MALI_TILE_COORD_FLAGS(s->min_tile_coord))
panwrap_msg("Tile coordinate flag missed, replay wrong\n");
panwrap_prop("min_tile_coord = MALI_COORDINATE_TO_TILE_MIN(%d, %d)",
MALI_TILE_COORD_X(s->min_tile_coord) << MALI_TILE_SHIFT,
MALI_TILE_COORD_Y(s->min_tile_coord) << MALI_TILE_SHIFT,
MALI_TILE_COORD_FLAGS(s->min_tile_coord));
MALI_TILE_COORD_Y(s->min_tile_coord) << MALI_TILE_SHIFT);
panwrap_prop("max_tile_coord = MALI_COORDINATE_TO_TILE_MAX(%d, %d, %d)",
panwrap_prop("max_tile_coord = MALI_COORDINATE_TO_TILE_MAX(%d, %d)",
(MALI_TILE_COORD_X(s->max_tile_coord) + 1) << MALI_TILE_SHIFT,
(MALI_TILE_COORD_Y(s->max_tile_coord) + 1) << MALI_TILE_SHIFT,
MALI_TILE_COORD_FLAGS(s->max_tile_coord));
(MALI_TILE_COORD_Y(s->max_tile_coord) + 1) << MALI_TILE_SHIFT);
/* If the FBD was just decoded, we can refer to it by pointer. If not,
* we have to fallback on offsets. */
......
......@@ -393,8 +393,8 @@ trans_fragment_job(struct panfrost_context *ctx)
};
struct mali_payload_fragment payload = {
.min_tile_coord = MALI_COORDINATE_TO_TILE_MIN(0, 0, 0),
.max_tile_coord = MALI_COORDINATE_TO_TILE_MAX(ctx->width, ctx->height, 0),
.min_tile_coord = MALI_COORDINATE_TO_TILE_MIN(0, 0),
.max_tile_coord = MALI_COORDINATE_TO_TILE_MAX(ctx->width, ctx->height),
.framebuffer = fbd | PANFROST_DEFAULT_FBD,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment