File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -135,18 +135,18 @@ wrapper::directx12::root_signature::root_signature(const ComPtr<ID3D12RootSignat
135
135
{
136
136
}
137
137
138
- wrapper::directx12::root_signature wrapper::directx12::root_signature::create (const device& device, const root_signature_info& info, bool local)
138
+ wrapper::directx12::root_signature wrapper::directx12::root_signature::create (
139
+ const D3D12_ROOT_SIGNATURE_FLAGS& flags,
140
+ const device& device, const root_signature_info& info)
139
141
{
140
142
D3D12_ROOT_SIGNATURE_DESC desc;
141
143
142
- // https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_root_signature_flags
143
- // This flag(D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE) cannot be combined with any other root signature flags
144
- desc.Flags = local ? D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE : D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
144
+ desc.Flags = flags;
145
145
desc.NumStaticSamplers = static_cast <UINT>(info.samplers ().size ());
146
146
desc.NumParameters = static_cast <UINT>(info.parameters ().size ());
147
147
desc.pStaticSamplers = info.samplers ().data ();
148
148
desc.pParameters = info.parameters ().data ();
149
-
149
+
150
150
ComPtr<ID3DBlob> signature_blob = nullptr ;
151
151
ComPtr<ID3DBlob> error_blob = nullptr ;
152
152
Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ namespace wrapper::directx12
41
41
const std::vector<D3D12_ROOT_PARAMETER>& parameters () const ;
42
42
private:
43
43
root_signature_info& add_root_parameter (const std::string& name, const D3D12_ROOT_PARAMETER& parameter);
44
-
44
+
45
+ D3D12_ROOT_SIGNATURE_FLAGS mFlags = D3D12_ROOT_SIGNATURE_FLAG_NONE;
46
+
45
47
std::vector<D3D12_STATIC_SAMPLER_DESC> mStaticSamplers ;
46
48
std::vector<D3D12_ROOT_PARAMETER> mRootParameters ;
47
49
@@ -61,7 +63,9 @@ namespace wrapper::directx12
61
63
62
64
root_signature (const ComPtr<ID3D12RootSignature>& source);
63
65
64
- static root_signature create (const device& device, const root_signature_info& info, bool local = false );
66
+ static root_signature create (
67
+ const D3D12_ROOT_SIGNATURE_FLAGS& flags,
68
+ const device& device, const root_signature_info& info);
65
69
};
66
70
67
71
}
Original file line number Diff line number Diff line change @@ -322,7 +322,9 @@ namespace wrapper::directx12::extensions
322
322
.add_constants (" view" , 0 , 0 , 16 )
323
323
.add_static_sampler (" sampler" , 0 , 0 );
324
324
325
- RootSignature = root_signature::create (Device, RootSignatureInfo);
325
+ RootSignature = root_signature::create (
326
+ D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT,
327
+ Device, RootSignatureInfo);
326
328
327
329
static const char * vert_shader =
328
330
" cbuffer vertexBuffer : register(b0) \
You can’t perform that action at this time.
0 commit comments