aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-06-13 15:15:53 -0700
committerAlyssa Rosenzweig <[email protected]>2019-06-17 07:59:14 -0700
commitb660953733410464e6bf5ec066d3df723488d62c (patch)
tree43544b98c10da18bf8df09d2021dccaf2efa176f /src/gallium
parentedfba9bee24ab1e2632f9b1f92d050ece178b047 (diff)
panfrost: Use polygon list header size computation
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 009ff6859e5..f66ee434c04 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -46,6 +46,7 @@
#include "pan_blending.h"
#include "pan_blend_shaders.h"
#include "pan_util.h"
+#include "pan_tiler.h"
static int performance_counter_number = 0;
extern const char *pan_counters_base;
@@ -134,6 +135,9 @@ panfrost_emit_sfbd(struct panfrost_context *ctx)
struct bifrost_framebuffer
panfrost_emit_mfbd(struct panfrost_context *ctx)
{
+ unsigned width = ctx->pipe_framebuffer.width;
+ unsigned height = ctx->pipe_framebuffer.height;
+
struct bifrost_framebuffer framebuffer = {
/* The lower 0x1ff controls the hierarchy mask. Set more bits
* on for more tile granularity (which can be a performance win
@@ -149,13 +153,12 @@ panfrost_emit_mfbd(struct panfrost_context *ctx)
/* See pan_tiler.c */
.tiler_polygon_list = ctx->misc_0.gpu,
- .tiler_polygon_list_body = ctx->misc_0.gpu + 0xf0000,
.tiler_polygon_list_size = 0x0,
- .width1 = MALI_POSITIVE(ctx->pipe_framebuffer.width),
- .height1 = MALI_POSITIVE(ctx->pipe_framebuffer.height),
- .width2 = MALI_POSITIVE(ctx->pipe_framebuffer.width),
- .height2 = MALI_POSITIVE(ctx->pipe_framebuffer.height),
+ .width1 = MALI_POSITIVE(width),
+ .height1 = MALI_POSITIVE(height),
+ .width2 = MALI_POSITIVE(width),
+ .height2 = MALI_POSITIVE(height),
.unk1 = 0x1080,
@@ -168,6 +171,14 @@ panfrost_emit_mfbd(struct panfrost_context *ctx)
.scratchpad = ctx->scratchpad.gpu,
};
+ /* Compute the polygon header size and use that to offset the body */
+
+ unsigned header_size = panfrost_tiler_header_size(
+ width, height, framebuffer.tiler_hierarchy_mask);
+
+ framebuffer.tiler_polygon_list_body =
+ framebuffer.tiler_polygon_list + header_size;
+
return framebuffer;
}