public static void InitAsConstants([NativeTypeName("D3D12_ROOT_PARAMETER1 &")] out D3D12_ROOT_PARAMETER1 rootParam, [NativeTypeName("UINT")] uint num32BitValues, [NativeTypeName("UINT")] uint shaderRegister, [NativeTypeName("UINT")] 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); }
public static void InitAsUnorderedAccessView([NativeTypeName("D3D12_ROOT_PARAMETER1 &")] out D3D12_ROOT_PARAMETER1 rootParam, [NativeTypeName("UINT")] uint shaderRegister, [NativeTypeName("UINT")] uint registerSpace = 0, D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL) { rootParam = default; rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV; rootParam.ShaderVisibility = visibility; D3D12_ROOT_DESCRIPTOR1.Init(out rootParam.Anonymous.Descriptor, shaderRegister, registerSpace); }
public static void InitAsDescriptorTable([NativeTypeName("D3D12_ROOT_PARAMETER1 &")] out D3D12_ROOT_PARAMETER1 rootParam, [NativeTypeName("UINT")] 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); }