If I set the color values to diffuse the in the vertex shader it draws my geometry correctly with the defined color.But commenting out the color assignment (since this line was used for debugging), will give me the following warning:[7480] D3D11: WARNING: ID3D11DeviceContext::Draw: The size of the Constant Buffer at slot 1 of the Vertex Shader unit is too small (64 bytes provided, 144 bytes, at least, expected). This is OK, as out-of-bounds reads are defined to return 0. It is also possible the developer knows the missing data will not be used anyway. This is only a problem if the developer actually intended to bind a sufficiently large Constant Buffer for what the shader expects. [ EXECUTION WARNING #351: DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL ]

This happens also if I use UpdateSubResource method to update both constant buffers.It seems that the second constant buffer update overwrites also the first constant buffer.

I wanted to ask how to handle multiple constant buffer updates? Am I missing something?

When you have multiple constant buffers, you have to put them in separate slots. i don't know how to use slimdx, but in regular dx11, you can set the vertex's constant buffer by calling VSSetConstantBuffers of the device context, and setting the second parameter as 0 for the first constant buffer, and 1 for the second. If the vertex and pixel shader share a constant buffer, you will have to bind the same constant buffer separately to each shader, using VSSetConstantBuffers and VSSetConstantBuffers.

sorry it didn't work for you, but one other thing, iis (as far as i know) you have to put each buffer in it's own slot, even if two shaders use the same buffer, they should go into separate slots, so when you bind your pixel shaders buffer, you should try changing the '1' to a '2'

This might not be the problem, but just check it out. Are you making sure you are packaging your constant buffers correctly in your app? the shader takes 16 byte chunks for the constant buffer, so if you have a variable that's split between two chunks, it will cause problems. float variables are 4 bytes, float3's are 12 bytes, matrices are 16 bytes. I see you have it aligned correctly in the shader, so i'm guessing it's probably the same for your app, but double check.

[7480] D3D11: WARNING: ID3D11DeviceContext::Draw: The size of the Constant Buffer at slot 1 of the Vertex Shader unit is too small (64 bytes provided, 144 bytes, at least, expected). This is OK, as out-of-bounds reads are defined to return 0. It is also possible the developer knows the missing data will not be used anyway. This is only a problem if the developer actually intended to bind a sufficiently large Constant Buffer for what the shader expects. [ EXECUTION WARNING #351: DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL ]

The error message has all the information about the problem. Your constant buffer bound at slot 1 has size of 64 bytes, but the shader is reading data from area outside of the 64 bytes area.

This means that you have the light buffer bound to slot 1, but on the shader expects the matrix buffer to be at slot 1. You have to have same registers at the program side and at the shader side. Remember that the register indices are 0-based.