News for hackers. Stuff that matters.
Re:Zink (OpenGL on Vulkan) performance better than expected by gw on Wednesday September 09, 2020 @07:36PM (#24427236)
Interesting. When you say "save and restore state", do you mean actually serializing it and loading it later? In what situation would you want to do this? Not doubting that there is one but i haven't heard of this before.
Re:Zink (OpenGL on Vulkan) performance better than expected by pcwalton on Wednesday September 09, 2020 @08:16PM (#24427532)
Typically you use this feature to associate state with an object in your render graph. For example, all of the render state used to render the sky, including shader program, vertex buffers, textures, blend state, etc. can be attached to the sky node in your scene graph. Then you can (basically) have a generic "draw an object in your scene graph" function that just performs the appropriate drawcall with the right state. The performance advantage of this is that the driver can do all the validation once, when you construct the sky object, instead of every frame.