08:30austriancoder: what is the easiest way to figure out what gl context was created and in which version - I had a quick look at some mesa debug env vars but did not found anything
09:49danvet: agd5f, I guess you need to backmerge into your tree to catch up with all the drm-misc changes?
09:50danvet: I got confused for a moment how luben managed to create a conflict
09:50danvet: also I caught up with mail, disregard my first reply, I'll send out a new unified patch series with everything
10:05asdf28: agd5f, lol what a generic nickname
13:01alyssa: anyone know what time of the day the branch point is? 😇
13:02kisak: dcbaker ^
13:11pq: I wonder, in a display server that wants to do gamma-correct blending; would it be better to use an intermediate FP16 framebuffer in linear-light and then do a blit non-linearize, or blend directly into framebuffer using a blending shader that does degamma-blend-gamma for every fragment?
13:12pq: degamma and gamma operations would involve texture lookups in the general case
13:14pq: my feeling says to go with an intermediate framebuffer, but what would be reasons to do otherwise?
13:14pq: cc swick
13:20tzimmermann: danvet, can i rename igt subtests? i'd like to make the fbdev mmap test a single I/O test that checks all functionality
13:28glennk: pq, for srgb specifically the hardware will do gamma correct blending
13:28pq: glennk, I can't assume sRGB.
13:28glennk: anything else is basically undefined results for alpha blending vs gamma :p
13:29pq: and I would have to know what the hardware actually means with "sRGB" if I were to use it
13:29pq: glennk, sorry?
13:29glennk: there really isn't a "correct" way to do alpha blending, its really more what trade offs do you want
13:30pq: glennk, I define correct alpha blending as occupancy-based blending in linear-light (i.e. additive) color values.
13:31glennk: you mean separably linear per component in process color space?
13:31pq: the question is, do I use an intermediate buffer, or have the fragment shader do EOTF-blend-EOTF^-1
13:33pq: glennk, separable, linear, and in whatever color space it happens to be as long as it's additive
13:34pq: quite likely the color space and EOTF is those of an actual monitor for the resulting image (content to be blended in has its own color space and EOTF, which have already been taken into account)
13:35daniels: alyssa: dcbaker's hard drive exploded, so the branch point may not in fact be today ...
13:40glennk: pq, is this alpha blending in context of a window system compositor?
13:41pq: glennk, yes, I said "in a display server"
13:42danvet: tzimmermann, yeah, but not sure that's a super great idea
13:42danvet: stuff gets unwielding fast
13:42danvet: tzimmermann, why do you want it all in one?
13:43tzimmermann: the tests for mmap, read and write al operate on the same framebuffer memory. they'd have to be serialized anyway
13:46glennk: pq, so what range of hardware?
13:46pq: glennk, GL ES 3.0 more or less
13:47glennk: lets split it into typical desktop gpu then if you care embedded gpus are probably better dealt with separately?
13:48pq: What is the main difference?
13:50glennk: pretty vastly different levels of functionality, available memory and bandwidth, and balance of compute vs pixel fill rate
13:51alyssa: daniels: oh no :D
13:51tzimmermann: danvet ^
13:51danvet: tzimmermann, we don't run them in parallel on the same box
13:52danvet: we run them in parallel on lots of machines :-)
13:52danvet: I also thinks it's nice to have fine-ish grained results
13:52danvet: and igt_fixture is the tool for common mmap and stuff like that
13:52tzimmermann: so one machine only runs only read and another machine only runs write ?
13:52emersion: glennk: so what's best on desktops, and what's best on embedded?
13:53danvet: tzimmermann, sometimes, I'm not sure where we are with the runner running stuff together
13:53pq: glennk, IOW, I should have both paths and choose one based on... how can I choose?
13:53danvet: but aside from all that, I do kinda like split up results instead of monster tests
13:53tzimmermann: that's even more confusing
13:53glennk: emersion, pq, depends on what you want, but the best solutions are probably not the same for those two cases regardless of what criteria you pick
13:54danvet: tzimmermann, for a somewhat extreme example kms_addfb_basic.c
13:54emersion: (i'd just go for a blit tbh)
13:54glennk: also embedded tends to throw in a bunch of ad hoc random hardware accelerators (or decelerators...)
13:55pq: an intermediate buffer occupies a *lot* more memory...
13:55danvet: tzimmermann, so if you want the shared mmap and buf, just pull the setup into the first fixture and done
13:55danvet: instead of leaving them in a subtest
13:55tzimmermann: are fixtures executed in order?
13:56pq: but I'm worried that going repeatedly through degamma-gamma texture lookups may be slow and also accumulate errors
13:57danvet: tzimmermann, yup
13:57glennk: usually gamma is just a function and a couple alu ops, for a desktop gpu its nothing
13:57pq: OTOH, the non-linearizing blit can be avoided if it can be implemented with KMS GAMMA, but then the FB has to have enough precision ->
13:57tzimmermann: ok, thank you
13:57danvet: without argument, stuff runs in order you expect
13:57danvet: it also helps a bit with self documenting code
13:57danvet: stuff in fixture is just setup stuff, not really testcase logic
13:58danvet: often there's 0 comments about what's being tested, the blocks help a bit with that
13:58pq: glennk, that's true
13:58pq: glennk, but if the monitor ICC profile is measured and not designed, it's possible all we have is a LUT
13:59pq: for the EOTF
14:00glennk: lets start with the most common case, most computer monitors are still srgb especially office ones, and virtually all source content a window system will see is in srgb
14:01pq: glennk, that's the very assumption we are busting here :-)
14:01pq: this is for Wayland color management and HDR implementation in Weston.
14:01glennk: you are extending support, not invalidating existing use cases are you not?
14:03glennk: so first for this specific case, the hardware already supports srgb in both texture samplers and alpha blending units
14:04pq: We start from the most general case which is LUTs for everything, and once that is tested to be correct and checked in CI, we can add optimized special cases while CI tells us if it breaks.
14:04glennk: that said, you'll probably notice if you try blending with gamma correction that window shadows etc will "look wrong" as they are probably authored for srgb-space-linear blending
14:05pq: I know
14:05glennk: CI is currently testing srgb and not "the general case" ?
14:06pq: the tests haven't been written yet
14:07alyssa: grrr class on the day of the branch point, the nerve! :p
14:09glennk: pq, i would humbly suggest starting with the currently implemented cases and CI those before rewriting the world to use LUTs
14:09glennk: mostly as being in spirit of CI :-)
14:10pq: This actually gives me the answer: go with the simplest solution first, make sure it works, then look at how it can be faster.
14:11pq: glennk, well, there are a bunch of "does this picture show up right" tests.
14:15pq: but nothing that would test that if you set up this wild color space, is the pipeline handling it right
14:15glennk: i think as long as the compositor passes values with alpha=0 and alpha=1.0 with full accuracy as long as the rest have monotonic results you should be good to go
14:18pq: hmm, monotonic... that's a good idea for a test sequence
14:19glennk: its really visible with an alpha fade animation if its not monotonic, but if misses some intermediate value or is linear vs logarithmic the user won't really notice
14:23glennk: pq, do you have any specific use cases for non-srgb non-fullscreen content?
14:25emersion: watching a video in a web browser?
14:26emersion: photo/video editing maybe?
14:27pq: glennk, what emersion said. Also HDR. An even being fullscreen does not outrule having other different content on the screen at the same time.
14:28pq: like notifications, or picture-in-picture
14:37glennk: the hdr video in a browser window is a tricky one on most current HDR capable monitors
14:37glennk: even with local dimming the HDR bit is done with general backlight intensity modulation
14:39glennk: which makes the UI elements vary in intensity too
14:52pq: glennk, to me that's a monitor defect ;-)
14:54pq: a compositor could run in an unmanaged HDR mode where it let's the monitor do dynamic magic on the image, but in a color managed HDR mode that is not acceptable.
14:54emersion: why do we keep getting new features that only kind-of-work for fullscreen use-cases :S
14:55glennk: thats pretty much the description of everything isn't it?
15:22glennk: pq, emersion how also to handle differing bandwidth requirements for ldr vs hdr output?
15:57danvet: agd5f, so ack for merging luben's const patch through drm-misc-next?
16:44agd5f: danvet, yes
16:49danvet: agd5f, thx
16:50danvet: and sorry for the confusion I caused with being somewhat all over the place
16:50agd5f: no worries. I confused myself as well :)
17:30karolherbst: get_canonical_format is just busted for BE
17:41danvet: karolherbst, why do you still care?
17:41karolherbst: do you really want to know?
17:45karolherbst: anyway.. might not have to fix this function, just that this format BE stuff just looks super wrong and I don't think it was a good idea to add BE handling into u_formats.csv
19:05airlied: (04-Nov 19:28:45) PASSED Relationals : (163654s, test 7/53) lols, only 45hrs in the end :-P
19:05jekstrand: airlied: Woo!
19:05jekstrand: airlied: I'm surprised you left it running. :P
19:08karolherbst: airlied: nice
19:08jekstrand: airlied: Looking forward to that conformance run?
19:11karolherbst: curro: mhhhh. debugged the queue stuff a bit more and I see events with signalled fences still in the queue
19:11karolherbst: uhm.. wait. I think I messed up my asserts
19:12airlied: jekstrand: the machine wasn't running anything else, and I had other tasks :-P
19:16airlied: jekstrand: I think for a full conformance run I'll find a faster machine :-P
19:16airlied: and maybe llvm release build
19:17karolherbst: I think I am just running into a stupid c++ bug
19:17karolherbst: it makes literally 0 sense
19:18karolherbst: so calling queue() inside hard_event::wait gives me SIGSEGV
19:18karolherbst: libasan time
19:37dschuermann: jekstrand: fyi, I've written a bunch of control flow optimizations regarding breaks (especially for single-iteration loops)as well as if-collapsing
19:38dschuermann: (just in case someone is working on something similar)
20:50karolherbst: vec1 32 ssa_0 = load_const (0x00000000 /* 0.000000 */)
20:50karolherbst: vec2 32 ssa_24 = intrinsic image_size (ssa_0, ssa_0) (1, 0, 0, 8) /* image_dim=2D */ /* image_array=false */ /* format=0 */ /* access=8 */
20:50karolherbst: why does image_size have two args to begin with?
20:51karolherbst: ahh sample index
20:51jekstrand: karolherbst: image index and LOD
20:52karolherbst: I somehow treat is as coords for wahtever reason
20:52jekstrand: Probably want to stop doing that. :P
20:57karolherbst:should rewrite nv50_ir_from_nir
21:07swick: glennk: if you want a general purpose compositor to show HDR content it should set the display into HDR mode at all times sine switching to HDR mode is a mode switch and changes calibration
21:09swick: so the bandwidth difference is something you'll only have to deal with when the user "turns on" HDR in some kind of display settings
21:13swick: not sure if it became clear but the LUT for gamma/degamma is the base case. we can lower everything into a LUT. in some cases (possibly most of the time) we have parametric descriptions which we can implement in the shader.
21:16jadahl: swick: do you know whether that have any implications power consumption wise? (always-on HDR with "toned down" luminance via luts)
21:16Lyude: jadahl: they can
21:16Lyude: that's why hdr mode on panels can be toggled on/off iirc
21:16swick: yeah, there will be
21:16Lyude: there's even special optimization modes for ac vs dc
21:16jadahl: I see
21:17Lyude: speaking of which, there's some totally cool hdr backlight patches on intel-gfx that have been there for weeks now and need review
21:17Lyude: just saying
21:17swick: at least on anything with a backlight
21:17swick: OLED and mLED might behave better
21:17Lyude: swick: actually i'm pretty sure the situation is very similar for oled
21:18Lyude: at least I think?
21:18Lyude: no idea about mled
21:18swick: really? if we have the same luminance as in SDR mode?
21:19swick: I mean obviously there will be a higher power draw when the content results in higher luminance
21:19Lyude: swick: i have no idea, I just assume that's why those optimization modes seem to also be available on amoled
21:19Lyude: swick: actually-i think the second thing you said is more accurate
21:20Lyude: keep in mind i've barely look at some of this stuff and have been waiting for code to go through, so I may certainly get some details wrong :)
21:20swick: I would really love to play with different HDR displays but no moneys
21:21swick: also extended range in the blacks would still be HDR without higher power consumption
21:23Lyude: swick: i meant the other way around, higher luminance would draw more power
21:23Lyude: and iirc hdr can mean higher luminance
21:27swick: yes, that's the "normal" case with HDR
21:27karolherbst: curro, jekstrand: the bug is indeed a memory corruption thing
21:28karolherbst: but that could be caused by my changes
21:30jadahl: swick: Lyude what I mean is "hdr" on, but sdr luminance, tht's assumed to eat more power than the same luminance but without hdr mode turned on
21:33jenatali: karolherbst: That's... a pretty deep stack
21:37curro: karolherbst: whoa, i think i know what's going on
21:37karolherbst: yeah.. I do a run without my patches and see if I hit it as well
21:37karolherbst: but this explains this "something is odd" feeling I had all the time
21:37karolherbst: we shouldn't cause stacks with 80k+ entries, but I don't think this was the issue
21:38curro: karolherbst: yeah, stack depth seems pretty normal for a recursive traversal of the event graph
21:38karolherbst: I think libasan doesn't work anymore :D
21:38karolherbst: jenatali: you call this deep? :D
21:38karolherbst: wanna see a deep stack?
21:39curro: karolherbst: i think this is a reentrancy issue with the code you added to clear the dependency list on ::fence()
21:39karolherbst: jenatali: I just drop this here "#43650 0x0000000000417d4d in main (argc=2, argv=0x7fffffffd618) at ../test_conformance/images/kernel_read_write/main.cpp:408"
21:39karolherbst: curro: I removed the code and got a SIGSEGV
21:39karolherbst: now asan drops
21:39karolherbst: "SUMMARY: AddressSanitizer: stack-overflow ../src/gallium/frontends/clover/core/event.cpp:171 in clover::hard_event::wait() const" :D
21:39curro: karolherbst: SIGSEGV due to stack overflow probably?
21:40karolherbst: so mhh
21:41curro: karolherbst: i think reentrancy issue has to do with some random event having wait() called on, which traverses its dependency list in order to wait for them, which recurses and eventually leads to a QUEUED event calling ::flush(), which causes the original event that called wait() to also get flushed and fenced, which deletes its dependency list and frees the dependencies before we're done traversing them
21:42karolherbst: I think I can add an assert to check if the deps list is suddenly empty
21:43curro: karolherbst: reentrancy issue explains why doing flush() up front fixed the issue -- then everything that was previously QUEUED gets flushed up front so no dependency lists disappear during traversal
21:43karolherbst: jenatali: also, I have professional experience as a java backend dev, and let me say this: 350 function on the stack? happens quite often :p
21:43karolherbst: curro: yeah.. I guess that makes sense
21:44karolherbst: how do we want to prevent the list of getting to deep? obvisouly flushing, but that doesn't clear the dep list
21:44karolherbst: where/when do we want to clear the deps?
21:46curro: karolherbst: how about you also change event::wait() to std::swap(deps, local_temporary_variable_holding_deps), so a subsequent ::fence() on the same event doesn't need to clear anything whenever it tgets called?
21:47karolherbst: curro: I think the issue is that we have an iterator on deps
21:47curro: karolherbst: and with my change you'll be iterating a local variable instead
21:47karolherbst: ohh event::wait..
21:47karolherbst: not hard_event::wait
21:48karolherbst: I guess
21:49curro: karolherbst: with this suggestion implemented the dependency list of an event will be automatically cleared by wait(), but that's fine because you don't ever need to call wait() on the dependencies of an event more than once
21:51karolherbst: curro: event::wait is const :/
21:52karolherbst: not sure if we can drop that
21:52curro: karolherbst: we could but you may as well make the deps list mutable for the moment
21:53curro: mutable std:vector<...> deps;
21:55curro: karolherbst: it seems like a legit use of mutable since wait() doesn't change the external behavior of the object even though it might be cleaning up some redundant data structures
22:15karolherbst: curro: yeah, that fixed it
22:15karolherbst: soo.. now let me run all tests
22:15curro: karolherbst: neat :)
22:17jekstrand: karolherbst: What fixed it?
22:18curro: see scrollback right above
22:24jekstrand: Making deps mutable and removing stuff in wait? That sounds like exactly what I was thinking of doing but decided against because It wasn't clean enough. :-P
22:26curro: jekstrand: it's not the clearing of depedencies in wait() that fixes it, that's an accidental consequence of the workaround i suggested -- it's the part about doing the dependency list iteration in a local temporary that should fix the reentrancy issue we were discussing above
22:27jekstrand: That makes sense.
22:30gitbot: Mesa issue (Merge request) 7241 in mesa "Draft: OpenCL 1.2 image support" [Opencl, Clover, Opened]
22:30karolherbst: for the full patch
22:30karolherbst: although I think I can drop the deps.clear() :)
22:33curro: karolherbst: looking pretty good. i'm betting though that the stack overflow will come back if you drop the deps.clear() in there
22:33karolherbst: ohh right, that's in fence, yeah probably
22:35karolherbst: ahh annoying, GPU context crashed