[Mesa-dev] panfrost: Questions regarding pan_wallpaper.c (and the 'reload FB content' logic in general)
Alyssa Rosenzweig
alyssa at rosenzweig.io
Fri May 3 14:29:22 UTC 2019
> + else if (!(job->clear & PIPE_CLEAR_COLOR))
Make sure this is actually being called when you expect. I don't
remember if job->clear is being zeroed when we expect (hint: it might
not be due to a missing job_free routine somewhere, *blush*).
> + .rt[0].rgb_func = PIPE_BLEND_ADD,
> + .rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE,
> + .rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ZERO,
> + .rt[0].alpha_func = PIPE_BLEND_ADD,
> + .rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ZERO,
> + .rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ONE,
Why is alpha flipped? Is the black you're seeing really (0, 0, 0, a) or
might it be (0, 0, 0, 0)?
> /* Bind texture/sampler. TODO: push/pop */
(Was this TODO addressed? It might explain the missing panel)
> + 0.0, ctx->pipe_framebuffer.height, 0.0, 1.0,
> + 0.0, 0.0, 0.0, 1.0,
> + ctx->pipe_framebuffer.width, ctx->pipe_framebuffer.height, 0.0, 1.0,
> + ctx->pipe_framebuffer.width, 0.0, 0.0, 1.0,
Just FWIW, this routine is running a fragment shader _without a vertex
shader_. In effect, we're running the vertex shader in software and
writing varyings straight to memory, as if the VS ran. So these values
are essentially the transformed output of a vertex shader.
> + .format = MALI_RGBA32F,
> + .swizzle = panfrost_get_default_swizzle(4),
> + .unknown1 = 0x2,
+1
> + /* Looks like setting first_tiler_job->dependency_index_2 to point to
> + * out 'reload fb content' job is not enough, the link order matters too.
> + * Let's insert our job in the first slot so that panfrost_link_jobs()
> + * place it before any other tiler jobs.
Oh, that's very interesting, I never realized that was the issue (I had
draw order issues). It's worth more investigation in the future, but +1
and here's a cookie :P
--------------------------------------
Hoping one of these is related, but the diff looks fairly solid....
More information about the mesa-dev
mailing list