diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-09-19 19:29:38 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-10-06 02:17:42 -0500 |
| commit | b6d321bfb176b8296d9b128d3bb23da5b1a9124c (patch) | |
| tree | c700dda47a8d7f9929abe0e50e6fee9bdce15df4 /Source/Core/VideoBackends/D3D12/DX12Context.cpp | |
| parent | 92accc3ef7bd599e112a67ee0095b22dd48c3055 (diff) | |
VideoBackends / VideoCommon: add new uniform buffer object for custom shader materials (slot 3, geometry shader buffer moves to slot 4 if available)
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/DX12Context.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/DX12Context.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/DX12Context.cpp b/Source/Core/VideoBackends/D3D12/DX12Context.cpp index dd8630ac3b..843efc79d4 100644 --- a/Source/Core/VideoBackends/D3D12/DX12Context.cpp +++ b/Source/Core/VideoBackends/D3D12/DX12Context.cpp @@ -339,7 +339,7 @@ bool DXContext::CreateRootSignatures() bool DXContext::CreateGXRootSignature() { // GX: - // - 3 constant buffers (bindings 0-2), 0/1 visible in PS, 2 visible in VS, 1 visible in GS. + // - 4 constant buffers (bindings 0-3), 0/1/2 visible in PS, 2 visible in VS, 1 visible in GS. // - VideoCommon::MAX_PIXEL_SHADER_SAMPLERS textures (visible in PS). // - VideoCommon::MAX_PIXEL_SHADER_SAMPLERS samplers (visible in PS). // - 1 UAV (visible in PS). @@ -367,7 +367,7 @@ bool DXContext::CreateGXRootSignature() SetRootParamTable(¶ms[param_count], &ranges[param_count], D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 3, 1, D3D12_SHADER_VISIBILITY_VERTEX); param_count++; - SetRootParamConstant(¶ms[param_count], 3, 1, D3D12_SHADER_VISIBILITY_VERTEX); + SetRootParamConstant(¶ms[param_count], 4, 1, D3D12_SHADER_VISIBILITY_VERTEX); param_count++; // Since these must be contiguous, pixel lighting goes to bbox if not enabled. @@ -383,6 +383,9 @@ bool DXContext::CreateGXRootSignature() param_count++; } + SetRootParamCBV(¶ms[param_count], 2, D3D12_SHADER_VISIBILITY_PIXEL); + param_count++; + return BuildRootSignature(m_device.Get(), &m_gx_root_signature, params.data(), param_count); } |
