In a structure that receives the pixel shader from the vertex shader
what are the limits to the amount of bytes that can be passed?
Any links to a place that describes this?
I am asking this because I had this structure
In a structure that receives the pixel shader from the vertex shader
what are the limits to the amount of bytes that can be passed?
Any links to a place that describes this?
I am asking this because I had this structure
Have a look here for the limits:
http://msdn.microsoft.com/en-us/library/windows/desktop/ff819065%28v=vs.85%29.aspx
So, the register limit looks to be 32 for shader inputs/outputs. You are creating 4x3x3+2 = 38 registers. So even with your a 'fix' for the alignment / padding, you will still be breaching the register limit. You will need another solution.
Edit: I agree with spazzarama below. I took a second look at it.
The D3D11 p_s_50 shader model supports up to 32 registers (four 32-bit components each). I don't think you are going over the limit (in your second example), I think instead the compiler doesn't know what interpolation mode to use for the uint3[4].
From http://msdn.microsoft.com/en-us/library/windows/desktop/bb509668(v=vs.85).aspx
1. When using an int/uint type, the only valid option is nointerpolation.
I can't test anything at the moment, but perhaps prefixing the uints with nointerpolation will help?
Also, perhaps use MASKVALUEPOINTS0 for the first, and then MASKVALUEPOINTS4 for the second and MASKVALUEPOINTS8 on the third. I seem to remember hitting a similar problem once when passing an array of items to a hull or domain shader.
struct PS_PAIReduc{
float4 Pos : SV_POSITION;
uint3 MVPa[4] : MASKVALUEPOINTS0;
uint3 MVPb[4] : MASKVALUEPOINTS4;
uint3 MVPc[4] : MASKVALUEPOINTS8;
uint Loct : LOCATION;
};