00:00 airlied: the chase derefs across casts and write const string to buffer are the bits that probbably have other use cases
00:00 airlied: I'm 99% sure I've written a deref var chaser that jumps casts before
00:04 curro: jenatali, jekstrand: yeah im okay with things, didnt ask for any conditions for it to be merged. but yeah it would be great to try to deduplicate things some more as follow up
00:04 jekstrand: curro: Ok, cool. jenatali filed an MR with all the requested things to do later.
00:06 jenatali: curro: Thanks :) I'd love some help pruning the AMD native IR stuff so I don't have to worry about that on Windows, then I can tackle the MSVC stuff and start refactoring more
00:06 jenatali: And with that... here goes nothing I guess
00:07 kusma: Exciting :-)
00:07 curro: good ill take a look when im back home need to grab groceries
00:07 jenatali: jekstrand: I added my r-b to your pass rewrite btw, thanks again
00:08 jekstrand: yw
00:09 jekstrand:reads printf code
00:09 jekstrand:sees the struct variable and goes "Wha? Whose rubbish idea was this?!?"
00:09 jekstrand:remembers it was his idea....
00:09 jenatali: airlied: After !7565 lands, if you want to rebase (or want me to do it) I can start looking at hooking up your new printf ABI to the runtime
00:09 jenatali: jekstrand: Have you had a better idea since then? :P
00:10 jekstrand: jenatali: Nope. :)
00:10 jekstrand: jenatali: But I've got an even more rubbish idea.....
00:10 jekstrand: jenatali: We could encode the printf format string in the struct name. :)
00:10 jekstrand: i.e. name the struct "printf:<format_str>"
00:11 jenatali: jekstrand: I'm not sure if I like that idea or hate it with a passion :P
00:11 jekstrand: jenatali: That is the correct response, I believe. :)
00:14 kusma: Using the name as arbitrary payload, how could this possibly go wrong?
00:17 dcbaker[m]: `printf("rm -rf /")` anyone?
00:25 jekstrand: jenatali: I'm really wondering if we don't want nir_instr_type_printf.
00:25 jekstrand: jenatali: I really hate that idea
00:25 jekstrand: I don't want to add that much to NIR just to support this stupid thing.
00:25 jekstrand: But ugh...
00:25 jenatali: jekstrand: I think the decision to be made is what's going to hold back NIR the least. This can be an ugly thing off in the corner as long as it doesn't get in the way
00:25 jekstrand: It's just so totally alien
00:25 jenatali: Yeah, a variadic instruction with tons of args
00:25 jekstrand: jenatali: Yeah. The problem is that it's *really* ugly.
00:25 jekstrand: We have variadic things. Calls, tex, etc.
00:25 jekstrand: And it's not just that it has tons of args. It has multiple types of args.
00:25 jenatali: Right, but each one is its own instruction type
00:25 jekstrand: In particular, it has int/float args and it has string args and they're totally different things.
00:25 jenatali: Yeah...
00:25 jekstrand: It's the string args that are threatening to push me over the edge.
00:25 jenatali: And even float is weird in that it probably got converted to double which you almost definitely didn't want/need
00:25 jekstrand: right
00:33 airlied: jekstrand: not sure we need the format string in names anyways, since it never goes into nir now, we parse it out at vtn stage, nir only ever really sees the index
00:36 airlied: jekstrand: not sure about parsing the format string in vtn, maybe that is the only way to know for sure something is %s and heuristics will get caught out
00:41 jekstrand:wishes we could keep using the "return -1" approach. :P
00:41 jenatali: :P
02:27 airlied: jenatali, jekstrand : technically I don't think converting %p to strings is violating the spec
02:27 airlied: " The argument shall be a pointer to void. The pointer can refer to a memory region in the global, constant, local, private, or generic address space. The value of the pointer is converted to a sequence of printing characters in an implementation-defined manner."
02:27 airlied: implemenation defined seems a pretty broad statement :-P
02:50 airlied:writes a multi arg printf test and isn't surprised it explodes
02:51 Sachiel: explosions make everything more fun
03:03 jekstrand: airlied: yeah....
03:24 airlied: jekstrand: I might look at parsing the printf str in vtn, I wonder if I can use similiar code as in clover
05:06 jekstrand: airlied: You should be able to look for %[.0-9<other stuff>]s
05:50 airlied: jekstrand: if you think reviewing my nir code is bad, you don't want to invite me anywhere near a regular expression :-P
05:50 airlied:envisages a perl callout :-P
05:53 airlied: okay strstr here we come
06:21 airlied: oh wow it wasn't horrid
06:33 airlied: okay %p works gain
06:35 airlied: jekstrand, jenatali : okay now with format string parsing shared with clover
06:54 airlied: jekstrand, jenatali : we were lowering printf before explicit sizing, which was why those values were filled out
06:56 airlied: and of course moving printf lowering later blows things up
07:17 airlied: jekstrand, jenatali : uggh vtn_opencl.c:handle_instr only handles 5 src, which is kinda limiting for printf testing :-P
07:19 jekstrand: airlied: I wondered about that.
07:19 jekstrand: airlied: printf needs to be able to handle arbitrarily many sources.
07:20 airlied: yeah I'll have to fix the handling to malloc above a certain size
07:20 airlied: jekstrand: how against the explicit struct sizing in vtn are you?
07:20 airlied: because I think changing the pass ordering will have a lot of fallout
07:20 jekstrand: airlied: Or make `handle_printf` take opcode and const uint32_t*
07:21 airlied: I've pushed a reworked pass ordering to the MR
07:21 jekstrand: airlied: Why do we need explicit sizing?
07:21 jekstrand: airlied: I don't see how it buys us anything whatsoever.
07:21 airlied: jekstrand: the lowering passes uses it
07:21 airlied: to work out where in the ssbo to put things
07:22 airlied: and that lowering pass happens before we call vars_to_explicit
07:24 jekstrand: airlied: Ugh... Yeah...
07:24 jekstrand: airlied: This is a problem I've come across with my ANV kernel support for BVH building.
07:24 jekstrand: We really want to assign explicit types very early but assign variable locations later after we dead-code a bunch.
07:25 airlied: so we should split the pass?
07:26 jekstrand: Yeah, we probably should.
07:27 jekstrand: I've just not liked any of my attempts at doing so.
07:27 jekstrand: What I'm doing now in ANV which is totally gross is running vars_to_explicit once and then, later, stomping shared_size and scratch_size to 0 and running it again.
07:27 jekstrand: It's terrible
07:28 jekstrand: And I'm very ashamed of what I've done. :)
07:28 jekstrand: airlied: Part of what makes this a mess is that we don't have a solid concept of a type's size.
07:29 jekstrand: For scalars, vectors, and arrays, it's pretty obvious.
07:29 jekstrand: For structs, less so.
07:29 jekstrand: We've got glsl_type::explicit_size but I don't really like it.
07:29 airlied:adds back explicit as reordering the pases broke a bit
07:29 jekstrand: I kind-of want struct types to have an actual size that's baked into the type.
07:30 airlied: is that one of those easy for CL, messy for GL type situations
07:30 jekstrand: I don't think so
07:31 jekstrand: Honestly, we could probably use glsl_type::explicit_size() as-is.
07:31 jekstrand: There are just annoying corners
07:31 jekstrand: Which structs having an actual size would fix, I think.
07:32 jekstrand: In any case, I don't think any of that's really necessary for splitting the type/location assignment in two.
07:32 jekstrand: I'm just complaining. :)
07:32 airlied:will take a look tomorrow if I can do anything, needs to fix printf multi args as weel
07:33 jekstrand: But, generally, we want to make explicit types very close to when we come out of spirv_to_nir and assign locations after optimization.
07:33 jekstrand: That's the rub I ran into.
07:33 jekstrand: And I think the same roughly applies to the printf situation.
08:34 pepp: idr: got it, thanks
09:12 pq: When should one use drmModeGetConnector() instead of drmModeGetConnectorCurrent()?
09:14 MrCooper: pepp: looks like you accidentally pushed to your optimize_dlist branch
09:15 emersion: pq: drmModeGetConnector polls, drmModeGetConnectorCurrent doesn't
09:15 emersion: some connectors only show up as "connected" when polled
09:16 emersion: (e.g. old VGA, or bad cables where HPD is disabled)
09:16 pq: emersion, that I know, but why/when do I want to poll?
09:16 pepp: MrCooper: oh right - that's because I also test the 3 commits on top of this branch. Thanks
09:17 pq: Should I always poll all VGA type connectors?
09:17 emersion: would be nice to have an async API to poll btw
09:17 emersion: i wouldn't try to decide whether to poll depending on connector type…
09:17 pq: If polling is necessary, does it mean that hotplug event will not come without polling first?
09:18 pq: emersion, right, so how I decide whether to poll or not?
09:19 pq: I'm trying to figure out if it is safe for weston to stop polling, and when it is safe.
09:19 emersion: if you don't poll: when plugging a screen, the kernel won't be aware that the connector is plugged in, and will report it as disconnected
09:19 emersion: ^ cc danvet
09:20 pq: so, does that mean that on start-up, I should poll everything, but on hotplug events, I should not poll?
09:20 emersion: but honestly… i'm starting to wonder whether polling is really a good idea
09:20 pq: right ;-)
09:20 emersion: if anything, users can run a tool that does the polling, and the kernel should then trigger uevents if necessary
09:21 emersion: e.g. drm_info will poll
09:21 pq: users can?
09:21 pq: polling is not privileged?
09:21 emersion: (users used to run `xrandr` to poll)
09:21 pq: xrandr tells Xorg to poll, so
09:21 emersion: hm, i don't think so, because drm_info is slow :P but haven't checked
09:23 pepp: MrCooper: fixed both branches
09:24 pq: Doesn't polling on VGA potentially cause a visible glitch on screen? :-)
09:25 emersion: reading the kernel source, it doesn't seem like polling is privileged
09:25 pq: ok
09:26 emersion: drm_mode_getconnector calls fill_modes when count_modes == 0
09:26 pq: btw. wasn't there also a sysfs file to trigger a poll?
09:26 emersion: drm_helper_probe_single_connector_modes will update the connector's status
09:26 danvet: mupuf, if you can pls close the MR for this modesetting hack
09:26 emersion: many drivers set fill_modes to drm_helper_probe_single_connector_modes
09:27 danvet: pq, poll when the user is fed up and fires up the manual configuration tool
09:27 emersion: pq: that does ring a bell
09:27 danvet: which is also not perfect, because manual polling might wreck the display
09:27 danvet: the kernel should auto-poll for you as much as is reasonable in the background
09:27 emersion: https://lore.kernel.org/patchwork/patch/216844/
09:27 pq: danvet, ...which weston does not have. Is that the only case where poll is needed?
09:28 danvet: any additional stuff we do with full probe is potentially disruptive
09:28 danvet: as in, screen flicker
09:29 pq: danvet, cool, so for a display server it is totally fine to never poll itself?
09:29 mupuf: danvet: done, thanks :)
09:29 danvet: pq, hm I think most kms drivers suck at boot-up
09:29 danvet: and rely on fbcon doing the first poll
09:29 danvet: so if that's not enabled, you'd need to poll when the server starts
09:29 danvet: which is nasty, because it's expensive, so fairly big delay at startup :-/
09:29 pq: danvet, isn't that a driver bug?
09:30 emersion: danvet: any way to make polling async?
09:30 pq: right now, weston always polls everything both on start-up and on hotplug events. I'm looking to change that to speed things up.
09:30 emersion: "please poll in the background and trigger a uevent if something changes"
09:30 pq: emersion, he said kernel already does polling in the background
09:30 danvet: pq, well yes
09:31 danvet: similar after resume
09:31 danvet: the trouble is, as long as many drivers are buggy compositors do full probe
09:31 danvet: which means driver bugs are papered over
09:31 emersion: ok
09:31 danvet: well for hw that needs polling
09:31 danvet: the remaining gaps boil down to driver bugs
09:31 emersion: i'm not too afraid about saying to my users "report kernel bug plz"
09:32 pq: danvet, I'm perfectly happy to "break Weston" and blame drivers, if that is justified. :-)
09:32 emersion: especially when there's an easy workaround
09:32 emersion: so tl;dr never poll and we should be fine?
09:32 danvet: I think so
09:32 emersion: cool
09:32 pq: danvet, thanks a lot, I have a contributor who wants to write the weston patch to never poll again.
09:33 danvet: emersion, maybe kernel uapi doc in the getconnector struct?
09:33 danvet: iirc we have something already
09:33 emersion: i remember we have something there
09:34 emersion: hm
09:34 danvet: hm not much kerneldoc for uapi/drm/drm_mode.h
09:34 emersion: drm_mode_get_connector has nothing
09:34 danvet: documenting struct drm_mode_get_connector
09:34 danvet: yeah
09:34 emersion: but i can swear i saw something about it
09:34 danvet: plus that file has a lot of malformed kerneldoc
09:35 emersion: maybe it ws in the ml
09:35 danvet: libdrm docs?
09:35 emersion: ah
09:36 emersion: no
09:36 emersion: only drmAvailable, drmHandlEvent and drmModeGetResources are documented there
09:37 emersion: that reminds me, the connection enum is magically defined in libdrm...
09:38 emersion: oh, no, you're right
09:38 emersion: the comments in the header files explain this
09:39 emersion: between libdrm headers, libdrm man pages, kernel ioctl structs, and internal kernel functions
09:39 emersion: there's a lot of potential for duplicates
09:39 emersion: and missing docs
09:41 emersion: danvet: related: what should user-space do with DRM_MODE_UNKNOWNCONNECTION?
09:42 pq: emersion, the reason I came up with this question orignally is that drmModeGetConnector() has no docs I could find.
09:42 pq: and the doc for drmModeGetConnectorCurrent() is not exactly recommending to ditch drmModeGetConnector
09:42 danvet: emersion, ah another good one to document I guess
09:43 danvet: emersion, autoconfig should try to light up all connected outputs
09:43 danvet: if there's none, also try the "unknown"
09:43 danvet: if there's none, give up
09:46 emersion: ah, interesting
09:47 emersion: i really wonder where to document this one, since there's nothing in uapi headers
09:47 emersion: i guess i'll need to type the status prop patch
09:48 emersion: other random question: thoughts on exposing a "possible crtcs" connector prop, to make it so user-space doesn't need to deal with drmModeEncoder anymore?
09:54 danvet: emersion, yeah we need to start there
09:54 danvet: the lease stuff has kerneldoc
09:54 danvet: emersion, uh make it a wrapper in libdrm maybe?
09:55 emersion: ah, yeah, maybe
09:55 danvet: emersion, hm if you never probe, maybe we should add that for unknown, autoconfig should try to do a full probe (at least at boot-up or so)
09:55 danvet: since unknown happens when we can't do the invasive load balancing stuff that results in flicker
09:55 danvet: or maybe that should be the fallback for "no output detected" dunno
09:56 danvet: the thing is, the last hw that can do this is like over 10 years old anyway
09:56 emersion: what should happen if i got one CONNECTED connector, and one UNKNOWN connector?
09:56 danvet: ignore unknown
09:56 emersion: ok
09:56 danvet: most likely it's a ghost
09:56 danvet: and so the user would get pissed about half the desktop missing if you have expand mode
09:56 danvet: or tiny resolution if you clone
09:57 danvet: unknown = "all the probe tests we've done say disconnected, but there's some probes we couldn't do for $reasons"
09:58 emersion: can drmModeGetConnector do the missing probes>
09:58 danvet: chances of there actually being something connected are very low
09:58 emersion: ?
09:58 danvet: yup
09:58 danvet: or well, should
09:58 emersion: ok cool
09:58 danvet: I think there's some oddball cases where even a full GetConnector can give you unknown
09:59 danvet: but that's all really old hw anyway
10:00 danvet: (some gen2 i915 devices have only 1 crtc but 2 outputs, so if the other output is on we can't use the crtc to do load detection because it's in use)
10:00 emersion:uses a gen2 i915 device daily…
10:01 danvet: laptop or desktop?
10:01 danvet: laptop have 2 pipes iirc
10:01 emersion: laptop
10:01 emersion: ok, so i shouldn't have this issue then :P
10:01 emersion: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/101
10:01 gitbot: Mesa issue (Merge request) 101 in drm "Document drmModeConnection" [Opened]
10:02 emersion: ^ done in libdrm because that's the only place where we can document it…
10:03 danvet: emersion, I found it
10:03 danvet: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/101
10:03 gitbot: Mesa issue (Merge request) 101 in drm "Document drmModeConnection" [Opened]
10:03 danvet: file:///home/daniel/linux/src/Documentation/output/gpu/drm-kms.html?highlight=drm_connector_status#c.drm_connector_status
10:03 danvet: I think would be really good to document the uapi struct a bit better and link to the stuff we have already
10:03 emersion: i can't open your file:// urls
10:03 emersion: :P
10:04 emersion: https://dri.freedesktop.org/docs/drm/gpu/drm-kms.html?highlight=drm_connector_status#c.drm_connector_status
10:04 danvet: https://dri.freedesktop.org/docs/drm/gpu/drm-kms.html?highlight=drm_connector_status#c.drm_connector_status
10:04 danvet: yeah
10:04 danvet: also disappointed in your hacking skills
10:04 emersion: cool!
10:04 emersion:needs to practice more
10:05 emersion: if any this was uapi…
10:05 emersion: only*
10:06 emersion: should i just copy-pasta this to libdrm?
10:06 danvet: dunno
10:06 danvet: maybe
10:07 danvet: I think we should also improve the kerneldoc for the uapi struct
10:08 emersion: yeah definitely
10:08 emersion:proceeds to copypasta libdrm docs to kernel uapi
10:08 danvet: I wonder whether we should vendor libdrm into the kernel
10:09 danvet: just for the docs essentially
10:09 emersion: what problems will that solve>
10:09 emersion: ?
10:09 danvet: we could document the uapi structs and the libdrm wrappers together
10:10 emersion: you mean in the same patch? they would still be duplicated right>
10:10 emersion: bleh, can't type interrogation points apparently
10:10 danvet: we could cross reference at least somewhat
10:10 danvet: for the overview section
10:11 danvet: also libdrm is a lot deader than the kernel
10:12 emersion: ugh, the "probe" flag is actually implemented as "is modes_ptr NULL?"
10:12 danvet: it's cute, isn't it
10:13 emersion: it _kind_ of makes sense, but…
10:13 danvet: look at the flow for the "query the size of the mode array without probing"
10:18 pq: thank you for all that work you're doing :-)
10:36 danvet: tzimmermann, btw want igt commit rights or have already?
10:36 danvet: maybe ping ivyl or Adrinael if so
10:37 danvet: tzimmermann, also maybe you could volunter jonas mark for the review, they seem to care about fbdev
10:40 tzimmermann: danvet, i don't have igt commit rights
10:41 tzimmermann: for the single patchset, someone could merge it.
10:43 tzimmermann: oh, the name is jonas? i though mark
10:46 MrCooper: mutter/gnome-shell just started using marge-bot, and immediately disabled direct merging for developers. Is it time for Mesa to do the latter as well?
10:47 jadahl: MrCooper: fwiw, there is no way to disable it for all developers, 'maintainers' still can accidentally merge
10:47 MrCooper: yeah, that's fine
10:47 krh: when was the last time anybody merged manually?
10:47 MrCooper: maintainers are supposed to use their powers responsibly :)
10:48 MrCooper: krh: 15 hours ago
10:48 krh: MrCooper: what for? I guess it's still necessary for disabling broken CI
10:48 MrCooper: interfering with another MR Marge was trying to merge
10:50 MrCooper: krh: not sure what your last question was referring to
10:50 krh: MrCooper: what are the reasons we still do manual commits?
10:51 MrCooper: mostly the stable branches
10:51 MrCooper: there's normally no reason for master
10:52 MrCooper: BTW I didn't say manual commits were still supposed to be used :) Just that maintainers still being able to in theory is fine
10:53 krh: MrCooper: right and I just realized to disable broken CI, you just disable it in the gitlab-ci config and then it won't block marge landing that commit :)
10:54 MrCooper: exactly
11:57 pendingchaos: jekstrand: does nir_opt_dce have to work with unstructured control flow?
11:57 pendingchaos: I think I can make the pass much faster but I'm unsure if I can assume structured
11:58 pendingchaos: karolherbst: ^?
12:00 tzimmermann: danvet, may i ask you for a review of my shmem patchset: https://patchwork.freedesktop.org/series/83959/ ?
12:02 emersion: eric_engestrom: do i need to do anything wrt. https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/72 or just wait?
12:02 gitbot: Mesa issue (Merge request) 72 in drm "man: convert to reStructuredText" [Docs, Opened]
12:38 karolherbst: pendingchaos: good question, but why would it matter?
12:46 tango_: OT: I get this «Failed to get security report information. Please reload the page or try again later.» when opening MR 72 linked above
12:47 emersion: yeah, been getting that as well
12:47 emersion: doesn't seem to affect anything
12:48 tango_: (fwiw I'd bikeshed in favor of asciidoc rather than rst, but I'm not going to do the work so ignore this message)
12:49 emersion: tango_: kernel already uses rst, rst may be also used to generate a doc website
12:49 pendingchaos: karolherbst: currently my changes visit the cf nodes and repeats the pass for loops to dce instructions in them correctly
12:50 pendingchaos: there are no loop cf nodes if the shader is unstructured, but there might be blocks that need repeating
12:51 pendingchaos: maybe I could make my changes a little faster and remove the structured requirement by using nir_block_worklist instead
12:51 tango_: emersion: np, as I said it was bikeshedding. I prefer adoc to rst ;-)
12:52 karolherbst: pendingchaos: dce kind of feels like this pass which doesn't need a structured shader
12:52 emersion: yeah. i prefer scdoc to asciidoc/rst personally, but it's also bikeshedding
12:53 karolherbst: the successors/predecessors links are all fine, so you really just need a proper way of iterating through the shader.
13:07 pendingchaos: I just remembered, structured control flow is also useful since the pass can know if it might have to visit a block again later
13:07 pendingchaos: and only visit instructions once
13:07 danvet: tzimmermann, so mripard also asked me for some review and I'm woefully behind on everything, can't you cross review?
13:07 karolherbst: pendingchaos: why would it matter for dce in an ssa shader?
13:07 pendingchaos: looks like the current version already doesn't work with unstructured? since it uses nir_foreach_block instead of nir_foreach_block_unstructured
13:08 karolherbst: ahh yeah, currently most passes won't work
13:08 karolherbst: I think jekstrand fixed a hand ful
13:08 karolherbst: but yeah
13:09 tzimmermann: danvet, what does he want to get reviewed?
13:10 karolherbst: the most trivial dce implementation could just run backwards through a shader with safe iterators and throw stuff away, which isn't an output or not referenced
13:10 karolherbst: (registers being a bit weird)
13:10 karolherbst: (or variables)
13:10 pendingchaos: karolherbst: visiting instructions only once is an optimization, it doesn't matter for correctness
13:10 pendingchaos: IIRC the difference was significant
13:11 karolherbst: sure, but the same you get when you iterate backwards
13:11 danvet: tzimmermann, some vc4 patches
13:11 danvet: mripard, ^^
13:11 karolherbst: and just delete while you iterate
13:11 danvet: I did some high level bikesheds on them already, so really just need a read-through + ack
13:12 tzimmermann: danvet, mripard, this: https://patchwork.freedesktop.org/series/83865/ ?
13:54 robher: pinchartl: Here's what I'm ending up with on the graph schemas looking like: https://pastebin.com/ALA3iKE8
13:57 pinchartl: robher: could be worse. it would be nice if the inner $ref could be avoided, but I understand that's a tooling limitation ?
13:57 pinchartl: the port-base vs port is a bit annoying :S
13:59 robher: pinchartl: It's just how json-schema works.
14:02 robher: pinchartl: Essentially '-base' means you have extra properties to define. I worry it will be hard to get right.
14:05 pinchartl: getting it right won't be that difficult. making sure it will always be right... I also worry we would miss things during review
14:11 mripard: danvet: tzimmermann: https://lore.kernel.org/dri-devel/20201105135656.383350-1-maxime@cerno.tech/ would be more important, it's a fix and the series you pointed at depends on it
14:12 mripard: https://lore.kernel.org/dri-devel/20201029134018.1948636-2-maxime@cerno.tech/ would be great as well :)
14:21 tzimmermann_: mripard, i'll take a look tomorrow
14:22 mripard: tzimmermann_: awesome, thanks
16:35 jekstrand: pendingchaos: I had a use for DCE on unstructured at one point but I don't think it's really needed right now.
16:35 jekstrand: pendingchaos: If I understand what you're intending, we could probably keep both paths working if we really wanted.
16:51 Lyude: Hey - I'm looking at https://gitlab.freedesktop.org/gfx-ci/cibuglog as we're looking at experimenting with this at Red Hat for our own testing needs. I see that we'd need to setup our own postgresql host, but am I also right in assuming we wouldn't be able to get access to the cibug log data that Intel's actual CI uses just from hosting our own instance of the docker image mentioned on there?
16:54 ickle: Lyude: better to ask on intel-gfx or intel-gfx-ci
16:54 Lyude: oh oops
16:54 Lyude: meant to ask there in the first place :P, sorry about that
17:16 jenatali: airlied: Mind if I rebase your printf MR now that our CL stack has landed? I'd like to hook it up for us as well, and then I can push that patch to your MR as well
18:58 lrusak: would it be possible for me to convert a P010 format to XRGB2101010 through GL_TEXTURE_EXTERNAL_OES ?
19:05 lrusak: or how is p010 handled internally in mesa?
19:08 lrusak: or is this not possible and it will always convert to an 8bit format?
19:10 lrusak: I guess it's only possible by using R16 RG1616 method?
19:14 airlied: jenatali: rebase away though it's a bit rough at the moment
19:14 emersion: it should be possible to import a P010 buffer as a FBO, then paint it into a XRGB2101010 FBO, lrusak
19:14 lrusak: emersion, thanks, that's what I'm looking into now
19:14 jenatali: airlied: Not too bad, I left some comments in the MR but it should be functional enough for me :)
19:14 emersion: lrusak: it should at least be possible on my AMD GPU
19:15 lrusak: :)
19:15 emersion: GL_TEXTURE_EXTERNAL_OES can only be textured from, they can't be rendered to
19:16 airlied: I'm going to fix up the few piglit tests I wrote today hopefylly
19:18 lrusak: emersion, but if I have an FBO with the correct format can I texture from OES into it and still have a 10bit format?
19:34 emersion: the FBO won't change its format on the fly
19:53 airlied: jenatali: I was considering changing the non-format string storage into one pointer with the strings concatentated after it
19:53 airlied: just to avoid the extra malloc
19:53 jenatali: airlied: Sure, seems reasonable
19:53 jenatali: Dunno if you saw my comment yet, but they're all leaked right now :)
19:54 airlied: I thought I freed them in clover
19:54 jenatali: Ah, I missed that
19:55 jenatali: I expected to see them ralloc'd or somehow attached to the lifetime of the nir_shader
19:55 airlied: clover transfers them to the module after ralloc_free
19:55 airlied: I'm kinda thinking a spirv_to_nir output might be better than stashing them in nir_shader
19:57 jenatali: airlied: I'd probably still ralloc them with the shader, and have clover ralloc_steal them
19:58 jenatali: Eh maybe, I dunno, that's a bunch of extra code, but makes it harder to accidentally leak them, and easier to use-after-free
20:04 airlied: jenatali: considering there is only 2 users for this code I'm not sure I care about accidents
20:04 jenatali: Fair
20:05 airlied: but yeah I might ralloc them
20:15 jenatali: Ugh this stupid printf test is so unreliable on Windows...
20:18 jenatali: Finally: PASSED 57 of 57 tests.
20:28 jenatali: airlied: Double-checking before I stomp on you, objections if I push the branch, rebased with clon12 changes on top?
20:28 airlied: jenatali: go for it I'll rebase my local stuff after that
20:30 jenatali: airlied: Done - there's one fixup commit in there that should get squashed in but I figured I'd leave that until after someone looks at it
20:44 jekstrand:should probably find a barf-bag and read it again
20:44 airlied: jekstrand: give it a minute
20:45 airlied: just fixing up the instr handling for > 5 sources
21:00 daniels: jenatali: \o/
21:01 jenatali: daniels: \o/
21:01 jenatali: daniels: How's that CI coming? :)
21:17 airlied: jekstrand, jenatali : turd polishing complete for now
21:17 jenatali: airlied: Great :) will take another look
21:18 airlied: I think the printf clover bits have a bug with multiple args but otherwise the vtn/nir bits should be "good" :-P
21:20 jenatali: airlied: You added back in explicit offsets into printf struct construction?
21:22 airlied: jenatali: yeah reordering the passes wasn't looking like fun
21:22 airlied: though maybe it wasn't as buggy as I thought
21:22 jenatali: airlied: Cool, I had to do it too, it wasn't pretty..
21:23 jenatali: Ended up needing to do vars_to_explicit_types twice for temp, once before eliminating dead variables (while printf struct was there) and once after to properly set the scratch size
21:24 airlied: jenatali: yeah I don't think we should do that kind of dance
21:24 airlied: I think we should look at jekstrand's ideas of splitting the vars_To_explicit_types pass
21:26 jenatali: That's not a bad idea, yeah
21:27 airlied: at least I don't think we should complicate the passes we have now just to avoid setting some sizes in the printf code
21:31 jekstrand: airlied: That's not the only reason. :)
21:31 jekstrand: airlied: opt_deref needs the information in order to eliminate redundent alignment casts.
21:32 daniels: jenatali: well, if now knowing several more things that don’t work is good then ... good? :\
21:33 daniels: there’s some really weird stuff around global connection reuse that I just don’t understand, and I’m really hoping it’s not yet another instance of Docker not working as well as you’d hope
21:33 jenatali: daniels: :(
21:43 LiquidAcid: emersion, hey, do mind me asking a question about gamescope? (wlroots related)
21:44 emersion: sure, feel free
21:45 jenatali: airlied: Updating my last patch on your MR to deal with your metadata updates, FYI
21:46 LiquidAcid: emersion, as a wlroots based application, it should honor the WLR_ envvars, right?
21:47 emersion: yes, for the parts of wlroots used by gamescope
21:47 LiquidAcid: so WLR_DRM_DEVICES should work
21:47 emersion: gamescope for instance doesn't use wlroots backends
21:47 emersion: so WLR_DRM_* won't work
21:47 LiquidAcid: aha
21:47 emersion: wlroots is more of a collection of helpers than a framework
21:47 LiquidAcid: ok, that explains why it behaves like i behaves
21:48 emersion: so compositors are free to use what they want, and not use what they don't want
21:48 LiquidAcid: i was trying to run sway and gamescope in parallel, sway on the igpu, and gamescope on the dgpu, but gamescope didn't exactly use the right device
21:48 emersion: gamescope doesn't support multi-gpu
21:48 emersion: ah, yeah
21:48 emersion: i don't remember how gamescope enumerates GPU devices
21:49 emersion: i'd merge a patch adding a flag to select the GPU
21:52 LiquidAcid: also judging from the code it seems like there currently isn't any way to select a different connector, but maybe i missed something there
21:55 airlied: jenatali: cool, I'm just fixing up the last clover side bugs in the printing
22:18 daniels: jenatali: hoping that closing connections instead of RST will be less confusing ... let’s see
22:30 jenatali: Hm... I wonder if anybody ever wants Windows.h's stupid min/max macros...
22:30 jekstrand: jenatali: If they're stupid then probably no. :P
22:31 jenatali: jekstrand: It's literally min and max as macros, that alone is enough to make them stupid
22:32 jekstrand: jenatali: Is it at least MIN/MAX and not min/max?
22:33 jenatali: Nope
22:33 jekstrand: :(
22:33 jekstrand: Then I'm going with "no" :)
22:33 jenatali: Trying to get Clover building with MSVC, lots of instances of weirdness as a result of those :P
22:33 jekstrand: jenatali: #undef min?
22:33 jenatali: Disabling it globally didn't blow up for anything I'm building so far, except we have a couple instances in the d3d12 driver that snuck in...
22:33 jenatali: -DNOMINMAX on the command line
22:34 jekstrand: Yeah, I suspect you can set that option globally when building with MSVC and no one will care.
22:35 dcbaker[m]: looks like swr might use it, but they explicitly undef it
22:35 dcbaker[m]: oh, no wait
22:35 dcbaker[m]: they explicitly set it then undef it at the end of the file
22:36 jekstrand: :D
22:36 jenatali: Odd
22:36 dcbaker[m]: but I'd test with SWR on windows (I don't think we do that in any of our CI)
22:36 jenatali: Thanks, I'll see if I can figure out how to do that
22:37 dcbaker[m]: src/gallium/drivers/swr/rasterizer/common/os.h
22:37 dcbaker[m]:sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/dBcihjsAVixaQnKXjsJEiJHR/message.txt >
22:37 dcbaker[m]: you need llvm (I presume you have that already) then -Dgallium-drivers=swr
22:37 jenatali: Ah, cool
22:41 airlied: multi args has some alignment issues, bleh
22:58 danvet: tfiga, finally got around to compile vivid and run this with yavta
22:58 danvet: didn't go boom
22:59 danvet: anything I should check for?
23:01 airlied: jenatali: making multiple arg work is kinda messy with alignment
23:01 jenatali: airlied: Yeah, that doesn't surprise me
23:01 jenatali: Where's the problem you're hitting?
23:02 airlied: since at least in clvoer we have a 4 byte headers, then a 4byte format string id
23:02 airlied: but we parse off the 4 byte header, memcpy the rest of the buffer in
23:02 airlied: which means any alignments after that for 8-bytes are wrong
23:02 airlied: I just hacked up 8 byte header + 8 byte format string locally to make sure that works
23:03 airlied: granted it won't be compatible with the llvm backend
23:03 jenatali: I'm still not following exactly, where's the alignment problem?
23:04 airlied: yeah it's not a simple thing to explain
23:04 airlied: but the ssbo side and what I work out on the cpu side don't end up the same
23:06 airlied: one test ends up with <header 4b> <fmt_str_id 4b> <arg0 4b> <padding> <arg1 8b> <arg2 8b> in the ssbo
23:06 airlied: but clover parsing code pull the header 4bytes off and memcpys the rest
23:06 airlied: which messes up the cpu side alignments
23:06 jenatali: Oh, it assumes the args are packed?
23:06 jenatali: Or each arg is 4byte aligned?
23:07 airlied: well once it strips off the 4b, the args end up on the wrong alignment wrt 8b
23:07 airlied: but fixing just that didn't seem to completely fix it
23:07 jenatali: Oh, it tries to align everything to the base of the buffer instead of the base of the struct?
23:08 airlied: jenatali: yes that probably explains it better
23:09 airlied: not 100% sure if the ssbo writes need to change or if I can work it out in clover
23:09 jenatali: I'd expect you could work it out in clover, or you could just not CL-align the struct and only 4-byte-align the struct members
23:11 airlied: jenatali: but will that piss off 8-byte ssb stores?
23:11 jenatali:shrugs
23:11 jenatali: CL already requires you to support writing a ulong in a packed struct at a comletely unaligned offset
23:12 jenatali: For D3D all our SSBO writes just need to be 4 byte aligned, any smaller than that and it starts to get a bit painful
23:16 airlied: jenatali: yeah probably makes sense the to cl align to 4 bytes
23:16 airlied: and do same on the cpu side
23:17 jenatali: Yeah, that way alignment to the base of the buffer is the same as alignment to the base of the struct, it's simpler to calculate
23:21 airlied: I have a test that does two printfs with a bunch of args now that should be good to validate it
23:21 jenatali: Great :)
23:37 airlied: jenatali: does cl struct size pad the end of the struct?
23:38 airlied: the second string I print is disagreeing on where format ends up
23:40 jekstrand: airlied: ish :)
23:41 airlied: so we might have to make the struct packed
23:43 airlied: yah test passes now
23:45 airlied: though still one bug left in my printf, missing a space somewhere
23:59 jenatali: airlied: Yeah CL struct size is padded to align to the largest member