[Mesa-dev] mesa/st: support lowering user-clip-planes automatically
Erik Faye-Lund
erik.faye-lund at collabora.com
Fri Oct 18 13:01:56 UTC 2019
On Thu, 2019-10-17 at 20:55 -0500, Jason Ekstrand wrote:
> On Thu, Oct 17, 2019 at 10:39 AM Erik Faye-Lund <
> erik.faye-lund at collabora.com> wrote:
> > This is discussed in the merge request thread. Zink currently only
> > support vertex and fragment shaders, so it's the only place this
> > can occur. If someone wants to enable this for drivers that
> > supports geometry or tesselation shaders, they would need to extend
> > this code first. Unless I beat them to it, of course. I don't want
> > to implement this blindly, which is why I left this out for now.
> >
>
> If you hook the pass up and get it working on iris, you wouldn't be
> implementing it blind. :-P
>
Not the worst idea. I gave it a quick stab, but coulnt't even get the
vertex-shader only path working on Iris. I'm probably breaking some
expectations in the way the lowering-pass is called or something, but I
couldn't figure it out quickly, and kinda lost my motivation.
Here's what I did so far:
https://gitlab.freedesktop.org/kusma/mesa/tree/iris-ucp-lowering
I noticed that if I also call nir_shader_gather_info after the lowering
(like the current iris code does), everything seems to get clipped
instead... And if I do both nir_lower_global_vars_to_local and
nir_lower_vars_to_ssa, I trigger this assert:
nir_lower_var_copies.c:89: emit_deref_copy_load_store: Assertion
`glsl_type_is_vector_or_scalar(dst_deref->type)' failed.
So... I dunno. There's probably something wrong here somewhere ;)
More information about the mesa-dev
mailing list