00:46 redeeman: hello, what assumptions does userspace make about /dev/dri/renderD* devices? if there are no permissions to renderD128, will is renderD129 supposed to be attempted? a quick test shows that "vulkaninfo" does indeed do that, but mesa prints an error with permission denied. glxinfo does not print an error, but continues to work. I ask because I run a multiseat setup, and i notice both have 0666 permissions, and im thinking that I would
00:46 redeeman: quite prefer one seat not to touch the others graphics card for any reason at all
02:34 dcbaker: karolherbst: 1.2.0-rc1 will branch soon, and those rust fixes will be in. The -I stuff didn’t land, so we may need to do something different there in the short term
07:29 hakzsam: olv: do you plan to update https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23117 ?
07:33 olv: yeah, I should be able to get to tomorrow or the day afer
07:34 olv: sorry for the delay
07:45 karolherbst: dcbaker: okay. the flag stuff is easy to workaround though, or rather the current workaround doesn't look too ugly, so that's fine
07:45 karolherbst: ohh wait.. on debian it's broken.. nvm
08:17 pq: redeeman, I think that depends on how each application picks the GPU it wants to work with. Window system may give hints that apps might follow, but if something tell the app to really this particular "wrong" GPU, then naturally it won't work.
08:17 pq: redeeman, so it depends on what API the app is using in the first place, and does it give the API implementation an opportunity to pick an arbitrary GPU.
08:18 pq: redeeman, if there is exactly one GPU for a seat, I guess you could try setting DRI_PRIME to a devpath in the environment.
08:19 pq: redeeman, https://docs.mesa3d.org/envvars.html#envvar-DRI_PRIME
08:21 pq: it won
08:21 pq: it won't work for everything, I think Mesa EGL Surfaceless platform does not use DRI_PRIME for picking the EGL_DEFAULT_DISPLAY.
09:06 karolherbst: anholt_: yeah soo.. I think the current blockers on v3d are better handling of load/stores and kinda deal with 8/16 bit types. My load/store global impl is best effort but I think I missed a few things: https://gitlab.freedesktop.org/karolherbst/mesa/-/commit/476162c8136ebd19865f84073fcb00a8f06ddd96
09:51 kchibisov: Is mesa not supporting EGL_KHR_display_reference?
10:52 redeeman: pq: there is one gpu for each seat, would you also agree that it is probably most correct to not let seats cross contaminate? my attention was drawn to this when amdgpu_top was able to access both gpu's, but even more to my horror, chrome seems to allocate vram on both gpu's
10:55 pq: redeeman, yes, I agree. If you want separation, you should be able to have separation.
10:56 pq: especially when you already have completely separate GPUs to begin with
11:00 redeeman: i'll give it a go and just change the permissions out to match the seat permissions that are already enforced on the card devices and see, I just wanted to know if there was some assumptions from userspace that was known to break in 100 ways
11:01 pq: nothing that I know of, but I also don't know how things handle not having access to a render node
11:02 pq: render nodes are supposed to be safe in that they already isolate user contexts from each other
11:02 pq: but of course, isolating contexts does not stop someone from hogging all VRAM or GPU time
11:02 pq: hence dedicating a GPU per user makes sense to me
11:03 pq: well, per seat
11:34 alyssa: zmike: do interpolation qualifiers (flat/noperspective) need to match between the VS/FS when GPL/ESO are used?
11:34 alyssa: as far as I can tell:
11:35 alyssa: - OpenGL always gives enough information to match them without variants. ARB_separate_shader_objects requires the qualifiers to match. And linked shaders, you can just specialize at link time without variants.
11:36 alyssa: - Vulkan monolithic pipelines, same as the GL linked shader case
11:38 alyssa: - Vulkan 1.3 explicitly does not require the qualifiers to match (15.1.3 "Interface matching")
11:39 alyssa: - Vulkan EXT_shader_object spec says nothing about interpolation qualifiers. So seemingly this allows them to NOT match. This may or may not have been intended.
11:40 alyssa: - Vulkan GPL has a feature bit for this purpose: graphicsPipelineLibraryIndependentInterpolationDecoration
11:40 alyssa: Although...
11:40 alyssa: GPL proposal 5.6 comments
11:40 alyssa: "Some implementations require the interpolation decorations in the last geometry shader stage if pipeline libraries are used, and this is advertised by the graphicsPipelineLibraryIndependentInterpolationDecoration property. It is expected that these implementations are serving markets where OpenGL ES is dominant, where this requirement was never dropped for separate shader objects, unlike OpenGL"
11:41 alyssa: So apparently the GL requirement dropped at some point...
11:49 alyssa: According to Khronos wiki, GL 4.3 but I can't find a better source https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Interpolation_qualifiers
11:54 alyssa: DXVK hard requires graphicsPipelineLibraryIndependentInterpolationDecoration for GPL support https://github.com/doitsujin/dxvk/blob/0f4458e173749187c3900533196bf0327bc9fe80/src/dxvk/dxvk_device.cpp#L50C1-L57
12:11 alyssa: Bottom line is that we'll need to handle it for DXVK. Oh well.
12:11 alyssa: It's not the end fo the world. Annoying that this information is so spread out across Khronos specs.
12:19 pq: someone is still using skynet.ie address for airlied on mailing lists and I get tons of failed to deliver from gmail when replying.
12:20 pq: "Gmail will retry for 140 more hours. You'll be notified " again and again
12:22 lordheavy: Hi everybody, i'm just here to get some help; rusticl doesn't work here - clinfo doesn't detect any device and i don't know how i can't fix this problem. I use llvm/libclc/mesa from git under archlinux
12:23 lordheavy: Here are some usefull (i hope) information how i build the packages: https://paste.xinu.at/EWg6r6/
12:24 lordheavy: Output from clinfo without/with RUSTICL_ENABLE=radeonsi: https://paste.xinu.at/1JfORu/ https://paste.xinu.at/0cl/
12:25 lordheavy: Output from glxinfo: https://paste.xinu.at/43T/
12:25 lordheavy: Thanks for your help :)
12:40 karolherbst: still trying to wrap my head around all that DRM stuff, but inside drm_crtc_helper_funcs::mode_valid, can I know what connector the mode is requested on? It's really a pita that I can reject userspace modes inside drm_connector_helper_funcs::mode_valid.. and I kinda need something which comes closest to that.
12:42 karolherbst: or is it "good enough" for atomic and non atmic uapi users to do that validation inside drm_connector_helper_funcs::atomic_check?
13:01 pq: Is https://docs.mesa3d.org/gallium/distro.html the page that is supposed to tell me what are "iris" or "crocus" or "i915" when used to refer to "gallium drivers"? Or maybe the "Drivers" section on the navigation bar on the left?
13:03 pq: https://docs.mesa3d.org/amber.html is almost telling me what I wanted to know, but I also am specifically not wanting amber, so I wouldn't have known to look there.
13:07 FLHerne: pq: iris and crocus definitely belong in that Gallium list
13:09 FLHerne: probably in the 'Drivers' section too although that seems a fairly random assortment
13:09 FLHerne: could do with some more links from https://docs.mesa3d.org/systems.html
13:09 FLHerne: I note 'Drivers' lacks an index, and some pages explain what they are whereas some assume you know and go straight into details
13:12 pq: What is "Gallium Off-screen rendering" and why does it default to "NO" in the Meson summary?
13:29 MrCooper: pq: I believe that's the Gallium version of OSMesa, a special API for offscreen software rendering
13:30 pq: oh, osmesa, ok
13:32 MrCooper: lordheavy: RUSTICL_ENABLE=radeonsi is required, it can't find spirv(64)-mesa3d-.spv
14:15 Lynne: I haven't been able to get rusticl to run either, despire running fine on iris
14:26 karolherbst: is there actually a reason why we don't validate userspace modes? Seems like even if atomic_check fails, X is silly enough to set the mode regardless and stays on it?
14:26 karolherbst: or rather... do we have a 100% reliable way to fail a requested modeset from non atomic userspace so it uses a different mode or something?
14:27 pq: karolherbst, what do you mean set the mode regardless? Isn't atomic_check called as part of atomic_commit so it fail the whole commit?
14:27 karolherbst: yeah, but X doesn't seem to care
14:29 pq: The mode doesn't get set, Xorg cannot force its way through that. It can just sit there broken, but it cannot force the mode if the driver fails it.
14:29 karolherbst: okay, let me rephrase: X sits there broken
14:29 pq: ah
14:29 karolherbst: and gives me a black screen
14:29 karolherbst: but actually.. I just want to reject broken userspace modes
14:29 karolherbst: like.. entirely
14:30 karolherbst: I also don't know why we don't run mode_valid on userspace modes on connectors...
14:30 pq: if you already make the drmModeSetCrtc() ioctl fail, you've done it already. If X doesn't handle that failing, it's X's fault.
14:31 karolherbst: I don't actually know what userspace does and what ioctl fails.. maybe I should check that...
14:31 pq: Xorg only uses legacy non-atomic UAPI, which the kernel translates to internal atomic API.
14:31 karolherbst: right
14:32 pq: So if you fail the internal atomic commit, you're done.
14:32 daniels: *atomic check
14:32 karolherbst: yeah.. but that leaves users with broken systems, because Xorg adds broken modes
14:33 karolherbst: people don't want xorg to not do that, so that leaves me with dealing with that mess
14:33 karolherbst: but we also don't reject broken modes, so... kinda sounds like our fault
14:33 pq: daniels, isn't atomic check is called from inside atomic commit? I presume one cannot commit without also going through check.
14:33 daniels: so there's not really an 'add mode' step; drmModeSetCrtc takes a completely random DRM mode struct which userspace can fill with anything it wants, even if it hasn't passed it to the kernel first
14:34 karolherbst: okay.. fair
14:34 daniels: pq: DRM_IOCTL_MODE_ATOMIC will call atomic_check() followed by (if you haven't passed TEST_ONLY) atomic_commit(); DRM_IOCTL_MODE_SETCRTC will call both
14:34 pq: daniels, exactly.
14:35 karolherbst: okay soo, here is the deal.. X doesn't fall back when starting with a broken mode
14:35 pq: what would it even fall back to?
14:35 karolherbst: a mode it didn't add?
14:35 karolherbst: I mean.. if xorg tries to set to a state with its own mode and it fails, it's kinda its own fault for trying so, no?
14:36 pq: Xorg uses exactly the mode that the config or X11 clients tell it to.
14:36 karolherbst: I've been there already
14:36 karolherbst: it does try something on its own
14:36 karolherbst: gnome doesn't add those modes
14:36 karolherbst: and apparently xorg shouldn't as well? what is it now
14:36 karolherbst: I've seeing custom modes that _I_ didn't configure
14:37 MrCooper: karolherbst: just stop caring about Xorg :)
14:37 karolherbst: yeah.. I mean.. fine by me, but then users still have to be able to migrate or something
14:37 karolherbst: but yeah, can also just close all bugs with xorg as "invalid"
14:37 MrCooper: the vast majority of them are able to migrate
14:37 jannau: karolherbst: gnome is adding modes (under speficic conditions)
14:38 karolherbst: it's not about being able to
14:38 karolherbst: it's about forcing them to
14:38 karolherbst: jannau: yeah.. but in this case it's X
14:38 karolherbst: because I see those modes without gnome running
14:38 MrCooper: think of it as encouragement
14:38 karolherbst: uhhh.. I wish _I_ could move to wayland for testing, but apparently today we can't even select the main GPU in a multi GPU setup
14:39 karolherbst: which I really need
14:39 pq: DRI_PRIME?
14:39 karolherbst: not for rendering
14:39 karolherbst: for compositing
14:39 pq: yes, for compositing
14:40 karolherbst: if that works... but anyway, I kinda wished X just wouldn't do this...
14:40 pq: set that for the compositor, does it not work? Though I guess it defaults to the same GPU that drives the outputs in most compositors.
14:42 pq: On Wayland compositors the choice of a GPU and display DRM devices is up to each compositor, and not Wayland, so it can vary.
14:42 karolherbst: right
14:43 karolherbst: but anyway
14:43 karolherbst: I really just need a way to deal with that mess without breaking users machines
14:44 lordheavy: MrCooper Lynne: Either with RUSTICL_ENABLE=radeonsi - it doesn't work - except "Libclc failed to load. Please make sure it is installed and provides spirv-mesa3d-.spv and/or spirv64-mesa3d-.spv" message - but libclc is installed with both spirv-mesa3d-.spv and spirv64-mesa3d-.spv
14:45 karolherbst: maybe it doesn't really find the correct path? where are those files installed?
14:45 lordheavy: Rusticl isn't very verbose about the problem. Is there any way to have more verbosity ?
14:48 karolherbst: lordheavy: the path kinda has to match libexecdir, but you can probably also check with strace where it tries to search for it
14:48 lordheavy: karolherbst: clc is installed in /usr/lib/clc
14:49 karolherbst: does the path of libclcs pkgconfig file point to the same location?
14:49 karolherbst: but anyway.. strace should also tell you where it tries to load it from.. gimme s ec
14:50 karolherbst: RUSTICL_ENABLE=lp strace -s 512 clinfo 2>&1 | grep -i spv
14:50 karolherbst: openat(AT_FDCWD, "/usr/lib64/clc/spirv64-mesa3d-.spv", O_RDONLY) = 3
14:50 lordheavy: karolherbst: good catch! path is libexecdir=/usr//usr/lib/clc
14:50 karolherbst: uhhh
14:50 karolherbst: what a weird path :)
14:51 lordheavy: lol yes i know now how to fix that :)
14:52 karolherbst: I don't know if meson picks up a change in the pkgconfig file itself, but probably
14:55 zmike: alyssa: good talk
14:55 alyssa:gives zmike a thumbs-up
14:56 alyssa: zmike: possibly Zink should refuse to GPL if the vulkan driver doesn't advertise graphicsPipelineLibraryIndependentInterpolationDecoration though
14:57 alyssa: purely theoretical issue since {nvidia, all current mesa drivers} advertise that
14:57 alyssa:doesn't really care
15:05 lordheavy: karolherbst MrCooper: fixed, thanks - now it works
15:06 karolherbst: also... would _anybody_ scream if we pipe modes through connects mode_valid callback?
15:07 karolherbst: I really need a way to reject modes through mode_valid based on the connector used... e.g. for rejecting modes used on HDMI displays based on the clock
15:07 karolherbst: and the other places don't cut it
15:07 karolherbst: encoder doesn't, because at this point I only know it's TMDS and that _might_ be duallink
15:08 karolherbst: and doing it on the crtc is kinda... "weird", or maybe it's the proper place?
15:08 _jannau__: karolherbst: I think nouveau might miss drm_mode_config_funcs::mode_valid
15:08 karolherbst: yeah, it does
15:09 karolherbst: and I already implemented that.. kinda
15:09 karolherbst: or wait...
15:09 karolherbst: is that another one?
15:09 _jannau__: that gets the connector as argument and I think it will be called from setcrtc
15:09 karolherbst: ehh no, that's not useful
15:09 karolherbst: it only gives me the dev and the mode
15:09 karolherbst: but the mode might be fine on other connectors
15:10 karolherbst: like... 240MHz rate might be fine on duallink DVI, but not on HDMI
15:10 karolherbst: I really really _really_ have to know what connector it's used on
15:11 karolherbst: drm_connector_helper_funcs::mode_valid would be the _perfect_ place for it, but it's not called on userspace provided modes
15:11 _jannau__: oh, sorry. I missed that we currently just map that onto the connector in apple drm since there is just one connector
15:11 karolherbst: yeah... kinda figured that :D
15:12 karolherbst: I currently reject the mode in the encoder callback
15:12 karolherbst: but that only works because the mode I see is really crazy
15:12 karolherbst: so on some GPUs we can only do 165MHz HDMI (or lower), doubled with DVI duallink, but the mode in question (356MHz) is over that in either case
15:13 karolherbst: but a 200MHz HDMI mode would be accepted there :/
15:13 karolherbst: because the encoder is "TMDS" which can be either
15:22 _jannau__: drm_atomic_helper_check_modeset docs suggests that the mode is checked in drm_connector_helper_funcs.atomic_check
15:22 karolherbst: yeah, but not userspace ones
15:24 karolherbst: so.. what it's used on is to filter modes the kernel tells userspace exist
15:24 karolherbst: but it's not used on modes userspace then tries to set
15:24 karolherbst: I suspect just checking when doing atomic_check is the only _currently_ working way of doing this then
16:44 karolherbst: okay.. I think I'm done implementing the mode check
16:44 karolherbst: do you think this looks sane? https://gitlab.freedesktop.org/karolherbst/nouveau/-/commit/8ad0190520652e199c6f9706d9401e3314b4c3db
16:45 karolherbst: seems to work good enough with non atomic C
16:45 karolherbst: *X
16:46 karolherbst: and it looks like gdm can recover from the default mode being broken? mhh
17:00 karolherbst: heh.... with the nouveau DDX I don't get random modes.. guess it's modesettings doing then
17:20 idr: Could someone who knows more about the clc paths weigh in on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903#note_1979316?
17:20 idr: It sounds like there's a pre-existing bug that we've just been lucky to not hit.
17:22 karolherbst: we resolve those functions really really early
17:41 jenatali: For now, anyway. The more cleanup we do could enable things to be unresolved until later
17:56 JoshuaAshton: alyssa, zmike: Yeah, we hard require graphicsPipelineLibraryIndependentInterpolationDecoration in DXVK also
17:58 idr: karolherbst: So... do you think that particular hunk is okay?
17:58 karolherbst: I'm sure if it isn't CI will scream at you
17:58 idr: If things change in the future... it will show up as graceful test failures (due to failing linking) or ... ?
17:58 karolherbst: (or whoever assigns to marge)
17:59 karolherbst: yeah soo.. piglit kinda relies on this... think...
17:59 karolherbst: yeah.. I'm sure we have builtin tests
17:59 karolherbst: mhh though those might be different.. let me check something
17:59 idr: Okay. I just wanted to be sure that this change wasn't going to make things worse... now or in the future.
17:59 jenatali: I think it can only improve things
18:01 karolherbst: yeah.. so piglit tests that calling external functions works