ChanServ changed the topic of #zink to: official development channel for the mesa3d zink driver || https://docs.mesa3d.org/drivers/zink.html
DodoGTA has quit [Quit: DodoGTA]
DodoGTA has joined #zink
DodoGTA has left #zink [#zink]
DodoGTA has joined #zink
DodoGTA has left #zink [#zink]
DodoGTA has joined #zink
DodoGTA has quit [Quit: DodoGTA]
DodoGTA has joined #zink
Mary has quit [Quit: .]
Mary has joined #zink
<fdobridge> <g​fxstrand> Ugh... I don't understand `zink_tc_fence` at all
<fdobridge> <g​fxstrand> It looks like it's mostly a one-shot but sometimes it needs to not be
<fdobridge> <z​mike.> tc is complex
<fdobridge> <z​mike.> what's your issue
<fdobridge> <z​mike.> @gfxstrand generally if you're investigating that, the odds are you fucked up
<fdobridge> <g​fxstrand> Oh, I'm 100% sure it's broken.
<fdobridge> <g​fxstrand> I'm just not sure how it's supposed to work so I don't know how to fix it
<fdobridge> <z​mike.> what seems broken
<fdobridge> <g​fxstrand> With Vulkan interop semaphores, it's supposed to be persistent
<fdobridge> <z​mike.> what is "it"
<fdobridge> <g​fxstrand> But all of the deferred_ctx stuff and a few other places seem to think it's a one-shot
<fdobridge> <g​fxstrand> `zink_tc_fence`
<fdobridge> <z​mike.> no that's impossible
<fdobridge> <z​mike.> what is "it"
<fdobridge> <g​fxstrand> If `zink_create_fence_fd()` is created with `PIPE_FD_TYPE_SYNCOBJ`, it's persistent.
<fdobridge> <z​mike.> by persistent you mean reusable?
<fdobridge> <g​fxstrand> Yes
<fdobridge> <g​fxstrand> Without doing any sort of re-import
<fdobridge> <g​fxstrand> each `server_signal` should signal it and each `server_sync` should wait on it exactly once.
<fdobridge> <z​mike.> ok so just do like I said on the MR ?
<fdobridge> <g​fxstrand> That's not enough.
<fdobridge> <z​mike.> what makes it not enough?
<fdobridge> <g​fxstrand> Because all the `deferred_ctx` stuff is causing us to not wait again
<fdobridge> <g​fxstrand> Because all that logic seems to assume that once `deferred_ctx` is set, the fence will be thrown away
<fdobridge> <g​fxstrand> Nothing resets it
<fdobridge> <g​fxstrand> And IDK how it's supposed to work well enough to know where to unset it safely.
<fdobridge> <z​mike.> hold on trying to consult and stir fry simultaneously
<fdobridge> <g​fxstrand> Don't code and work with hot oil at the same time! Very not recommended.
<fdobridge> <z​mike.> alright alright
<fdobridge> <z​mike.> damn this stir fry is good
<fdobridge> <z​mike.> the problem here is that all the fence stuff is massively overloaded at the gallium level
<fdobridge> <z​mike.> which makes things like this tricky
<fdobridge> <z​mike.> @gfxstrand so is the signal side fine? or is there an issue there too
<fdobridge> <z​mike.> I think you just need this
<fdobridge> <g​fxstrand> Yeah, that doesn't work either
<fdobridge> <z​mike.> it doesn't?
<fdobridge> <z​mike.> but how
<fdobridge> <z​mike.> unless...
<fdobridge> <z​mike.> what's the usage pattern here?
<fdobridge> <z​mike.> uhhhh
<fdobridge> <z​mike.> so hold up, you're doing wait -> flush -> wait -> flush in a loop?
<fdobridge> <z​mike.> without actually waiting?
<fdobridge> <g​fxstrand> It's ping-ponging between GL and Vulkan
<fdobridge> <z​mike.> yeah
<fdobridge> <z​mike.> but like
<fdobridge> <z​mike.> ok
<fdobridge> <z​mike.> that's annoying
<fdobridge> <z​mike.> and not what I expected
<fdobridge> <g​fxstrand> If it makes you feel better, I'm pretty sure all of Mesa is broken for that case. 🤡
<fdobridge> <z​mike.> I doubt any drivers handle it correctly including nvidia
<fdobridge> <g​fxstrand> I think Zink is a little more broken than iris but don't quote me on that. 😂
<fdobridge> <z​mike.> ok try that version
<fdobridge> <z​mike.> I'm amazed something is actually doing this in the wild
<fdobridge> <g​fxstrand> Now I think something is double-waiting
<fdobridge> <g​fxstrand> But let me try and figure out why
<fdobridge> <g​fxstrand> Okay, I think I got it maybe
<fdobridge> <g​fxstrand> I wonder if Chrome agrees.
<fdobridge> <z​mike.> 🤔
<fdobridge> <g​fxstrand> Look at all those beautiful fish!
<fdobridge> <z​mike.> you remind me of a younger me in the year 2020