[PATCH v3 5/5] wined3d: Create a null vertex binding and attributes for unbound shader inputs.

Henri Verbeet hverbeet at gmail.com
Wed Apr 21 10:53:32 CDT 2021


On Wed, 21 Apr 2021 at 16:06, Jan Sikorski <jsikorski at codeweavers.com> wrote:
> Calling it each time the pipeline changes would be wasteful. It also smells fishy to invalidate STATE_STREAMSRC inside wined3d_context_vk_update_graphics_pipeline_key for that case, although I guess it would work. I can think of a few ways to resolve it, my favourite is to directly bind the null buffer next to vkCmdBindPipeline() if we need one (and perhaps if STATE_STREAMSRC is clean). We’d probably still need to do the thing in wined3d_context_vk_bind_vertex_buffers() in case someone binds a NULL vertex buffer. Although looks like now if STATE_STREAMSRC is dirty we always go to vkCmdBindPipeline(), so maybe not, but that's a bit brittle.
>
It's perhaps unfortunate, but wined3d_stream_info_from_declaration()
depends on information from the currently bound vertex buffers.
Perhaps most notable for the Vulkan backend is the fact that we get
attribute strides from there. It's probably possible to separate
attribute and binding descriptions (although not necessarily trivial)
but unless we also implement support for
VK_EXT_extended_dynamic_state, it's still going to cause pipeline
invalidation.



More information about the wine-devel mailing list