On Wed, 14 Apr 2021 at 17:46, Jan Sikorski jsikorski@codeweavers.com wrote:
According to the validation layer, it seems that in d3d it’s ok to not set a buffer, the IA will provide zeros on such inputs. Tests seem to confirm that, except for d3d10 on Vista, which crashes - by the way, what would be the correct way to handle that, if (vista) skip?
In principle, although you wouldn't be able to use GetVersion() or variants to detect Vista; you may have to e.g. query for the presence of d3d11 interfaces.
In Vulkan I get a validation error on the shader module saying “Vertex shader consumes input at location # but not provided”, without a link to the spec. That said this patch only fixes the shader part, there still should be a buffer or NULL_HANDLE bound in the command buffer, relevant links: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdD... https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdD... The second one seems to imply that we need to actually bind a zeroed buffer in case the shader reads it. I guess I might as well take a shot at the binding issue and then resend with the tests included..
For what it's worth, we do have the wined3d_null_resources_vk bo that could be used for this, although it's not currently setup to be used as a vertex buffer.