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

./test-clear works, woo

parent c61acaa5
......@@ -92,6 +92,7 @@ panfrost_clear(
const union pipe_color_union *color,
double depth, unsigned stencil)
{
printf("Clear...\n");
struct panfrost_context *ctx = panfrost_context(pipe);
struct mali_single_framebuffer *fbd = &ctx->fragment_fbd;
......@@ -100,7 +101,7 @@ panfrost_clear(
bool clear_stencil = buffers & PIPE_CLEAR_STENCIL;
uint32_t packed_color =
(normalised_float_to_u8(color->f[3]) << 24) |
(normalised_float_to_u8(/* color->f[3] */ 1.0f) << 24) |
(normalised_float_to_u8(color->f[2]) << 16) |
(normalised_float_to_u8(color->f[1]) << 8) |
(normalised_float_to_u8(color->f[0]) << 0);
......@@ -109,6 +110,7 @@ panfrost_clear(
* is doubly weird. */
if (clear_color) {
printf("Color %X\n", packed_color);
fbd->clear_color_1 = packed_color;
fbd->clear_color_2 = packed_color;
fbd->clear_color_3 = packed_color;
......@@ -116,6 +118,7 @@ panfrost_clear(
}
if (clear_depth) {
printf("Depth %d\n", depth);
fbd->depth_buffer = ctx->depth_stencil_buffer;
fbd->depth_buffer_enable = MALI_DEPTH_STENCIL_ENABLE;
......@@ -126,6 +129,7 @@ panfrost_clear(
}
if (clear_stencil) {
printf("Stencil %d\n", stencil);
fbd->depth_buffer = ctx->depth_stencil_buffer;
fbd->depth_buffer_enable = MALI_DEPTH_STENCIL_ENABLE;
......@@ -148,6 +152,7 @@ panfrost_clear(
}
fbd->clear_flags = clear_flags;
printf("Flags: %x\n", fbd->clear_flags);
}
static void
......@@ -158,9 +163,11 @@ panfrost_flush(
{
struct panfrost_context *ctx = panfrost_context(pipe);
if (flags & PIPE_FLUSH_END_OF_FRAME) {
printf("Pan...");
if (1 || (flags & PIPE_FLUSH_END_OF_FRAME)) {
/* Submit the frame itself */
trans_submit_frame(ctx);
printf("Flush!\n");
/* Prepare for the next frame */
trans_invalidate_frame(ctx);
......@@ -368,6 +375,7 @@ trans_fragment_job(struct panfrost_context *ctx)
* ready for linkage and upload */
mali_ptr fbd = panfrost_upload(&ctx->cmdstream, &ctx->fragment_fbd, sizeof(ctx->fragment_fbd), false);
printf("Frgament job, with color: %llx\n", ctx->fragment_fbd.clear_color_1);
/* Generate the fragment (frame) job */
......@@ -523,6 +531,7 @@ trans_submit_frame(struct panfrost_context *ctx)
if (pandev_ioctl(ctx->fd, MALI_IOCTL_JOB_SUBMIT, &submit))
printf("Error submitting\n");
printf("Submitted\n");
}
/* New context creation, which also does hardware initialisation since I don't
......
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