Consider the following example shader:
Texture2D Tex0 : register(t0);
Texture2D Tex1;
RWTexture2D<float4> Output;
[numthreads(1,1,1)]
void main()
{
Output[(uint2)0] = Tex1.Load((uint3)0);
}
Tex0 has an explicit register assignment t0 and FXC avoids using it when auto-assigning registers for other resources:
> fxc (10.0.17763.0) /T cs_5_0 shader.hlsl
// Resource Bindings:
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// Tex1 texture float4 2d t1 1
// Output UAV float4 2d u0 1
However, DXC seems to auto-assign t0 in this case:
> dxc (bc9ad948) /T cs_5_0 shader.hlsl
; Resource Bindings:
;
; Name Type Format Dim ID HLSL Bind Count
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
; Tex1 texture f32 2d T0 t0 1
; Output UAV f32 2d U0 u0 1
Consider the following example shader:
Tex0has an explicit register assignmentt0and FXC avoids using it when auto-assigning registers for other resources:However, DXC seems to auto-assign
t0in this case: