From d3e1c1e016d674396d03aa1ac4fe56e01f4d7595 Mon Sep 17 00:00:00 2001 From: Johan Gustafsson Date: Fri, 20 Mar 2026 16:50:39 +0100 Subject: [PATCH] Prevent typeless textures from creating srv / rtv on initialization --- .../Stride.Graphics/Direct3D11/Texture.Direct3D11.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sources/engine/Stride.Graphics/Direct3D11/Texture.Direct3D11.cs b/sources/engine/Stride.Graphics/Direct3D11/Texture.Direct3D11.cs index 9949fcc052..3b0988a61b 100644 --- a/sources/engine/Stride.Graphics/Direct3D11/Texture.Direct3D11.cs +++ b/sources/engine/Stride.Graphics/Direct3D11/Texture.Direct3D11.cs @@ -498,6 +498,11 @@ private ComPtr GetShaderResourceView(ViewType viewType var srvDescription = new ShaderResourceViewDesc { Format = ComputeShaderResourceViewFormat() }; + if (((PixelFormat)srvDescription.Format).IsTypeless) + { + return null; + } + // Initialize for Texture Array or Texture Cube if (ArraySize > 1) { @@ -609,6 +614,11 @@ private ComPtr GetRenderTargetView(ViewType viewType, in var rtvDescription = new RenderTargetViewDesc { Format = (Format) ViewFormat }; + if (((PixelFormat)rtvDescription.Format).IsTypeless) + { + return null; + } + // Initialize for Texture Array or Texture Cube if (ArraySize > 1) {