[Bug 98664] Fragment shader while loop causes geometry corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 12 on bug 98664 from
(In reply to Nicolai Hähnle from comment #10)
> The geometry shader is incorrect. I guess it works on i965 because the NIR
> path skips some optimizations that are allowed by the GLSL spec, which has
> this to say about EmitVertex():
> 
>    "Emits the current values of output variables to the current
>    output primitive. On return from this call, the values of
>    output variables are undefined."
> 
> In other words, you need to store outMinEdge / outMaxEdge in temporary
> variables.

FWIW I've noticed that NVIDIA blob tends to go exactly counter to this, and
explicitly "latches" the values. (While i965 hardware behaves this way by
default, NVIDIA hw does not - it takes extra effort to make it do that, and the
NVIDIA blob does it. We've resorted to doing it for gl_Layer/gl_ViewportIndex
in nouveau, but not other varyings.)

Note that it's not necessary to re-emit flat varyings for every vertex, just
the provoking vertex. This tends to be the last vertex by default, I believe.
(And I don't know if that's prior to strip decomposition or not.)


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux