mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Introduce checkGfxImageBarrier
This commit is contained in:
parent
7a78852776
commit
e918104ef3
@ -4587,18 +4587,8 @@ namespace dxvk {
|
||||
case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
|
||||
if (slot.imageView != nullptr
|
||||
&& slot.imageView->imageInfo().usage & storageImageUsage) {
|
||||
srcAccess = m_gfxBarriers.getImageAccess(
|
||||
slot.imageView->image(),
|
||||
slot.imageView->imageSubresources());
|
||||
|
||||
m_gfxBarriers.accessImage(
|
||||
slot.imageView->image(),
|
||||
slot.imageView->imageSubresources(),
|
||||
slot.imageView->imageInfo().layout,
|
||||
binding.stages, binding.access,
|
||||
slot.imageView->imageInfo().layout,
|
||||
slot.imageView->imageInfo().stages,
|
||||
slot.imageView->imageInfo().access);
|
||||
srcAccess = this->checkGfxImageBarrier(slot.imageView,
|
||||
binding.stages, binding.access);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -4642,6 +4632,27 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkAccessFlags DxvkContext::checkGfxImageBarrier(
|
||||
const Rc<DxvkImageView>& imageView,
|
||||
VkPipelineStageFlags stages,
|
||||
VkAccessFlags access) {
|
||||
auto srcAccess = m_gfxBarriers.getImageAccess(
|
||||
imageView->image(),
|
||||
imageView->imageSubresources());
|
||||
|
||||
m_gfxBarriers.accessImage(
|
||||
imageView->image(),
|
||||
imageView->imageSubresources(),
|
||||
imageView->imageInfo().layout,
|
||||
stages, access,
|
||||
imageView->imageInfo().layout,
|
||||
imageView->imageInfo().stages,
|
||||
imageView->imageInfo().access);
|
||||
|
||||
return srcAccess;
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::emitMemoryBarrier(
|
||||
VkDependencyFlags flags,
|
||||
VkPipelineStageFlags srcStages,
|
||||
|
@ -1190,6 +1190,11 @@ namespace dxvk {
|
||||
VkPipelineStageFlags stages,
|
||||
VkAccessFlags access);
|
||||
|
||||
DxvkAccessFlags checkGfxImageBarrier(
|
||||
const Rc<DxvkImageView>& imageView,
|
||||
VkPipelineStageFlags stages,
|
||||
VkAccessFlags access);
|
||||
|
||||
void emitMemoryBarrier(
|
||||
VkDependencyFlags flags,
|
||||
VkPipelineStageFlags srcStages,
|
||||
|
Loading…
x
Reference in New Issue
Block a user