[Mesa-dev] [PATCH] etnaviv: Fix point sprite issue on HALTI0

Wladimir J. van der Laan laanwj at gmail.com
Sat Nov 18 10:32:30 UTC 2017


On Thu, Nov 16, 2017 at 01:38:32PM -0500, Ilia Mirkin wrote:

> > Which is annoying as it means that shader state now depends on either the kind
> > of primitive (which is per-draw), or the shading model (which is part of
> > rasterizer state).
> 
> I take it your hardware doesn't support setting a different polygon
> mode for front and back-facing triangles?

I don't know. Might have been added at some point, though I wouldn't be
suprised if it's emulated. The current driver certainly doesn't handle it.

In general Vivante's focus seems to have been to make hw for OpenGL ES 2.0, then
3.x, recently Vulkan. Anything else is usually emulated.

I don't currently have any means to figure out, cannot test OpenGL desktop with
the blob.

> > Thinking of it, the latter is also an option, at least we don't have to
> > "smuggle" per-draw info into the state emit call. But it's still
> > quite more involved to fix than I expected :(
> 
> When you say flat shading ... are you talking about like "flat in vec4
> bla", or like glShadeModel(GL_FLAT)? If the latter, note that this
> only applies to gl_Color / gl_SecondaryColor. Not regular varyings.
> The "flat" keyword can apply to any varying, of course.

Talking about support for ancient glShaderModel(...). You're right about it
only applying to color semantics, that's why my patch is not correct. We're
fighting with the hardware there which seemingly uses different semantics.

flat as a GLSL attribute was introduced in GLSL ES 300, not sure how this is
handled by the blob, but we're not quite there yet.

> These are totally separate concepts, I'd really recommend poring over
> your traces again to see if you might have missed something. Here's
> how it works on Adreno:
> 
> a3xx is easy:
> https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/freedreno/a3xx/fd3_program.c#n386
> 
> a4xx+ is a little weird:
> https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/freedreno/a4xx/fd4_program.c#n473
> +
> https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c#n2945
> 
> (i.e. you have to load flat inputs specially on a4xx+)

Interesting, both quite different approaches from Vivante. 

Regards,
Wladimir


More information about the etnaviv mailing list