src/FNA3D_Driver_Vulkan.c
/* vertex buffer bindings are fixed in the pipeline
 * so we need to bind a new pipeline if it changes
 */
vertex buffer bindings are fixed in the pipeline
so we need to bind a new pipeline if it changes
vertex buffer bindings are fixed in the pipeline so we need to bind a new pipeline if it changes
static void CheckVertexDeclarationAndBindPipeline(
	FNAVulkanRenderer *renderer,
	FNA3D_VertexDeclaration *vertexDeclaration
) {
	MOJOSHADER_vkShader *vertexShader, *blah;
	uint64_t hash;
	MOJOSHADER_vkGetBoundShaders(&vertexShader, &blah);
	hash = GetVertexDeclarationHash(
		*vertexDeclaration,
		vertexShader
	);
	if (	renderer->userVertexBufferInUse ||
			hash != renderer->currentUserVertexDeclarationHash	)
	{
		renderer->userVertexBufferInUse = 0;
		renderer->currentUserVertexDeclarationHash = hash;
		renderer->currentVertexBufferBindingHash = 0;
		renderer->userVertexDeclaration = *vertexDeclaration;
		if (renderer->renderPassInProgress)
		{
			BindPipeline(renderer);	
		}
	}
}
static void CheckVertexDeclarationAndBindPipeline ( FNAVulkanRenderer * renderer , FNA3D_VertexDeclaration * vertexDeclaration ) { MOJOSHADER_vkShader * vertexShader , * blah ; uint64_t hash ; MOJOSHADER_vkGetBoundShaders ( & vertexShader , & blah ) ; hash = GetVertexDeclarationHash ( * vertexDeclaration , vertexShader ) ; if ( renderer -> userVertexBufferInUse || hash != renderer -> currentUserVertexDeclarationHash ) { renderer -> userVertexBufferInUse = 0 ; renderer -> currentUserVertexDeclarationHash = hash ; renderer -> currentVertexBufferBindingHash = 0 ; renderer -> userVertexDeclaration = * vertexDeclaration ; if ( renderer -> renderPassInProgress ) { BindPipeline ( renderer ) ; } } }
vertex buffer bindings are fixed in the pipeline
 so we need to bind a new pipeline if it changes
vertex buffer bindings are fixed in the pipeline so we need to bind a new pipeline if it changes