diff --git a/src/d3d9/d3d9_constant_buffer.cpp b/src/d3d9/d3d9_constant_buffer.cpp index f717d95ec..a20502bb7 100644 --- a/src/d3d9/d3d9_constant_buffer.cpp +++ b/src/d3d9/d3d9_constant_buffer.cpp @@ -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())) { diff --git a/src/d3d9/d3d9_constant_buffer.h b/src/d3d9/d3d9_constant_buffer.h index 1dff07a96..980a7b1bf 100644 --- a/src/d3d9/d3d9_constant_buffer.h +++ b/src/d3d9/d3d9_constant_buffer.h @@ -27,6 +27,12 @@ namespace dxvk { DxsoConstantBuffers BufferType, VkDeviceSize Size); + D3D9ConstantBuffer( + D3D9DeviceEx* pDevice, + VkShaderStageFlags Stages, + uint32_t ResourceSlot, + VkDeviceSize Size); + ~D3D9ConstantBuffer(); /**