mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 07:52:37 +00:00
VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan)
This commit is contained in:
parent
59cafb9303
commit
0726a0e9c8
21 changed files with 107 additions and 59 deletions
|
@ -512,13 +512,13 @@ void VKGfx::SetSamplerState(u32 index, const SamplerState& state)
|
|||
m_sampler_states[index] = state;
|
||||
}
|
||||
|
||||
void VKGfx::SetComputeImageTexture(AbstractTexture* texture, bool read, bool write)
|
||||
void VKGfx::SetComputeImageTexture(u32 index, AbstractTexture* texture, bool read, bool write)
|
||||
{
|
||||
VKTexture* vk_texture = static_cast<VKTexture*>(texture);
|
||||
if (vk_texture)
|
||||
{
|
||||
StateTracker::GetInstance()->EndRenderPass();
|
||||
StateTracker::GetInstance()->SetImageTexture(vk_texture->GetView());
|
||||
StateTracker::GetInstance()->SetImageTexture(index, vk_texture->GetView());
|
||||
vk_texture->TransitionToLayout(g_command_buffer_mgr->GetCurrentCommandBuffer(),
|
||||
read ? (write ? VKTexture::ComputeImageLayout::ReadWrite :
|
||||
VKTexture::ComputeImageLayout::ReadOnly) :
|
||||
|
@ -526,7 +526,7 @@ void VKGfx::SetComputeImageTexture(AbstractTexture* texture, bool read, bool wri
|
|||
}
|
||||
else
|
||||
{
|
||||
StateTracker::GetInstance()->SetImageTexture(VK_NULL_HANDLE);
|
||||
StateTracker::GetInstance()->SetImageTexture(index, VK_NULL_HANDLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue