diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-31 14:22:37 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-01 16:23:03 -0700 |
commit | 748ccbc80843866c277029d9309db6c65186c6f7 (patch) | |
tree | 389c8438f64a4f6a2362f27c5dd67214e28f2d06 | |
parent | 3113be312762584a79f120c9cd7fd4e786a8dc3b (diff) |
panfrost: Explain and include compute FBD
Squint at it hard enough and you realize it's the beginning of an
SFBD... I guess...
A compute shader with register spilling would be able to confirm this,
but we would expect to see the first field | 1 and an address splattered
later, setting up TLS.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_compute.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_compute.c b/src/gallium/drivers/panfrost/pan_compute.c index 61b3085cac0..34d27904b3f 100644 --- a/src/gallium/drivers/panfrost/pan_compute.c +++ b/src/gallium/drivers/panfrost/pan_compute.c @@ -70,6 +70,23 @@ panfrost_launch_grid(struct pipe_context *pipe, /* TODO: Stub */ struct midgard_payload_vertex_tiler *payload = &ctx->payloads[PIPE_SHADER_COMPUTE]; + /* Compute jobs have a "compute FBD". It's not a real framebuffer + * descriptor - there is no framebuffer - but it takes the place of + * one. As far as I can tell, it's actually the beginning of a + * single-render-target framebuffer descriptor with almost everything + * zeroed out. + */ + struct mali_compute_fbd compute_fbd = { + .unknown1 = { + 0, 0x1F, 0, 0, 0, 0, 0, 0 + } + }; + + payload->postfix.framebuffer = + panfrost_upload_transient(ctx, &compute_fbd, sizeof(compute_fbd)); + + /* Upload the payload */ + struct panfrost_transfer transfer = panfrost_allocate_transient(ctx, sizeof(job) + sizeof(*payload)); memcpy(transfer.cpu, &job, sizeof(job)); memcpy(transfer.cpu + sizeof(job), payload, sizeof(*payload)); |