DirectX 11 SpriteFont - Vertex Shader linkage error

I'm trying to render text in my DX11 project, by using SpriteFont and SpriteBatch.

Everything worked before adding the code in, but when the code in uncommented, I get the following error and nothing renders.


1
2
3
D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. Semantic 'TEXCOORD' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX]
D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. The input stage requires Semantic/Index (POSITION,0) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND]
D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. The input stage requires Semantic/Index (NORMAL,0) as input, but it is not provided by the output stage. [ EXECUTION ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND] 



I have tried to change the DeviceContext & Device, but still the same error.
1
2
3
4
5
6
7
8
9
10
11
12
13
        //Global Variables
std::unique_ptr<SpriteBatch>g_spriteBatch;
std::unique_ptr<SpriteFont>	g_spriteFont;


	//Draw Text
	g_spriteBatch = std::make_unique<SpriteBatch>(g_pImmediateContext);
	g_spriteFont = std::make_unique<SpriteFont>(g_pd3dDevice1, L"Data\\game_font.spritefont");

	//Render Text
	g_spriteBatch->Begin();
	//g_spriteFont->DrawString(g_spriteBatch.get(), L"Score: 0", XMFLOAT2(0,0), DirectX::Colors::White);
	g_spriteBatch->End();


I've tried using different Devices and DeviceContext's, but still the same error.
Last edited on
I'm no expert with DX11, but this sounds like a problem with your shader programs. Please post them.

You may also consider asking elsewhere, because DirectX's shading language (HLSL?) is not C++.
Last edited on
Topic archived. No new replies allowed.