austriancoder changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://freenode.irclog.whitequark.org/etnaviv
<marex> austriancoder: could it be that the real problem with the TXP is that w=0 , and therefore the RCP triggers division by zero ?
JohnnyonF has joined #etnaviv
JohnnyonFlame has quit [Ping timeout: 256 seconds]
srk has quit [Ping timeout: 240 seconds]
JohnnyonF has quit [Ping timeout: 265 seconds]
pcercuei has joined #etnaviv
srk has joined #etnaviv
srk has quit [Remote host closed the connection]
srk has joined #etnaviv
lynxeye has joined #etnaviv
agx_ has quit [Quit: leaving]
agx_ has joined #etnaviv
karolherbst has joined #etnaviv
JohnnyonFlame has joined #etnaviv
JohnnyonFlame has quit [Ping timeout: 240 seconds]
<marex> lynxeye: hey, you around are available for discussing etnaviv fixed pipeline bugs ?
<mntmn> marex: btw you were messing with imx8mn, or do i remember that wrong? how is that going?
<marex> mntmn: I have one on my desk, why ?
<mntmn> marex: i want to possibly use it for a small device, and a friend might use it for a retro related thing
<mntmn> marex: how is the etnaviv support?
<marex> I didnt try etnaviv on it yet, but its GC7000UL, so it should be fine
<mntmn> ok
<mntmn> there was some trouble with power mgmt?
<marex> just the usual
<marex> you need the power domain driver and blk_ctl
<lynxeye> marex: what kind of bugs?
<lynxeye> mntmn: 8mn has the same gpu as 8mp afaik, which is a bit a weird crossover between the new GC7000 on 8mq and some older GPUs. It doesn't have the BLT engine and needs some work in that area if I'm right. I'm going to take a look at fixing the 8mp support in the next days.
<marex> lynxeye: BLT -- bacon lattuce tomato ?
<marex> (sorry, I had to)
<mntmn> lynxeye: ok, cool
<lynxeye> marex: hehe
<marex> lynxeye: this ends up setting W in gl_TexCoord, which is wrong
<marex> lynxeye: see https://gitlab.freedesktop.org/marex/mesa/-/commit/daafe97bbfe9fc5e33d0d986b668c9006846b1ac patch which works around the problem and fixes that eglretrace (and point sprites in neverball)
<marex> lynxeye: I think we either have to handle W=0 in the RCP input in TGSI TXP instruction (and similar to NIR) because that triggers division by zero (rcp 1.0/0.0) or avoid W=0 in the first place
<lynxeye> marex: Urgh, points. Never looked too much at them and AFAIK the way things are specified in the varying changed multiple time over GPU generations :/
<marex> lynxeye: with that patch, the example works on GC400/2000/7000L, so I think we're pretty close to getting that right
<marex> its just this last thing with W=0
<lynxeye> marex: That patch seems pretty bogus, at least the comment changes. texcoords have very well defined outputs from the VS.
<marex> lynxeye: it is marked FIXME for a reason
<marex> at least now we know the problem is with the W component or with generating TXP instruction for sampling the texcoord in the first place
<lynxeye> marex: I do think 4e102a6de72667c1177e7c484d72bf1d94d028ca is bogus, as I did the varying configuration before this commit based on a GC3000 trace and it at least yielded correct results for flat shaded varyings, which is broken by this commit.
<lynxeye> marex: What are the values of W you are seeing with this example?
<marex> lynxeye: is there some good way to extract them ? If i write them to the texture output, its 0
<austriancoder> lynxeye: 4e102a6de72667c1177e7c484d72bf1d94d028ca is okay afaict from my traces
<marex> austriancoder: oh hey, look how much progress I've made last night ;-)
<lynxeye> austriancoder: it's definitely breaking flat shading. There's around 600 piglits to prove it ;)
<austriancoder> lynxeye: I can only tell you what I see..
<marex> lynxeye: which ones ?
<austriancoder> marex: I have old traces
<marex> austriancoder: old traces of what ?
<lynxeye> marex: clipflat, which has a lot of subtests...
<austriancoder> marex: of a simple test
<marex> austriancoder: for the point sprites ?
<lynxeye> marex: why is the frontend even using a TXP for the point sprite texture sampling?
<austriancoder> marex: if I remember correctly.. yes .. I dig for it .. but not now as I am working for my day job
<marex> lynxeye: "at least now we know the problem is with the W component or with generating TXP instruction for sampling the texcoord in the first place"
<marex> lynxeye: so I was hoping you can answer that question ;-)
<lynxeye> austriancoder: I'm just saying that the blob isn't always correct, especially with things that aren't covered by GLES.
<austriancoder> lynxeye: I am aware of that fact.. thats why I often write simple demos to prove stuff visually
<lynxeye> marex: Ah, apparently my mind skipped over the second half of the sentence ;)
<lynxeye> marex: From a quick read on point sprite behavior I don't see why those should use projective texture mapping, so I would expect to see a TEX instruction instead.
<marex> lynxeye: I can imagine someone might supply a projection component (W) to texcoord (?)
<marex> that's what the tex->projector is for in the load_texture()
<lynxeye> marex: For points the texture coordinates are autogenerated with a range of 0,0 to 1,1 across the point. That's the point of GL_POINTS afaics, so I don't see a way to supply a sensible W there.
<marex> lynxeye: seems like the load_texture is not only for points
<marex> lynxeye: so maybe the bug is in the fixed pipeline implementation itself
<lynxeye> marex: Maybe. The code is not that easy to follow, but it seems there is also a common GLSL IR level projection lowering that we aren't using. Maybe that one also cleans up some of the madness through const propagation...
<marex> lynxeye: what should I git grep for ?
<lynxeye> marex: The one I found is do_lower_texture_projection
<lynxeye> But I guess there are people in #dri-devel that know much more about this crazy point sprite stuff than I will ever want to know. So maybe give it a shot to ask why we end up with TXP over there?
<marex> lynxeye: good idea, thanks
<austriancoder> that lowering is not used by ir_to_mesa so it might make also sense to use a tgis based software renderer and see if the generated tgsi shader also uses txp
<marex> austriancoder: i.e. LIBGL_ALWAYS_SOFTWARE=1 MESA_GLSL=dump ?
<marex> and also MESA_DEBUG=all or somesuch
<austriancoder> marex: and some software renderer specific debug flag like for llvmpipe LP_DEBUG=tgsi
Surkow|laptop has quit [Quit: 418 I'm a teapot - NOP NOP NOP]
<marex> austriancoder: well at least LIBGL_ALWAYS_SOFTWARE renders the point sprites correctly
<marex> austriancoder: I need to check what code it generates, that's for later
Surkow|laptop has joined #etnaviv
JohnnyonFlame has joined #etnaviv
kherbst has joined #etnaviv
karolherbst has quit [Ping timeout: 272 seconds]
JohnnyonF has joined #etnaviv
JohnnyonFlame has quit [Ping timeout: 240 seconds]
pcercuei has quit [Quit: dodo]
Surkow|laptop has quit [Remote host closed the connection]
Surkow|laptop has joined #etnaviv
kherbst is now known as karolherbst
lynxeye has quit [Quit: lynxeye]
karolherbst has quit [Ping timeout: 264 seconds]