Compatibility mode?

112 views
Skip to first unread message

Mark Sibly

unread,
Jul 31, 2023, 12:56:07 AM7/31/23
to Dawn Graphics
Hi,

I just updated my dawn repos and am getting the following error running my project in D3D12:

0x0000010d375beed0 "Unsupported texture format TextureFormat::BGRA8UnormSrgb, reason: not supported in compatibility mode.\n - While validating [TextureViewDescriptor] against [Texture].\n - While calling [Texture].CreateView([TextureViewDescriptor]).\n"

What is compatibility mode and how do I get out of it?!?

Semi-related, the latest changes have also broken my Vulkan OpenXR hacks. I was using AdapapterDiscoveryOptions to pass a bunch of setup/config info from OpenXR to Dawn but that has been replaced by RequestAdapterOptions which is auto generated so I can't just throw my OpenXRConfig struct in there! Should I attempt to created a 'chained' feature/extension? If so, what would be a good example/starting point?

It's not really urgent as OpenXR should still work in D3D12 if I can get the above error sorted. I've never had much luck with VR in Linux anway (despite considerable effort) and it feels sort of 'dead' there, so perhaps D3D12 is good enough...but it'd still be nice to support Vulkan if possible.

Bye,
Mark

Corentin Wallez

unread,
Jul 31, 2023, 4:52:53 AM7/31/23
to Mark Sibly, Dawn Graphics
Hey Mark,

Compatibility mode is a mode where additional restrictions are added to the WebGPU so that it can run on top of D3D11 and OpenGL ES 3.1 for better reach. Which API are you using to get an adapter? If using DiscoverDefaultAdapters/GetAdapter (a deprecated path that we'll need to remove eventually) then for various reasons Dawn returns the compat-mode adapters first (it creates two D3D12 adapters, one in compat more, the other in full mode). You should switch to the EnumerateAdapters API that should return a non-compat adapter first.

As for the discovery options, we are moving most of them to the dawn.json file as you saw. It should still be possible to define a struct in VulkanBackend.h but it will need to inherit from wgpu::ChainStruct and have an sType allocated in dawn.json. Then it should be handled in Dawn's code like other chained structs.

Hope this helps,

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/1cd4926c-f66a-4fd0-af75-657ec2b11349n%40googlegroups.com.

Austin Eng

unread,
Jul 31, 2023, 12:51:17 PM7/31/23
to Corentin Wallez, Mark Sibly, Dawn Graphics
Mark - you can look at RequestAdapterOptionsLUID as an example for adding a new chained struct type if you can't put it inside dawn.json (because it uses some types from other headers).



Reply all
Reply to author
Forward
0 new messages