mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[dxvk] Add resource flag to track graphics pipeline side effects
This commit is contained in:
parent
978d7cb65b
commit
a7c1e7a2a0
@ -580,6 +580,27 @@ namespace dxvk {
|
||||
m_trackId = 0u;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Checks whether the buffer has been used for gfx stores
|
||||
*
|
||||
* \returns \c true if any graphics pipeline has written this
|
||||
* resource via transform feedback or a storage descriptor.
|
||||
*/
|
||||
bool hasGfxStores() const {
|
||||
return m_hasGfxStores;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Tracks graphics pipeline side effects
|
||||
*
|
||||
* Must be called whenever the resource is written via graphics
|
||||
* pipeline storage descriptors or transform feedback.
|
||||
* \returns \c true if side effects were already tracked.
|
||||
*/
|
||||
bool trackGfxStores() {
|
||||
return std::exchange(m_hasGfxStores, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Queries sparse page table
|
||||
*
|
||||
@ -622,6 +643,8 @@ namespace dxvk {
|
||||
uint64_t m_trackId = { 0u };
|
||||
uint64_t m_cookie = { 0u };
|
||||
|
||||
bool m_hasGfxStores = false;
|
||||
|
||||
static constexpr uint64_t getIncrement(DxvkAccess access) {
|
||||
return uint64_t(1u) << (uint32_t(access) * 20u);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user