1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 11:52:12 +01:00

[dxvk] Add initial layout to initImage

Allows us to initialize an image from the PREINITIALIZED layout.
This commit is contained in:
Philip Rebohle 2019-09-19 18:21:36 +02:00
parent 4570b34456
commit eb0a492f51
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 6 additions and 3 deletions

View File

@ -1610,9 +1610,10 @@ namespace dxvk {
void DxvkContext::initImage(
const Rc<DxvkImage>& image,
const VkImageSubresourceRange& subresources) {
const VkImageSubresourceRange& subresources,
VkImageLayout initialLayout) {
m_execBarriers.accessImage(image, subresources,
VK_IMAGE_LAYOUT_UNDEFINED, 0, 0,
initialLayout, 0, 0,
image->info().layout,
image->info().stages,
image->info().access);

View File

@ -627,10 +627,12 @@ namespace dxvk {
* while discarding any previous contents.
* \param [in] image The image to initialize
* \param [in] subresources Image subresources
* \param [in] initialLayout Initial image layout
*/
void initImage(
const Rc<DxvkImage>& image,
const VkImageSubresourceRange& subresources);
const VkImageSubresourceRange& subresources,
VkImageLayout initialLayout);
/**
* \brief Invalidates a buffer's contents