1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14: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, DxsoProgramType ShaderStage,
DxsoConstantBuffers BufferType, DxsoConstantBuffers BufferType,
VkDeviceSize Size) 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_device (pDevice)
, m_binding (computeResourceSlotId(ShaderStage, DxsoBindingType::ConstantBuffer, BufferType)) , m_binding (ResourceSlot)
, m_stages (GetShaderStage(ShaderStage)) , m_stages (Stages)
, m_size (Size) , m_size (Size)
, m_align (getAlignment(pDevice->GetDXVKDevice())) { , m_align (getAlignment(pDevice->GetDXVKDevice())) {

View File

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