00:00 imirkin: i.e. in gl, do you glEnable(GL_CLIP_DISTANCE0..n)?
00:01 ReinUsesLisp: do you mean trying to enable/disable GL_CLIP_DISTANCEi and see if it changes the header?
00:01 ReinUsesLisp: (other than the hardware reg)
00:02 imirkin: i mean when you're emulating the switch
00:02 imirkin: you do things with GL, right?
00:03 imirkin: in that GL logic, do you glEnable(GL_CLIP_DISTANCE*)?
00:03 karolherbst: imirkin: they don't have the toolkit/sdk
00:03 ReinUsesLisp: yes, but the OpenGL driver is statically linked on each game
00:03 karolherbst: and that
00:03 imirkin: you're writing an emulator, right?
00:03 ReinUsesLisp: yes, the GPU is emulated in LLE (we don't hook API calls)
00:04 imirkin: and you use opengl for this?
00:04 ReinUsesLisp: yes, on host
00:04 ReinUsesLisp: (or VK, I'm also working on it)
00:04 imirkin: and does this code ever do glEnable(GL_CLIP_DISTANCE)?
00:04 karolherbst: imirkin: they use glsl shaders on the switch as well
00:05 karolherbst: but with their custom API
00:05 ReinUsesLisp: they can use OpenGL too
00:05 karolherbst: so what they can do is adjust the shader and see what the staticly linked compiler does
00:05 karolherbst: ohh uhm
00:05 karolherbst: ReinUsesLisp: how does the gl func proc stuff work?
00:05 ReinUsesLisp: yes, we enable GL_CLIP_DISTANCE when the game requests it
00:05 karolherbst: everything staticly linked?
00:05 imirkin: ReinUsesLisp: how does the game request it?
00:05 ReinUsesLisp: the driver is statically linked
00:06 ReinUsesLisp: but it queries the function pointers at runtime
00:06 ReinUsesLisp: at least for NVN, I didn't RE OpenGL games
00:06 karolherbst: ReinUsesLisp: okay, but how does the compiler know which funcs to link in?
00:06 imirkin: method 0x1510?
00:06 ReinUsesLisp: imirkin: https://github.com/envytools/envytools/blob/715cba01cb983fed0c856382a66943f734e6edc2/rnndb/graph/gf100_3d.xml#L750-L760
00:06 imirkin: right ok. that makes sense.
00:06 imirkin: and so with that, and without the header bits set, it works? surprising!
00:06 ReinUsesLisp: although I don't have tests for clip distance
00:07 ReinUsesLisp: I guess it could be tested on nouveau to be sure
00:07 karolherbst: mhh, that's something we could try in mesa...
00:07 karolherbst: imirkin: maybe the method overwrites the shader header?
00:07 karolherbst: that would be strange
00:07 ReinUsesLisp: karolherbst: the offline compiler is for NVN, not for OpenGL afaik
00:07 karolherbst: ReinUsesLisp: right, I was more thinking about the gl calls
00:08 karolherbst: because normally you have to fetch the function pointers at runtime
00:08 ReinUsesLisp: probably eglGetProcAddress
00:08 karolherbst: so you can't really skip something
00:08 karolherbst: and just have to link in everything
00:56 HdkR: imirkin: Did I make that claim? :P
00:57 imirkin: you did.
01:17 HdkR: oops
01:21 imirkin: it's ok. i won't tell.
02:40 imirkin: skeggsb: would you be ok with a policy that picks the highest possible bpc mode given bw constraints for hdmi?
02:40 imirkin: afaik that's what intel does
04:06 HdkR: imirkin: How would I as a user override that? :)
04:06 imirkin: HdkR: there's a "max bpc" property you could set
04:07 imirkin: but how to force e.g. 12bpc yuv420 vs 8bpc rgb -- that's not entirely clear
04:07 HdkR: That's good. Because I definitely don't want to be pushing 12bpc that this device supports since it is YUV420 :)
04:07 imirkin: worry not -- yuv420 isn't supported at all for now
04:08 imirkin: (but also you're not using nouveau... so ... double worry-not...)
04:08 HdkR: I like to think that eventually what you're doing will end up as common for everyone :)
04:08 imirkin: just doing what intel's doing
04:09 imirkin: unfortunately there are a lot of moving pieces, and end users understand none of them
04:09 HdkR: Of course
04:09 imirkin: "i just want to get me some of that hdr y'all been talkin' 'bout"
04:09 imirkin: where that hdr at?
04:10 HdkR: Need that BT2020 yo
04:10 imirkin: hehe
04:10 imirkin: yeah, that's like 20 levels ahead
04:11 HdkR: Really I just need a tool that gives me the ability to select color format, color depth, and color space in a way that intersects the combination of hardware and software support. Everything else is up to the user to not heck up :P
04:11 imirkin: i'm kinda letting people who have a lot more time than me figure out some of this stuff
04:11 imirkin: and basically just copying whatever they're doing
04:12 imirkin: (or trying to)
04:12 HdkR: Sounds reasonable
04:18 imirkin: i have limited knowledge, time, and hardware available to mess around with all this stuff
04:18 imirkin: but it feels like if i don't, no one else will. would be nice to keep nouveau on par in that regard.