mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[dxvk] Store VkImage in barrier set rather than DxvkImage*
Avoids some accidental ref counting.
This commit is contained in:
parent
d66ecf4a94
commit
1a1cc32b11
@ -73,7 +73,7 @@ namespace dxvk {
|
||||
m_imgBarriers.push_back(barrier);
|
||||
}
|
||||
|
||||
m_imgSlices.push_back({ image.ptr(), subresources, access });
|
||||
m_imgSlices.push_back({ image->handle(), subresources, access });
|
||||
}
|
||||
|
||||
|
||||
@ -152,8 +152,8 @@ namespace dxvk {
|
||||
acquire.m_imgBarriers.push_back(barrier);
|
||||
|
||||
DxvkAccessFlags access(DxvkAccess::Read, DxvkAccess::Write);
|
||||
release.m_imgSlices.push_back({ image.ptr(), subresources, access });
|
||||
acquire.m_imgSlices.push_back({ image.ptr(), subresources, access });
|
||||
release.m_imgSlices.push_back({ image->handle(), subresources, access });
|
||||
acquire.m_imgSlices.push_back({ image->handle(), subresources, access });
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ namespace dxvk {
|
||||
for (uint32_t i = 0; i < m_imgSlices.size() && !result; i++) {
|
||||
const VkImageSubresourceRange& dstSubres = m_imgSlices[i].subres;
|
||||
|
||||
result = (image == m_imgSlices[i].image) && (imgAccess | m_imgSlices[i].access).test(DxvkAccess::Write)
|
||||
result = (image->handle() == m_imgSlices[i].image) && (imgAccess | m_imgSlices[i].access).test(DxvkAccess::Write)
|
||||
&& (imgSubres.baseArrayLayer < dstSubres.baseArrayLayer + dstSubres.layerCount)
|
||||
&& (imgSubres.baseArrayLayer + imgSubres.layerCount > dstSubres.baseArrayLayer)
|
||||
&& (imgSubres.baseMipLevel < dstSubres.baseMipLevel + dstSubres.levelCount)
|
||||
@ -219,7 +219,7 @@ namespace dxvk {
|
||||
for (uint32_t i = 0; i < m_imgSlices.size(); i++) {
|
||||
const VkImageSubresourceRange& dstSubres = m_imgSlices[i].subres;
|
||||
|
||||
if ((image == m_imgSlices[i].image)
|
||||
if ((image->handle() == m_imgSlices[i].image)
|
||||
&& (imgSubres.baseArrayLayer < dstSubres.baseArrayLayer + dstSubres.layerCount)
|
||||
&& (imgSubres.baseArrayLayer + imgSubres.layerCount > dstSubres.baseArrayLayer)
|
||||
&& (imgSubres.baseMipLevel < dstSubres.baseMipLevel + dstSubres.levelCount)
|
||||
|
@ -93,7 +93,7 @@ namespace dxvk {
|
||||
};
|
||||
|
||||
struct ImgSlice {
|
||||
DxvkImage* image;
|
||||
VkImage image;
|
||||
VkImageSubresourceRange subres;
|
||||
DxvkAccessFlags access;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user