public static void InitAsConstants([NativeTypeName("D3D12_ROOT_PARAMETER &")] out D3D12_ROOT_PARAMETER rootParam, uint num32BitValues, uint shaderRegister, uint registerSpace = 0, D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
    {
        rootParam = default;

        rootParam.ParameterType    = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
        rootParam.ShaderVisibility = visibility;
        D3D12_ROOT_CONSTANTS.Init(out rootParam.Anonymous.Constants, num32BitValues, shaderRegister, registerSpace);
    }
Exemplo n.º 2
0
 private RootParameter(D3D12_ROOT_CONSTANTS constants, ShaderVisibility visibility)
 {
     Type            = RootParameterType.DwordConstants;
     Visibility      = visibility;
     DescriptorTable = default;
     Descriptor      = default;
     Constants       = constants;
 }
 public static void Init([NativeTypeName("D3D12_ROOT_CONSTANTS &")] out D3D12_ROOT_CONSTANTS rootConstants, uint num32BitValues, uint shaderRegister, uint registerSpace = 0)
 {
     rootConstants.Num32BitValues = num32BitValues;
     rootConstants.ShaderRegister = shaderRegister;
     rootConstants.RegisterSpace  = registerSpace;
 }