a question about an unclear DX documentation

shuipi

Newcomer
in DX docs where it talks about shader semantics it says vertex shader output semantic TEXCOORD[n] where "n is an optional integer between 0 and the number of resources supported".

two questions:
does "resources" here refer to registers? if so, do these VS output/PS input semantics denote a special class of register (different from general const or fetch or temp registers) that's only used for passing VS output to the interpolator and from the interpolator to the PS?

I guess the "number of resources" is hardware dependent, but is there a way to find out? Say, how can I know if I can use TEXCOORD[9]?
 
in DX docs where it talks about shader semantics it says vertex shader output semantic TEXCOORD[n] where "n is an optional integer between 0 and the number of resources supported".

two questions:
does "resources" here refer to registers? if so, do these VS output/PS input semantics denote a special class of register (different from general const or fetch or temp registers) that's only used for passing VS output to the interpolator and from the interpolator to the PS?

I guess the "number of resources" is hardware dependent, but is there a way to find out? Say, how can I know if I can use TEXCOORD[9]?
I don't have the docs in front of me, but IIRC SM 3.0 specifies a minimum of 10 output semantics. How you allocate them is up to you.
 
The number of resources are defined by the level of DX compatibility. I believe for your example (VS) it's 16 for DX10 and 32 for DX10.1. Those these numbers might be reduced by one to account for position.

Each VS TEXCOORD will require a register (GPR) and the limit as defined by the DX level is the maximum number of interpolants supported.
 
Back
Top