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