00:15 karolherbst: I can finally wire up proper nir_validate support in rusticl, but that also requires me to bump to meson 1.2.. oh well.. need it for some of the external crate support anyway.
00:15 karolherbst: dcbaker: how much of that already works btw?
00:16 dcbaker: karolherbst: all that landed for 1.2 was the core classes and functions unfortunately :/
00:17 karolherbst: ahh... so I guess proper crate.io support might come in 1.3?
00:17 karolherbst: I kinda want to see something like this: https://github.com/mesonbuild/meson/pull/11856#issuecomment-1586106520 :D
06:25 daniels: jenatali: we don’t even manage them though, alatiera isn’t us …
08:23 sravn: javierm: Did you consider to pull out the logo stuff from fbmem and place it all in video/logo/*
08:24 javierm: sravn: that's an option to. The functions though are named fb_* so probably that should be changed too
08:25 javierm: sravn: I actually don't have a strong opinion on this, just wondered and asked Geert since he was touching that
08:25 sravn: javierm: Yep, it should be clear this is logo stuff and not core fb stuff
08:25 javierm: sravn: agreed. I just noticed that inconsistency so thought that either everything should be in fbdev/core or in video/logo
09:02 DavidHeidelberg[m]: eric_engestrom: hey! I'm still looking at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24305#note_2013552 and trying find better approach.. while it would be best to merge it asap, do you have any insight on how to solve this?
10:15 maxv: Hi. If I export gbm_bo, is it safe to immediately call gbm_bo_destroy, or should I keep it around while the buffer is used by another process?
10:17 emersion: you can destroy the bo immediately
10:18 MrCooper: maxv: export to dma-buf fd, or to KMS handle?
10:28 maxv: emerson: great, thanks
10:29 maxv: MrCooper: dma-buf
10:30 MrCooper: then yes, the dma-buf fd keeps the underlying kernel BO alive (a KMS handle wouldn't though)
10:39 emersion: MrCooper: a KMS FB would i believe?
10:39 MrCooper: yeah, I think so
10:40 emersion: did you mean "GEM handle" instead of "KMS handle"?
10:40 emersion: and i believe a GEM handle would retain a ref as well
10:41 emersion: (modulo the GEM_CLOSE weirdness)
10:42 MrCooper: indeed I did, used the Mesa radeonsi terminology
10:43 MrCooper: gbm_bo_get_handle may (or may not) return the same GEM handle used by GBM itself, in which case destroying the gbm_bo may destroy the kernel BO and invalidate the GEM handle
10:44 MrCooper: so a GEM handle cannot be relied on for keeping the BO alive
10:45 eric_engestrom: DavidHeidelberg[m]: I was off yesterday, I hadn't seen your comment yet; IMO stable branches should get `sed /'compare_to: main'/d` since they don't get any benefit from not using the previous push's state, and there is a downside to specifying anything, since I see 3 possibilities: 1) you leave `main` and you get a completely wrong pipeline, 2) you set `XX.Y-branchpoint` and you get a pipeline with everything that has
10:45 eric_engestrom: ever changed in the stable branch, or 3) you set it to `staging/XX.Y` and you get the same pipeline as if you hadn't specified anything while working on a release, and when making a release you get a completely wrong pipeline
10:46 eric_engestrom: DavidHeidelberg[m]: as for where to document this `sed`, https://docs.mesa3d.org/releasing#making-a-branchpoint would be the place
10:47 eric_engestrom: IMO it would be good to have this doc update in the same commit
10:51 maxv: One more question: do I understand correctly that in order to resize an EGLSurface created from gbm_surface, I need to release current EGL context, destroy EGLSurface and gbm_surface, and create new GBM/EGL surfaces with the new size? And why isn't there a resizing mechanism for gbm_surface?
10:54 zamundaaa[m]: Of what use would a resizing mechanism be? The surface doesn't matter, KMS only works with buffers
10:55 maxv: but GBM+EGL is not limited to KMS, as noted in https://mesa-dev.freedesktop.narkive.com/buxk7VLG/gbm-surface
10:59 maxv: In particular I'm implementing a wayland client and currently I create an EGLImage from gbm_bo and set it as a gl renderbuffer storage. I know that EGLSurface can be created for native wl_surface, but I'm experimenting with other wayland libraries.
11:54 DavidHeidelberg[m]: eric_engestrom: can it look like I wrote it? This part doc isn't my strong side :P
11:55 eric_engestrom: haha, I was just looking at your new push
11:55 eric_engestrom: I can't parse the first half of your message though?
11:55 eric_engestrom: (the "can it look like I wrote it?")
12:05 DavidHeidelberg[m]: eric_engestrom: updated, Marge assigned, thanks!
12:49 zmike: DavidHeidelberg[m]: have you had any time to make progress on splitting the CI CTS updates for GL versions?
12:50 DavidHeidelberg[m]: zmike: I'm working on doing viable package for it, so I guess it counts as yes? :D (not progressed much yet)
12:52 zmike: 🤝
13:09 dj-death: someone knows of a pass that would eliminate a pattern like a temporary variable stored with a value from a ubo and then read back in the next block ?
13:09 dj-death: when the variable could be completely removed and just the load_ubo replacing the temporary variable read
13:10 pendingchaos: nir_opt_copy_prop_vars + nir_opt_sink
13:13 dj-death: pendingchaos: thanks a lot
13:21 dj-death: pendingchaos: doesn't seem to work on temporaries
13:22 dj-death: nir_variable_mode ignore = nir_var_read_only_modes & ~nir_var_vec_indexable_modes;
13:25 dj-death: or maybe reading this wrong :/
13:29 pendingchaos: temporaries shouldn't be in nir_var_read_only_modes
13:45 dj-death: pendingchaos: maybe my case is too complex then
13:46 dj-death: pendingchaos: it's a vec2[24] loaded with a bunch of vec2 sequentially from a UBO (like memcpy exactly) and then there is an indirect indexing in the temporary array
13:47 dj-death: pendingchaos: do you happen to know if this pass can deal with that?
13:47 pendingchaos: I don't think it can
13:48 pendingchaos: maybe if the copy was done with a copy_deref intrinsic?
13:49 pendingchaos: would probably also remove the need for nir_opt_sink
14:13 dj-death: pendingchaos: ah damn, this is not a contiguous UBO array unfortunately
14:17 maxv: Do you think implementing gbm_surface_resize is desirable? I think it should be pretty easy and I probably can do it, but I'm not sure if something like this would be accepted.
14:18 emersion: is it cumbersome to destroy and recreate?
14:19 emersion: because that's exactly what happens when a surface is "resized" AFAIK
14:19 alyssa: gfxstrand: !24326 is teaching me about the limits of gitlab
14:22 gfxstrand: alyssa: Well, yes. Someone's got to stress-test the system. :joy:
14:25 maxv: emersion: It kinda is. When resize happens some buffers are locked and wait for a release event. gbm_surface_destroy docs say that all buffers need to be released and EGLSurface destroyed before calling it. This leads to a state when multiple (maybe even more than two) surfaces must exist at the same time, which is awkward.
14:27 maxv: The context switch also seems unnecessary
14:27 alyssa: gfxstrand: do they? my 1-line NIR patches usually stress the system just fine ;~P
14:36 dj-death: pendingchaos: would you happen to know what would vectorize scratch load/stores? :)
14:41 alyssa: dj-death: i/o vectorizer can't do it?
14:41 alyssa: er
14:41 alyssa: load/store vectorizer
14:41 alyssa: nir_opt_load_store_vectorize.c
14:41 pendingchaos: the load/store vectorizer could probably be made to do that, if they aren't derefs
14:41 pendingchaos: before deref lowering, nir_opt_combine_stores/nir_opt_cse is part of a solution
14:41 alyssa: i guess that doesn't do scratch
14:43 alyssa: that thing scares me ngl
14:43 pendingchaos: I think that was because AMD hardware doesn't benefit from vectorizing scratch access
14:43 pendingchaos: but I don't think that's actually true, so I'm not sure why it doesn't do scratch
14:48 alyssa:needs to setup load/store vectorizing on agx, we'd benefit
14:49 alyssa: (and I'm working on a lowering pass that emits piles of scalar stores in a row that are just begging to be vectorized. not trivial to emit them as vector, loop unrolling happens in the middle)
14:53 dj-death: also _nir_shader_variable_has_mode asserts on temp
14:54 dj-death: but anyway I probably want to find some other trick
14:54 dj-death: maybe promote those UBO loads to shared memory
14:56 dj-death: ah but no, it's not going work for FS :/
14:59 dj-death: pendingchaos: will you send a fix for the lower_shader_calls ?
15:00 dj-death: pendingchaos: I can Rb
15:00 pendingchaos: the "resume_shaders[i]" thing?
15:00 pendingchaos: I don't have any way to test that it does anything, at the moment
15:00 pendingchaos: If I'm reading stuff right, RADV doesn't use this load/store vectorizer yet
15:01 pendingchaos: if I get it working, I guess I can make a fix
15:07 dj-death: okay I can test it
15:07 dj-death: we use it
15:16 pendingchaos: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24334
15:54 zmike: what's the difference between nir_intrinsic_io_xfb and nir_intrinsic_io_xfb2
15:55 zmike: oh
15:55 zmike: 😬
15:56 dj-death: it's twice as good
15:56 zmike: twice as incoherent :/
15:56 dj-death: that's so true for intel
15:56 zmike: as you know I test everything on intel first
16:51 mareko: zmike: xfb describes xy and xfb2 describes zw channels
16:53 mareko: it's also twice as good
17:07 dj-death: pendingchaos: yeah enabling vectorization of scratch load/store seems to massively improve things
19:22 dj-death: people know of a NIR pass that groups the scratch loads/stores
19:23 dj-death: in particular if the stores are in the block just before the loads which are in an if block
19:23 dj-death: sounds like GCM would do that, but that doesn't seem to deal with variables
19:27 dj-death: ah... store_scratch is not marked a reorderable
19:28 dj-death: nor store_deref apparently
19:45 alyssa: dj-death: can't move stores across loads
19:45 alyssa: CAN_REORDER is a pretty blunt flag
19:49 anholt: daniels: do you have some time to actually do dri image format #define collapsing?
19:50 dj-death: alyssa: I meant just move then before the loads
19:50 dj-death: alyssa: in the same if block
19:51 dj-death: alyssa: avoiding a bunch of writes if it's not going to be used
19:55 cwabbott: dj-death: you can't sink stores into an if except if you know that the store won't be used after the if
19:56 cwabbott: I don't think we have anything ATM that can do that type of analysis
19:57 cwabbott: it would probably have to use derefs in order to know what could potentially be a use
19:59 dj-death: cwabbott: yeah, the shader I'm looking at has that one temporary variable written entirely just before an if block that will read from it
20:04 daniels: anholt: I think it's going to become ~necessary, so yeah
20:05 anholt: daniels: looks like the #defines aren't abi any more, which is great.
20:05 anholt: I think we can #define them to PIPE_FORMATs then just start deleting no-op code.
20:06 daniels: anholt: you mean __DRI_IMAGE_FORMAT?
20:06 anholt: yeah
20:11 daniels: anholt: ok, neat - I guess pull that up to src/util/, then into a table which adds canonical conversions to at least DRM_FORMAT as well as sizes/shifts, then start pulling all the hand-rolled conversions?
20:15 anholt: daniels: I was thinking that basically once you #define to PIPE_FORMAT/MESA_FORMAT in the header, one could start just collapsing the lookup tables translating between them. and then, you can probably delete the shifts/offsets from those tables since you should be able to get them from the format descriptions.
20:15 anholt: not sure we need to build a new thing first
20:25 daniels: anholt: ah yeah, so it is
20:29 alyssa: hero
20:38 zmike: still waiting on driver rbs for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117
20:39 zmike: don't get left behind
20:39 zmike: review now before your driver is broken!
21:11 alyssa:pretends to be a lima developer
21:12 alyssa: zmike: I think that MR will let us compile VS prologs at CSO create time
21:12 alyssa: so that's nifty
21:14 zmike: 💪
21:19 airlied: zmike: you know the wierd things, what is EXT_depth_clamp_zero_one and why does mesa expose it only for anv and badly at that? :-)
21:19 zmike: well
21:20 zmike: it's for clamping depth to zero and one
21:20 zmike: so it can't go negative or unrestri,cted
21:20 zmike: but I can only answer that part of the question
21:21 alyssa: for Z32F?
21:22 airlied: so hasvk seems to expose it properly, anv half exposes it, neither of them deal with VkDeviceCreateInfo accepting the feature extension
21:23 airlied: though maybe that is magic now
21:23 Sachiel: that is magic now
21:23 airlied: ah I loves the magic
21:24 alyssa: can't have bugs if magic
21:24 alyssa: or something
21:25 airlied: ah so the driver just doesn't seem to care if the ext is set or not
21:25 alyssa:vaguely apologizes
21:25 airlied: which maybe is fine
21:25 Sachiel: yeah... we do that a lot
21:25 Sachiel: I don't see hasvk setting the feature bit though
21:26 Sachiel: not sure if that's intended
21:26 airlied: hasvk sets it directly in features->
21:26 Sachiel: ah, yeah, hasvk doesn't use magic
21:26 airlied: as opposed to magic
21:27 alyssa: why is hasvk in tree
21:34 alyssa: anarsoul: could I get an ack on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24341 ? thanks :)
21:35 alyssa: it's enunes' code, just split off from the draft MR
21:35 anarsoul: hmm, I thought that enunes is working on it
21:35 anarsoul: sure, let me take a look
21:35 alyssa: the draft MR has ppir working and gpir not working
21:35 alyssa: I split off just the ppir commit so that can land now, while gpir gets sorted
21:36 airlied: alyssa: where else would it be? probably has more users than panfrost :-P
21:36 alyssa: airlied: good point, let's kick out panfrost too ;~P
21:36 airlied: like why is anything in tree? let's just kick it all out to other trees
21:38 alyssa: ambitious!
21:38 alyssa: =D
21:39 anarsoul: alyssa: It's quite a change, I'll take a look later tonight, I made a note for myself
21:40 alyssa: anarsoul: thanks!
21:40 alyssa: (enunes wrote it and says deqp is happy, and I reviewed it with my NIR hat on and I'm happy, I just don't want to randomly merge it without an ack since I pulled it off a draft MR)
21:42 anarsoul: why not to ask for enunes' ack then? :)
21:43 alyssa: I would also accept that ;~P
21:46 enunes[m]: alyssa: anarsoul: I'll get back to that in the next days, unfortunately didnt have much time to followup on it since the weekend
21:47 alyssa: enunes[m]: thanks :) can I land the ppir commit now though?
21:48 alyssa: (would let me busy myself deleting abs/neg/sat)
21:49 anarsoul: enunes[m]: btw, are there any functional changes? or differences in shader-db?
21:54 enunes[m]: as far as I could tell no changes in deqp or piglit for that patch, CI should confirm that, but shaderdb takes a hit
21:56 enunes[m]: minor things can be improved on that patch like the remaining is_ssa and removing reg_base, but I don't necessarily object going with it now if it helps unblock work...
21:58 enunes[m]: if anarsoul is ok with it merge it :)
21:58 anarsoul: can I see shader-db diff first?
22:03 enunes[m]: I don't have it at hand now
23:01 Kayden: zmike: thanks for the heads up, testing a tidied iris patch now
23:03 zmike: I've been pinging for two weeks and I'll probably need to ping for another two before it has a chance of landing
23:03 zmike: the struggle of refactoring 🤕
23:04 Kayden: yeah :(