summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c27
-rw-r--r--src/gallium/drivers/panfrost/pan_fragment.c2
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c13
3 files changed, 10 insertions, 32 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index d720f086361..49ca1f570f1 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -272,8 +272,10 @@ panfrost_invalidate_frame(struct panfrost_context *ctx)
static void
panfrost_emit_vertex_payload(struct panfrost_context *ctx)
{
+ /* 0x2 bit clear on 32-bit T6XX */
+
struct midgard_payload_vertex_tiler payload = {
- .gl_enables = 0x4 | (ctx->is_t6xx ? 0 : 0x2),
+ .gl_enables = 0x4 | 0x2,
};
memcpy(&ctx->payload_vertex, &payload, sizeof(payload));
@@ -454,9 +456,7 @@ panfrost_default_shader_backend(struct panfrost_context *ctx)
.unknown2_4 = MALI_NO_MSAA | 0x4e0,
};
- if (ctx->is_t6xx) {
- shader.unknown2_4 |= 0x10;
- }
+ /* unknown2_4 has 0x10 bit set on 32-bit T6XX */
struct pipe_stencil_state default_stencil = {
.enabled = 0,
@@ -491,24 +491,14 @@ panfrost_vertex_tiler_job(struct panfrost_context *ctx, bool is_tiler)
{
struct mali_job_descriptor_header job = {
.job_type = is_tiler ? JOB_TYPE_TILER : JOB_TYPE_VERTEX,
-#ifdef __LP64__
.job_descriptor_size = 1,
-#endif
};
struct midgard_payload_vertex_tiler *payload = is_tiler ? &ctx->payload_tiler : &ctx->payload_vertex;
- /* There's some padding hacks on 32-bit */
-
-#ifdef __LP64__
- int offset = 0;
-#else
- int offset = 4;
-#endif
struct panfrost_transfer transfer = panfrost_allocate_transient(ctx, sizeof(job) + sizeof(*payload));
-
memcpy(transfer.cpu, &job, sizeof(job));
- memcpy(transfer.cpu + sizeof(job) - offset, payload, sizeof(*payload));
+ memcpy(transfer.cpu + sizeof(job), payload, sizeof(*payload));
return transfer;
}
@@ -1753,7 +1743,7 @@ panfrost_draw_vbo(
ctx->payload_tiler.prefix.index_count = MALI_POSITIVE(ctx->vertex_count);
/* Reverse index state */
- ctx->payload_tiler.prefix.indices = (uintptr_t) NULL;
+ ctx->payload_tiler.prefix.indices = (u64) NULL;
}
/* Dispatch "compute jobs" for the vertex/tiler pair as (1,
@@ -1815,13 +1805,12 @@ panfrost_create_rasterizer_state(
struct pipe_context *pctx,
const struct pipe_rasterizer_state *cso)
{
- struct panfrost_context *ctx = pan_context(pctx);
struct panfrost_rasterizer *so = CALLOC_STRUCT(panfrost_rasterizer);
so->base = *cso;
- /* Bitmask, unknown meaning of the start value */
- so->tiler_gl_enables = ctx->is_t6xx ? 0x105 : 0x7;
+ /* Bitmask, unknown meaning of the start value. 0x105 on 32-bit T6XX */
+ so->tiler_gl_enables = 0x7;
if (cso->front_ccw)
so->tiler_gl_enables |= MALI_FRONT_CCW_TOP;
diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c
index ab42e763be7..7ffb9db0a05 100644
--- a/src/gallium/drivers/panfrost/pan_fragment.c
+++ b/src/gallium/drivers/panfrost/pan_fragment.c
@@ -70,9 +70,7 @@ panfrost_fragment_job(struct panfrost_context *ctx, bool has_draws)
struct mali_job_descriptor_header header = {
.job_type = JOB_TYPE_FRAGMENT,
.job_index = 1,
-#ifdef __LP64__
.job_descriptor_size = 1
-#endif
};
struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index ffd2de4734e..6fe9e60f69a 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -511,22 +511,13 @@ panfrost_create_screen(int fd, struct renderonly *ro)
screen->gpu_id = panfrost_drm_query_gpu_version(screen);
- /* Check if we're loading against a supported GPU model
- * paired with a supported CPU (differences from
- * armhf/aarch64 break models on incompatible CPUs at the
- * moment -- this is a TODO). In other words, we whitelist
- * RK3288, RK3399, and S912, which are verified to work. */
+ /* Check if we're loading against a supported GPU model. */
switch (screen->gpu_id) {
-#ifdef __LP64__
+ case 0x750: /* T760 */
case 0x820: /* T820 */
case 0x860: /* T860 */
break;
-#else
- case 0x750: /* T760 */
- break;
-#endif
-
default:
/* Fail to load against untested models */
debug_printf("panfrost: Unsupported model %X",