mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoBackends:D3D12: Dynamic vertex loader support
This commit is contained in:
@ -261,6 +261,16 @@ bool DXContext::CreateDescriptorHeaps()
|
||||
return true;
|
||||
}
|
||||
|
||||
static void SetRootParamConstant(D3D12_ROOT_PARAMETER* rp, u32 shader_reg, u32 num_values,
|
||||
D3D12_SHADER_VISIBILITY visibility)
|
||||
{
|
||||
rp->ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
|
||||
rp->Constants.Num32BitValues = num_values;
|
||||
rp->Constants.ShaderRegister = shader_reg;
|
||||
rp->Constants.RegisterSpace = 0;
|
||||
rp->ShaderVisibility = visibility;
|
||||
}
|
||||
|
||||
static void SetRootParamCBV(D3D12_ROOT_PARAMETER* rp, u32 shader_reg,
|
||||
D3D12_SHADER_VISIBILITY visibility)
|
||||
{
|
||||
@ -345,6 +355,11 @@ bool DXContext::CreateGXRootSignature()
|
||||
param_count++;
|
||||
SetRootParamCBV(¶ms[param_count], 0, D3D12_SHADER_VISIBILITY_GEOMETRY);
|
||||
param_count++;
|
||||
SetRootParamTable(¶ms[param_count], &ranges[param_count], D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 3,
|
||||
1, D3D12_SHADER_VISIBILITY_VERTEX);
|
||||
param_count++;
|
||||
SetRootParamConstant(¶ms[param_count], 2, 1, D3D12_SHADER_VISIBILITY_VERTEX);
|
||||
param_count++;
|
||||
|
||||
// Since these must be contiguous, pixel lighting goes to bbox if not enabled.
|
||||
if (g_ActiveConfig.bBBoxEnable)
|
||||
|
Reference in New Issue
Block a user