Skip to content

Commit

Permalink
D3D: Support additional Surface formats.
Browse files Browse the repository at this point in the history
And comment about the lack of StorageBinding.

Bug: 41479562
Change-Id: Id2f24c28eb21f2aa3d3fcf7c37b50a6b2360df49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/200474
Reviewed-by: Loko Kung <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
  • Loading branch information
Kangz authored and Dawn LUCI CQ committed Aug 22, 2024
1 parent 4f97c0e commit b895f7c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/dawn/native/d3d/PhysicalDeviceD3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ ResultOrError<PhysicalDeviceSurfaceCapabilities> PhysicalDevice::GetSurfaceCapab
const Surface*) const {
PhysicalDeviceSurfaceCapabilities capabilities;

// StorageBinding is not supported by DXGI swapchains.
capabilities.usages = wgpu::TextureUsage::RenderAttachment |
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::CopySrc |
wgpu::TextureUsage::CopyDst;

// This is the only supported format in native mode (see crbug.com/dawn/160).
capabilities.formats.push_back(wgpu::TextureFormat::BGRA8Unorm);
// The list of format allowed with the DXGI flip model.
capabilities.formats = {
wgpu::TextureFormat::BGRA8Unorm,
wgpu::TextureFormat::RGBA8Unorm,
wgpu::TextureFormat::RGBA16Float,
wgpu::TextureFormat::RGB10A2Unorm,
};

capabilities.presentModes = {
wgpu::PresentMode::Fifo,
Expand Down

0 comments on commit b895f7c

Please sign in to comment.