Ejemplo n.º 1
0
    public static void InitAsDescriptorTable([NativeTypeName("D3D12_ROOT_PARAMETER1 &")] out D3D12_ROOT_PARAMETER1 rootParam, uint numDescriptorRanges, [NativeTypeName("const D3D12_DESCRIPTOR_RANGE1 *")] D3D12_DESCRIPTOR_RANGE1 *pDescriptorRanges, D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
    {
        rootParam = default;

        rootParam.ParameterType    = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
        rootParam.ShaderVisibility = visibility;
        D3D12_ROOT_DESCRIPTOR_TABLE1.Init(out rootParam.Anonymous.DescriptorTable, numDescriptorRanges, pDescriptorRanges);
    }
 public static void Init([NativeTypeName("D3D12_ROOT_DESCRIPTOR_TABLE &")] out D3D12_ROOT_DESCRIPTOR_TABLE1 rootDescriptorTable, uint numDescriptorRanges, [NativeTypeName("const D3D12_DESCRIPTOR_RANGE1 *")] D3D12_DESCRIPTOR_RANGE1 *_pDescriptorRanges)
 {
     rootDescriptorTable.NumDescriptorRanges = numDescriptorRanges;
     rootDescriptorTable.pDescriptorRanges   = _pDescriptorRanges;
 }