mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +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))
|
||||
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.msSampleShadingFactor = 1.0f;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace dxvk {
|
||||
*/
|
||||
enum class DxvkGraphicsPipelineFlag {
|
||||
HasTransformFeedback,
|
||||
HasStorageDescriptors,
|
||||
};
|
||||
|
||||
using DxvkGraphicsCommonPipelineFlags = Flags<DxvkGraphicsPipelineFlag>;
|
||||
|
@ -217,6 +217,21 @@ namespace dxvk {
|
||||
VK_DESCRIPTOR_TYPE_UNIFORM_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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user