public readonly record struct TextureBarrierA texture changing what it is being used for, and therefore its layout.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Subresource ranges are here rather than implied, because the common case in a real renderer is transitioning one mip of a chain — generating mips, or reading level n while writing level n+1 — and a barrier that covers the whole texture there serialises work that did not need serialising.
Two different queues make this an ownership transfer, and an ownership transfer is two barriers, not one: the same barrier is recorded a second time on the destination queue's list, and the contents of a resource whose release was recorded without its matching acquire are undefined. Recording only one half is the shape of corruption that reproduces on one vendor and not another — a driver that happens to leave the memory alone looks correct forever. Vixen.Graphics.RenderGraph emits both halves; hand-written code has to do it in pairs.
⚠ Equal queues mean no transfer at all, and that is the default. A backend with one queue, or one whose two QueueKinds land on the same hardware family, records exactly what it records today — which is what makes an async-scheduled frame and a single-queue frame the same frame.
Fields and properties (10)
public TextureHandle TextureThe texture.
public ResourceState BeforeWhat was using it.
public ResourceState AfterWhat is about to.
public int BaseMipLevelThe first mip level the barrier covers.
public int MipLevelCountHow many levels, or 0 for all of them.
public int BaseArrayLayerThe first array layer the barrier covers.
public int ArrayLayerCountHow many layers, or 0 for all of them.
public QueueKind SourceQueueWhich queue owns it now.
public QueueKind DestinationQueueWhich queue is to own it next.
public bool TransfersOwnershipWhether this barrier hands the texture from one queue to another.
Methods (1)
public TextureBarrier(TextureHandle Texture, ResourceState Before, ResourceState After, int BaseMipLevel = 0, int MipLevelCount = 0, int BaseArrayLayer = 0, int ArrayLayerCount = 0, QueueKind SourceQueue = Graphics, QueueKind DestinationQueue = Graphics)A texture changing what it is being used for, and therefore its layout.
Used by (48, showing 40)
- ArenaFrameThirdPersonShooter
- ArenaIlluminationThirdPersonShooter
- ShowcaseFramePbrShowcase
- BarrierGroupVixen.Graphics
- CascadeCountDeviceTestsVixen.Graphics.Golden.Tests
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- EnvironmentTextureVixen.Rendering
- FoliageCullPassVixen.Rendering.Terrain
- FoliageDrawPassVixen.Rendering.Terrain
- GlCommandRecorderVixen.Graphics.OpenGL
- GlDeviceVixen.Graphics.OpenGL
- GlobalDistanceFieldTextureVixen.Rendering
- GrassDrawPassVixen.Rendering.Terrain
- ImpostorBakeVixen.Rendering
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceCubeCaptureVixen.Rendering
- IrradianceFieldTextureVixen.Rendering
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
- MaxLightsDeviceTestsVixen.Graphics.Golden.Tests
- NullCommandListVixen.Graphics.Null
- PipelineStateImageTestsVixen.Graphics.Golden.Tests
- QueueOwnershipTestsVixen.Graphics.Null.Tests
- ReflectionRendererVixen.Rendering.PostFx
- ReflectionRendererDeviceTestsVixen.Graphics.Golden.Tests
- ReflectionTraceDeviceTestsVixen.Graphics.Golden.Tests
- RenderGraphVixen.Graphics.RenderGraph
- ScreenProbeBilateralImageTestsVixen.Graphics.Golden.Tests
- ScreenProbeHistoryTextureVixen.Rendering
- ScreenProbeTextureVixen.Rendering
- ScreenProbeTraceDeviceTestsVixen.Graphics.Golden.Tests
- ScreenPyramidDeviceTestsVixen.Graphics.Golden.Tests
- SurfaceCacheTextureVixen.Rendering
- SurfaceCardCaptureVixen.Rendering
- TerrainRendererVixen.Rendering.Terrain
- TrackingCommandListVixen.Graphics.RenderGraph.Tests
- VideoRenderTargetVixen.Video.Rendering
- VideoTextureVixen.Video
- VulkanCommandListVixen.Graphics.Vulkan
- WorldRendererVixen.Engine.Renderer
- EditorUiCompositingDeviceTestsVixen.Editor.App.Tests