These are chat archives for bjz/gfx-rs

27th
Jun 2014
Dzmitry Malyshau
@kvark
Jun 27 2014 13:44
@bjz are you alright there?
Dzmitry Malyshau
@kvark
Jun 27 2014 13:57
@photex @cmr @csherratt A sneak peak into my vision of our low-level shader information is at #23
Coraline Sherratt
@removed~csherratt
Jun 27 2014 14:19
@kvark this looks promising.
what will the active_value be used for?
Dzmitry Malyshau
@kvark
Jun 27 2014 14:22
@csherratt Thanks! the idea is to fully verify compatibility of the program with inputs/outputs (partially described here). This is not expensive by itself. The biggest question for me is what data structure to use for the shader parameters so that the program can query them quickly...
@csherratt active_value is the current value of the parameter that GL program holds. It will be checked against the given value and updated accordingly if different.
The logic of binding is supposed to be the following: renderthread walks through all ProgramMeta, and for each thing searches it among the given data (be it a mesh attribute or a shader parameter). Not sure if we can cache the match results, or if that's even needed... In my previous project I used to search by name (a boxed string), but we need something cheaper here.
@csherratt I'm kinda surprised (in a very positive way) to see you helping us out here, considering how big your snowmew is... Thanks!
Coraline Sherratt
@removed~csherratt
Jun 27 2014 14:30
My hope is that that is gfx-rs might offer a more portable backend for snowmew. The current render is not very flexible and needs to be reworked for OpenGL 3 hardware, which might be a rewrite of half the logic. So if gfx-rs can satisfy that goal I will be happy.
Plus snowmew goals are more research ordinated with the fringe benefit being a potential product.
Dzmitry Malyshau
@kvark
Jun 27 2014 14:32
@csherratt Ok, thanks for clarification! Let us know about your vision and requirements for the back-end so that we can work towards it. Perhaps, you want the device stuff to be separated into its own crate? Or change the direction we are heading now slightly?
kvark @kvark goal of working on gfx-rs is to have that sacred piece of code he can open up (when depressed, for example) with a cup of tee and enjoy reading it again and again...
Dzmitry Malyshau
@kvark
Jun 27 2014 14:39
@csherratt I liked your construction of the command buffers (from the presentation) with an idea to call DrawIndirectMultiSomething for multiple objects at once. Not sure that all these workers benefit this much from walking the scene graph in parallel though... But fortunately, this is all very high-level from the gfx-rs perspective so could be done on top of it.
Coraline Sherratt
@removed~csherratt
Jun 27 2014 15:49
It has some benefits when the object count is in the hundreds of thousands. But in those cases you are normally gpu bound.
@kvark gfx-rs is your dream graphics pipeline that you one day hope OpenGL / DirectX will aspire to live up to?
Dzmitry Malyshau
@kvark
Jun 27 2014 15:53
@csherratt haha, dunno if GL/DX will still exist by that moment
Coraline Sherratt
@removed~csherratt
Jun 27 2014 15:55
Do you mean that in the way that gfx-rs is going to take decades to make perfect? or in the way that you think OpenGL/DirectX are going the way of the dodo?
Dzmitry Malyshau
@kvark
Jun 27 2014 15:57
Might be both, but frankly I don't want to look that far... I had a habit of imagining the future of my projects in past, and in most of the cases it didn't do me any good. Now I'm trying to look just in front of my nose: "ok, what needs to be done here? Ah, shaders meta is missing, resource management is missing, etc".
I don't believe GL/DX will ever aspire to gfx-rs, I'd rather have them go as low-level as possible so that gfx-rs can do stuff with less overhead.
Coraline Sherratt
@removed~csherratt
Jun 27 2014 16:00
Have you looked at Mantel at all? It looked like a promising start, but then DX12 cannibalized most of the features.
of course DX12 does not exist, but the promise of said features is probably enough to spell the death of Mantle.
Dzmitry Malyshau
@kvark
Jun 27 2014 16:02
@csherratt OpenGL also promised something low-level, IIRC. Problem with DX12 is that it's the least portable among those. I haven't had a chance to look at either Mantle or Metal (reading slowly...), but I got some solid experience with Gnm, and I expect it to be very similar.
@csherratt Have you looked at Mantle? Care to share what you think about it?
Coraline Sherratt
@removed~csherratt
Jun 27 2014 16:04
Nothing beyond the presentations. By the time they offered a 'public' api the OpenGL AZDO path seemed more promising.
that being said, I think the path of having dozens of queues to feed the hardware pipeline is a good idea. At a high level there is quite a bit that can be done parallel.