mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxvk] Add discardImage method
This commit is contained in:
parent
a29f698305
commit
0d9e714d3e
@ -836,6 +836,24 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DxvkContext::discardImage(
|
||||||
|
const Rc<DxvkImage>& image,
|
||||||
|
VkImageSubresourceRange subresources) {
|
||||||
|
this->spillRenderPass();
|
||||||
|
|
||||||
|
if (m_barriers.isImageDirty(image, subresources, DxvkAccess::Write))
|
||||||
|
m_barriers.recordCommands(m_cmd);
|
||||||
|
|
||||||
|
m_barriers.accessImage(image, subresources,
|
||||||
|
VK_IMAGE_LAYOUT_UNDEFINED, 0, 0,
|
||||||
|
image->info().layout,
|
||||||
|
image->info().stages,
|
||||||
|
image->info().access);
|
||||||
|
|
||||||
|
m_cmd->trackResource(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxvkContext::dispatch(
|
void DxvkContext::dispatch(
|
||||||
uint32_t x,
|
uint32_t x,
|
||||||
uint32_t y,
|
uint32_t y,
|
||||||
|
@ -371,6 +371,19 @@ namespace dxvk {
|
|||||||
void discardBuffer(
|
void discardBuffer(
|
||||||
const Rc<DxvkBuffer>& buffer);
|
const Rc<DxvkBuffer>& buffer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Discards image subresources
|
||||||
|
*
|
||||||
|
* Discards the current contents of the image
|
||||||
|
* and performs a fast layout transition. This
|
||||||
|
* may improve performance in some cases.
|
||||||
|
* \param [in] image The image to discard
|
||||||
|
* \param [in] subresources Image subresources
|
||||||
|
*/
|
||||||
|
void discardImage(
|
||||||
|
const Rc<DxvkImage>& image,
|
||||||
|
VkImageSubresourceRange subresources);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Starts compute jobs
|
* \brief Starts compute jobs
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user