mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxvk] Add initializeImage helper
Allows us to use TOP_OF_PIPE -> xxx barriers more often.
This commit is contained in:
parent
a208f45fe4
commit
bbd5762d3d
@ -4742,6 +4742,26 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::initializeImage(
|
||||
const Rc<DxvkImage>& image,
|
||||
const VkImageSubresourceRange& subresources,
|
||||
VkImageLayout dstLayout,
|
||||
VkPipelineStageFlags dstStages,
|
||||
VkAccessFlags dstAccess) {
|
||||
if (m_execBarriers.isImageDirty(image, subresources, DxvkAccess::Write))
|
||||
m_execBarriers.recordCommands(m_cmd);
|
||||
|
||||
VkPipelineStageFlags srcStages = 0;
|
||||
|
||||
if (image->isInUse())
|
||||
srcStages = dstStages;
|
||||
|
||||
m_execAcquires.accessImage(image, subresources,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED, srcStages, 0,
|
||||
dstLayout, dstStages, dstAccess);
|
||||
}
|
||||
|
||||
|
||||
VkDescriptorSet DxvkContext::allocateDescriptorSet(
|
||||
VkDescriptorSetLayout layout) {
|
||||
if (m_descPool == nullptr)
|
||||
|
@ -1223,6 +1223,13 @@ namespace dxvk {
|
||||
VkPipelineStageFlags dstStages,
|
||||
VkAccessFlags dstAccess);
|
||||
|
||||
void initializeImage(
|
||||
const Rc<DxvkImage>& image,
|
||||
const VkImageSubresourceRange& subresources,
|
||||
VkImageLayout dstLayout,
|
||||
VkPipelineStageFlags dstStages,
|
||||
VkAccessFlags dstAccess);
|
||||
|
||||
VkDescriptorSet allocateDescriptorSet(
|
||||
VkDescriptorSetLayout layout);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user