mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxvk] Determine whether a graphics pipeline writes to resources
- Fix missing test for storage texel buffers
This commit is contained in:
parent
ec8559f40a
commit
9decfb34b7
@ -73,6 +73,9 @@ namespace dxvk {
|
|||||||
if (gs != nullptr && gs->hasCapability(spv::CapabilityTransformFeedback))
|
if (gs != nullptr && gs->hasCapability(spv::CapabilityTransformFeedback))
|
||||||
m_flags.set(DxvkGraphicsPipelineFlag::HasTransformFeedback);
|
m_flags.set(DxvkGraphicsPipelineFlag::HasTransformFeedback);
|
||||||
|
|
||||||
|
if (m_layout->hasStorageDescriptors())
|
||||||
|
m_flags.set(DxvkGraphicsPipelineFlag::HasStorageDescriptors);
|
||||||
|
|
||||||
m_common.msSampleShadingEnable = fs != nullptr && fs->hasCapability(spv::CapabilitySampleRateShading);
|
m_common.msSampleShadingEnable = fs != nullptr && fs->hasCapability(spv::CapabilitySampleRateShading);
|
||||||
m_common.msSampleShadingFactor = 1.0f;
|
m_common.msSampleShadingFactor = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
enum class DxvkGraphicsPipelineFlag {
|
enum class DxvkGraphicsPipelineFlag {
|
||||||
HasTransformFeedback,
|
HasTransformFeedback,
|
||||||
|
HasStorageDescriptors,
|
||||||
};
|
};
|
||||||
|
|
||||||
using DxvkGraphicsCommonPipelineFlags = Flags<DxvkGraphicsPipelineFlag>;
|
using DxvkGraphicsCommonPipelineFlags = Flags<DxvkGraphicsPipelineFlag>;
|
||||||
|
@ -218,6 +218,21 @@ namespace dxvk {
|
|||||||
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER);
|
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Checks whether buffers or images are written to
|
||||||
|
*
|
||||||
|
* It is assumed that storage images and buffers
|
||||||
|
* will be written to if they are present. Used
|
||||||
|
* for synchronization purposes.
|
||||||
|
*/
|
||||||
|
bool hasStorageDescriptors() const {
|
||||||
|
return m_descriptorTypes.any(
|
||||||
|
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
|
||||||
|
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
|
||||||
|
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC,
|
||||||
|
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Rc<vk::DeviceFn> m_vkd;
|
Rc<vk::DeviceFn> m_vkd;
|
||||||
|
Loading…
Reference in New Issue
Block a user