1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d9] Generalize D3D9ConstantBuffer constructor

This commit is contained in:
Philip Rebohle 2022-07-31 02:39:20 +02:00 committed by Joshie
parent 00eaec1619
commit a2ef99b95c
2 changed files with 20 additions and 2 deletions

View File

@ -13,9 +13,21 @@ namespace dxvk {
DxsoProgramType ShaderStage,
DxsoConstantBuffers BufferType,
VkDeviceSize Size)
: D3D9ConstantBuffer(pDevice, GetShaderStage(ShaderStage),
computeResourceSlotId(ShaderStage, DxsoBindingType::ConstantBuffer, BufferType),
Size) {
}
D3D9ConstantBuffer::D3D9ConstantBuffer(
D3D9DeviceEx* pDevice,
VkShaderStageFlags Stages,
uint32_t ResourceSlot,
VkDeviceSize Size)
: m_device (pDevice)
, m_binding (computeResourceSlotId(ShaderStage, DxsoBindingType::ConstantBuffer, BufferType))
, m_stages (GetShaderStage(ShaderStage))
, m_binding (ResourceSlot)
, m_stages (Stages)
, m_size (Size)
, m_align (getAlignment(pDevice->GetDXVKDevice())) {

View File

@ -27,6 +27,12 @@ namespace dxvk {
DxsoConstantBuffers BufferType,
VkDeviceSize Size);
D3D9ConstantBuffer(
D3D9DeviceEx* pDevice,
VkShaderStageFlags Stages,
uint32_t ResourceSlot,
VkDeviceSize Size);
~D3D9ConstantBuffer();
/**