Ejemplo n.º 1
0
        public static void InitAsConstants([NativeTypeName("D3D12_ROOT_PARAMETER &")] out D3D12_ROOT_PARAMETER 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);
        }
Ejemplo n.º 2
0
        public static void InitAsUnorderedAccessView([NativeTypeName("D3D12_ROOT_PARAMETER &")] out D3D12_ROOT_PARAMETER 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_DESCRIPTOR.Init(out rootParam.Anonymous.Descriptor, shaderRegister, registerSpace);
        }
Ejemplo n.º 3
0
        public static void InitAsDescriptorTable([NativeTypeName("D3D12_ROOT_PARAMETER &")] out D3D12_ROOT_PARAMETER rootParam, [NativeTypeName("UINT")] uint numDescriptorRanges, [NativeTypeName("const D3D12_DESCRIPTOR_RANGE *")] D3D12_DESCRIPTOR_RANGE *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_TABLE.Init(out rootParam.Anonymous.DescriptorTable, numDescriptorRanges, pDescriptorRanges);
        }