[Mesa-dev] ARB_fragment_layer_viewport in gallium

Ilia Mirkin imirkin at alum.mit.edu
Wed Sep 17 15:37:28 PDT 2014


On Wed, Sep 17, 2014 at 6:28 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> ARB_fragment_layer_viewport is enabled unconditionally if geometry
> shaders / multiple viewports are also enabled. This seems reasonable,

I avoided adding a cap when adding the feature. Another option was
adding it... but it seemed to work on all the drivers, and not like an
unreasonable ask for any future driver supporting viewports (radeonsi,
softpipe).

> though I noticed at least it won't work for llvmpipe - entirely due to
> the requirement of the viewport/layer value being zero if it wasn't
> output by the gs (or if no gs is present).
> I couldn't actually figure out if that would be required for d3d10
> (which has this functionality as well) too, though tests don't seem to
> require it (or we otherwise get lucky).
> I'm wondering if other drivers have a problem with that as well? I

nv50/nvc0/r600 all pass the relevant piglits. on nv50/r600, the
layer/viewport are passed around as explicit varyings to the FS, which
I guess tend to be 0's when not actually supplied, on nvc0 they're
built-in, but I guess reflect the draw state. I was sure it worked on
llvmpipe as well, but perhaps I only checked early in the piglit test
development stage...

> thought it would be trivial to fix but not so actually for llvmpipe.
> (Essentially would need to note if fs reads layer/vp_index when scanning
> the shader, then inject some appropriate zero output in draw somewhere,
> probably draw_prepare_shader_outputs(). At this point the extension
> doesn't seem worth it anymore at least if d3d10 would not require that
> behavior neither since it isn't in any GL core version.)
> But I guess if it's just draw having a problem with that it's not worth
> a cap bit neither...
>
> Roland
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list