mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Always enable STORAGE_BUFFER usage
Fixes a validation error. Drivers don't care about buffer usage bits anyway.
This commit is contained in:
parent
dfc3776b24
commit
65dd3c7df3
@ -13,7 +13,7 @@ namespace dxvk {
|
||||
DxsoProgramType ShaderStage,
|
||||
DxsoConstantBuffers BufferType,
|
||||
VkDeviceSize Size)
|
||||
: D3D9ConstantBuffer(pDevice, getBufferUsage(pDevice, ShaderStage, BufferType), GetShaderStage(ShaderStage),
|
||||
: D3D9ConstantBuffer(pDevice, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, GetShaderStage(ShaderStage),
|
||||
computeResourceSlotId(ShaderStage, DxsoBindingType::ConstantBuffer, BufferType),
|
||||
Size) {
|
||||
|
||||
@ -135,21 +135,4 @@ namespace dxvk {
|
||||
device->properties().extRobustness2.robustUniformBufferAccessSizeAlignment);
|
||||
}
|
||||
|
||||
|
||||
VkBufferUsageFlags D3D9ConstantBuffer::getBufferUsage(
|
||||
D3D9DeviceEx* pDevice,
|
||||
DxsoProgramType ShaderStage,
|
||||
DxsoConstantBuffers BufferType) {
|
||||
VkBufferUsageFlags result = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
|
||||
|
||||
// We won't always need this, but the only buffer that
|
||||
// this applies to is so large that it will not matter.
|
||||
if (pDevice->CanSWVP()
|
||||
&& ShaderStage == DxsoProgramType::VertexShader
|
||||
&& BufferType == DxsoConstantBuffers::VSConstantBuffer)
|
||||
result |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,11 +80,6 @@ namespace dxvk {
|
||||
|
||||
VkDeviceSize getAlignment(const Rc<DxvkDevice>& device) const;
|
||||
|
||||
static VkBufferUsageFlags getBufferUsage(
|
||||
D3D9DeviceEx* pDevice,
|
||||
DxsoProgramType ShaderStage,
|
||||
DxsoConstantBuffers BufferType);
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user