summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-07-10 20:55:15 -0700
committerGitHub <noreply@github.com>2025-07-11 03:55:15 +0000
commit1eb62804b2c2c1acff94558acc648bb62ea7d051 (patch)
tree93fc6ca26d57cf89f3d0cce031c68726ede19309 /examples
parentd0f342c9263a0e47947ac3be9fa4d9f665831e63 (diff)
Configure the surface with right format (#7710)
Diffstat (limited to 'examples')
-rw-r--r--examples/example-base/example-base.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/example-base/example-base.cpp b/examples/example-base/example-base.cpp
index 2c7dd277c..9759e9f42 100644
--- a/examples/example-base/example-base.cpp
+++ b/examples/example-base/example-base.cpp
@@ -58,7 +58,7 @@ Slang::Result WindowedAppBase::initializeBase(
rhi::SurfaceConfig surfaceConfig = {};
- surfaceConfig.format = Format::RGBA8Unorm;
+ surfaceConfig.format = gSurface->getInfo().preferredFormat;
surfaceConfig.width = width;
surfaceConfig.height = height;
surfaceConfig.desiredImageCount = kSwapchainImageCount;