00:03 jekstrand: karolherbst: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6435
00:03 jekstrand: karolherbst: I also fixed the other two nir_lower_bool_to_* passes
00:03 jekstrand: Both of which were copy+paste from bool_to_int
00:03 karolherbst: ohhh
00:03 karolherbst: yeah.. that's more nice
00:03 karolherbst: r-by, I hope that works :D
00:04 karolherbst: but I shouldn't put bool lowering into an opt loop I guess...
00:04 jekstrand: heh, no.
00:04 karolherbst: but should I call it before or after? mhh
00:04 karolherbst: shouldn't matter I guess?
00:04 jekstrand: You should call it basically as the last thing before going into codegen
00:05 karolherbst: okay.. then I'll move it back where it was :p
00:06 karolherbst: at some point I'll call the proper optimizations :p
00:06 karolherbst: oh well
00:08 jekstrand: I wonder if clover just predates the implementation of texture_view in gallium. That doesn't really sound right....
00:08 jekstrand: texture view should be pretty old
00:08 karolherbst: well
00:09 karolherbst: I am sure clover existed before we had compute shaders
00:09 karolherbst: jekstrand: if you don't want nightmares, don't look into those early compute TGSI tests :D
00:10 karolherbst: src/gallium/tests/trivial/compute.c....
00:10 karolherbst: I think that explains a lot
00:10 karolherbst: "DCL RES[0], BUFFER, RAW, WR" :O
00:10 jekstrand: Oh... gallium treats pipe_image_view as an ephemeral object
00:11 imirkin: yes.
00:11 imirkin: there's no refcount on it, just a struct to pass info around
00:12 karolherbst: back at "Pass 106 Fails 0 Crashes 0 Timeouts 0"
00:12 jenatali: :)
00:13 imirkin: karolherbst: afaik nothing supports those "RAW" buffer resources. nouveau had some handling for it, but i mostly commented it out while adding support for the GL stuff.
00:13 jekstrand: Ugh... pipe_surface even for images? Am I reading this right? I hope not.
00:13 imirkin: no
00:13 karolherbst: jekstrand: you do
00:13 imirkin: although that was my original proposal :)
00:14 jekstrand: imirkin: ?
00:14 imirkin: oh. in clover. yes.
00:14 karolherbst: jekstrand: it also uses pipe_surface for constant buffers :p
00:14 imirkin: my original proposal for images in gallium was to do that for graphics as well.
00:14 jekstrand: imirkin: I'm still not connecting the dots. Do what?
00:14 imirkin: use pipe_surface for images.
00:16 imirkin: fwiw the history of clover is fairly long, and originally there were hopes of a tgsi llvm backend
00:16 karolherbst: yeah...
00:16 imirkin: so a lot of stuff got hooked up with the expectation of that coming to pass at some point, well ahead of GL having compute/etc support
00:16 karolherbst: I am kind of glad that never worked out
00:16 imirkin: (by many years)
00:16 jekstrand: Why do both pipe_surface and pipe_image_view exist?
00:16 jekstrand: They look roughly the same to me
00:16 imirkin: pipe_surface was used by clover for all surfaces
00:17 imirkin: pipe_surface is ref-counted, while pipe_image_view is not
00:17 jekstrand: Ah
00:17 imirkin: when adding images to gallium, mareko opted to create pipe_image_view
00:17 jekstrand: But they're otherwise basically the same?
00:17 imirkin: although my proposal was to use pipe_surface at the time. we had a long conversation about it, and i couldn't come up with any strong arguments against pipe_image_view iirc.
00:17 imirkin: they are rather similar
00:17 jekstrand: Other than having two things
00:18 imirkin: i think there are some slight differences that don't matter for images.
00:18 jenatali: jekstrand: The direction of these questions makes me think you're trying to hook up CL images
00:18 jekstrand: jenatali: I'm looking at it
00:18 jekstrand: jenatali: And getting horrified
00:18 jenatali: :P
00:18 karolherbst: :)
00:18 karolherbst: jekstrand: guess why I am procrastinating it
00:18 jekstrand: There's a lot of dust in this corner.
00:18 imirkin: jekstrand: the counterargument to "two things" is "refcounting", so they kinda balance out
00:18 jenatali: I think aside from the address space shenanigans (which I haven't had enough time to look at in-depth today) the nir bits shouldn't be *too* bad
00:18 karolherbst: yeah.. nir isn't the issue
00:18 karolherbst: clover is
00:18 karolherbst: it's not _that_ bad
00:19 jekstrand: imirkin: Sure but what is being refcounted? The descriptor?
00:19 karolherbst: I got it mostly working at some point
00:19 jekstrand: imirkin: The actual memory is already refcounted by pipe_resources
00:20 jekstrand: imirkin: I'd argue that the refcounting might be an argument in favor of switching to pipe_surface. It's not really an argument for two things.
00:20 jekstrand: Unless it's reference coungint something useful.
00:21 imirkin: jekstrand: yes. hence the argument to add a pipe_image_view which is not refcounted.
00:21 jekstrand: imirkin: ?
00:21 imirkin: pipe_resource is already refcounted, like you said
00:21 imirkin: having persistent "surface" objects isn't extremely useful
00:22 imirkin: and adds unnecessary overhead
00:22 jekstrand: A driver with persistent descriptors (like iris) could possibly gain a little from it.
00:22 imirkin: well, that's not amd's thing
00:22 imirkin: i got tired of the conversation.
00:23 jekstrand: Fair
00:23 jekstrand: I don't have an opinion.
00:23 jekstrand: I'm just trying to understand what's going on
00:23 imirkin: and since he (or nha? i forget actually) were working out the details, i figured they get to pick given that it's unclear.
00:24 jekstrand: I'm just hoping that we can move away from clover being a special snowflake and acting more like st/mesa
00:25 jekstrand: That's my only axe to grind here
00:25 karolherbst: yeah
00:26 karolherbst: and I guess that's fine to port clovers way of doing over to st/mesa way
00:26 karolherbst: CL images are just...
00:26 karolherbst: annoying
00:26 karolherbst: especially the sampler part
00:27 imirkin: jekstrand: that'd be nice. i think there are some slightly different requirements from CL which can make that tricky
00:27 imirkin: not in the surface vs image_view thing
00:27 imirkin: but for other stuff
00:27 karolherbst: so worst case we end up binding 6 sampler views per texture
00:27 karolherbst: or so
00:27 jekstrand: imirkin: Totally. I don't expect that we can make clover "just work" for any driver which supports compute.
00:27 karolherbst: imirkin: so you can switch the filter inside the kernel
00:27 jekstrand: imirkin: But we can reduce the unnecessary impedence mismatch.[
00:28 jekstrand: Like surface vs. image_view or grid::inputs vs. cbuf0
00:28 karolherbst: also coord normalizations but that shouldn't matter for the sampler view?
00:28 karolherbst: dunno
00:28 karolherbst: we kind of have make this to work even if the kernel declares those samplers inside the kernel and mix and amtches images + samplers: https://www.khronos.org/registry/OpenCL/sdk/2.2/docs/man/html/samplers.html
00:28 imirkin: jekstrand: well, kernel inputs are a special feature of CL, and supported at least on nv50
00:29 jekstrand: karolherbst: That should all be in pipe_sampler_state
00:29 karolherbst: imirkin: we don't know the reason why we use shared on nv50, right?
00:29 jekstrand: imirkin: Sure. And we can map them to push if we really care
00:29 karolherbst: jekstrand: samplers can be created inside the kernel
00:29 imirkin: if you want to pass them in via cbuf0, then you can
00:29 jekstrand: karolherbst: Yeah, we have to pull them out and make states.
00:29 karolherbst: yes
00:29 imirkin: karolherbst: because it's there?
00:30 karolherbst: imirkin: shouldn't cb be faster?
00:30 imirkin: presumably not?
00:30 karolherbst: mhhh
00:30 karolherbst: maybe nv50 is just weird then
00:30 imirkin: maybe
00:32 karolherbst: jekstrand: the one issue is that for nouveau we kind of can't really split things up as easily I think...
00:32 karolherbst: at least not for newer hardware?
00:32 karolherbst: except I miss something?
00:32 karolherbst: imirkin: we can't runtime select the sampler for a texture, right?
00:32 imirkin: sure we can
00:33 karolherbst: how?
00:33 imirkin: via texture op args? not sure what you mean
00:33 karolherbst: I mean, the handle we hand in points to the const buffer pointing into the tic table
00:34 karolherbst: ehh
00:34 karolherbst: tic/tsc table
00:34 jenatali: For what it's worth, we end up recompiling the kernel based on sampler parameters
00:34 imirkin: karolherbst: for kepler+ yes.
00:34 karolherbst: mhhh
00:34 karolherbst: I guess we could build the handle at runtime...
00:34 jenatali: In practice I don't think it's going to be a big deal, apps aren't going to dynamically use different sampler properties in the same kernel
00:34 imirkin: karolherbst: and each handle is still a tic/tsc entry combination.
00:34 karolherbst: and go bindless
00:35 karolherbst: let's see...
00:35 imirkin: and on nv50/fermi you can explicitly select a texture and sampler id
00:35 karolherbst: yeah
00:35 imirkin: (unless you're in linked tsc mode, which we don't enable)
00:36 karolherbst: I am not worried about those, just kepler+
00:36 imirkin: on kepler+, yeah, you have to use the .B variant. boo-hoo.
00:36 karolherbst: soo.. the texture unit fetches the sampler and the texture ptr from the constant buffer
00:36 karolherbst: in non bindless mode
00:36 imirkin: yes.
00:36 karolherbst: in bindless we just hand in the same data directly, right?
00:37 karolherbst: and those are still just handles
00:37 imirkin: yes, just saves on the const buffer fetch
00:37 karolherbst: okay...
00:37 imirkin: (and presumably allows hw to do some manner of optimization)
00:37 karolherbst: yeah.. so we could have all combinations CL asks for
00:37 karolherbst: and just runtime select the sampler
00:38 karolherbst: cls sampler is a bitmask anyway
00:38 karolherbst: and we might be able to map it directly to samplers
00:38 karolherbst: or is there some data we have to set depending on the texture?
00:39 karolherbst: I don't really know what we encode inside the sampler
00:39 karolherbst: mhhh
00:39 karolherbst: maybe I should just try to implement it and see how that goes
00:41 pmoreau: Oh great, glibc 2.32 removed sys/sysctl.h which had been deprecated since 2.30, so now the OpenCL-CTS no longer compiles. :-|
00:41 karolherbst: welll....
00:41 karolherbst: I am sure that's not hard to fix :p
00:41 pmoreau: Revert back to using glibc 2.31 :-D
00:42 karolherbst: pmoreau: use my cl_wip branch btw ;p
00:43 pmoreau: Will do, sometimes during the weekend after I got some sleep and managed to go through finishing to update the labs before students start the course.
00:43 karolherbst: "D
00:43 karolherbst: that's fine :p
00:44 karolherbst: what a rebase "f840914f...e3e45e24 - 3782 commits from branch mesa:master"
00:44 karolherbst: :D
00:46 karolherbst: anyway.. time for bed
00:53 pmoreau: Yeah, I should go to bed too…
00:57 pmoreau: I am not even sure the CTS used sys/sysctl.h on Linux: I can remove those includes without any issues.
08:49 mareko: jenatali: pipe_surface vs pipe_image_view is more complicated; surfaces are only used as a framebuffer state, while image views are used as a shader resource state; the only reason surfaces were used for writable shader resources in the past was that old hardware (r600) had to use the render target hardware for writable shader buffers and images, which was a pretty ugly design (back then all shader
08:49 mareko: resources were read-only and the only write data path was through render targets)
08:50 mareko: jekstrand: ^^
09:03 mareko: jekstrand: another reason for not using pipe_surface was that it precomputes render target state, which is different from image state
09:10 mareko: and also pipe_surface is malloc'd, while pipe_image_view isn't, so binding the latter has lower overhead for GL
10:14 MrCooper: mattst88: surely Marge should have a Marge Simpson avatar :) (gstreamer's marge-bot account already does)
11:02 Yuti: How to filter modes in atomic check if previously link is not trained?
12:40 emersion: Yuti: the idea is that you don't filter them, and after link training if the link doesn't support the mode you use link-status to signal to user-space that the modes list is reduced
12:42 imirkin: but you can and should filter based on the overall theoretical capabilities
12:42 imirkin: you know how many lanes you have and what speed they support, and you can get the sink's capabilities as well via dpcd
12:42 emersion: right -- filter them with all the info you have without link training
12:59 emersion: Yuti: the core idea is that atomic test-only commits must remain fast -- user-space will potentially do a lot of test commits
12:59 emersion: a lot can be hundreds or more
13:00 emersion: because the only way for user-space to find a configuration that works is to brute-force all potential configurations
14:45 jekstrand: mareko: IVB also used the render hardware for image writes but that didn't affect surface states.
14:49 hanetzer: agd5f_: hey question. I'm writing a blog post about my display hardware and would like to mention you as being the guy who provided the fix for the kernel driver. What should I refer to you as?
16:59 mattst88: MrCooper: haha, that would be awesome. I can support that :)
19:26 Venemo: who is in charge of softpipe these days?
21:18 airlied: Venemo: nobody/everybidy
21:20 airlied: sroland, brianp, me, anholt probably last few ppl to poke at it
21:48 karolherbst: jekstrand: btw, I've got the locking stuff nearly working on nouveau as well :D
21:53 karolherbst: ohhh...
21:53 karolherbst: I forgot to set the result :D
21:56 karolherbst: mhhh
21:56 karolherbst: and now I overwrite stuff mhhh
22:04 Venemo: airlied: do you think this would be a good approach to fix the warnings in it? https://gitlab.freedesktop.org/Venemo/mesa/-/commits/softpipe-warnings
22:09 kisak: Venemo: there was a bit of a push to turn on -Werror where it could in CI. Cleaning up more subcomponents to the point that some more CI can run with -Werror can't hurt.
22:11 kisak: ^about a month ago (!5185 !5730 !5799)