ryujinx-mirror/src/Ryujinx.Graphics.Vulkan
riperiperi 7c327fecb3
Vulkan: Record modifications after changing the framebuffer (#4775)
Our Vulkan backend inserts image barriers when a texture is sampled after it is rendered. This is done via a "modification flag" which is set when a render target is unbound (presuming that a texture has finished drawing to it).

Imagine the following scenario:
- Game sets render target to texture A
- Game renders to texture A
- (render pass ends)
- Game binds texture A to a sampler
- Game sets render target to texture B
- Renders to texture B using texture A (barrier required)

Because of the previous behaviour, the check to add a barrier for sampling a texture actually happens before it is registered as modified, meaning no barrier was added at all. This isn't always the case, but it was definitely causing issues in Xenoblade 2.

This doesn't fix any more complicated issues where a texture is repeatedly sampled while it is currently being rendered.

Fixes visual glitches at lower resolutions in Xenoblade 2. May fix other cases.
2023-05-03 10:42:21 +02:00
..
Effects Move solution and projects to src 2023-04-27 23:51:14 +02:00
MoltenVK Move solution and projects to src 2023-04-27 23:51:14 +02:00
Queries Move solution and projects to src 2023-04-27 23:51:14 +02:00
Shaders GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
Auto.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
AutoFlushCounter.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BackgroundResources.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BitMap.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BufferAllocationType.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BufferHolder.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
BufferManager.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
BufferState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BufferUsageBitmap.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
CacheByRange.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
CommandBufferPool.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
CommandBufferScoped.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Constants.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DescriptorSetCollection.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DescriptorSetManager.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DescriptorSetUpdater.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableBuffer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableBufferView.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableFramebuffer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableImage.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableImageView.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableMemory.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposablePipeline.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableRenderPass.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
DisposableSampler.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
EnumConversion.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
FenceHelper.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
FenceHolder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
FormatCapabilities.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
FormatConverter.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
FormatTable.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
FramebufferParams.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
HardwareCapabilities.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
HashTableSlim.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
HelperShader.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
HostMemoryAllocator.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
IdList.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IndexBufferPattern.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
IndexBufferState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
MemoryAllocation.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
MemoryAllocator.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
MemoryAllocatorBlockList.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
MultiFenceHolder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
NativeArray.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PersistentFlushBuffer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineBase.cs Vulkan: Record modifications after changing the framebuffer (#4775) 2023-05-03 10:42:21 +02:00
PipelineConverter.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineDynamicState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineFull.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineHelperShader.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineLayoutCache.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineLayoutCacheEntry.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineLayoutFactory.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PipelineUid.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ryujinx.Graphics.Vulkan.csproj Move solution and projects to src 2023-04-27 23:51:14 +02:00
SamplerHolder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SemaphoreHolder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Shader.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ShaderCollection.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SpecInfo.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
StagingBuffer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SyncManager.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
TextureBuffer.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
TextureCopy.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
TextureStorage.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
TextureView.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
Vendor.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VertexBufferState.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanConfiguration.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanDebugMessenger.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanException.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanInitialization.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
VulkanInstance.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanPhysicalDevice.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
VulkanRenderer.cs GPU: Pre-emptively flush textures that are flushed often (to imported memory when available) (#4711) 2023-05-01 16:05:12 -03:00
Window.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
WindowBase.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00