summaryrefslogtreecommitdiffstats
path: root/examples/example-base/example-base.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-06-30 14:59:18 -0700
committerGitHub <noreply@github.com>2021-06-30 14:59:18 -0700
commita03d21a5f54cba913c3f52e2822a433de8f39fdd (patch)
tree84d24d4355cc4b3e941da9eab57147cd9d297ee4 /examples/example-base/example-base.cpp
parent5395ef82535c283109b1ea6b89b737c5a39bf147 (diff)
[gfx] Add inline ray tracing support. (#1899)
Diffstat (limited to 'examples/example-base/example-base.cpp')
-rw-r--r--examples/example-base/example-base.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/example-base/example-base.cpp b/examples/example-base/example-base.cpp
index 04f938697..c45e3cc27 100644
--- a/examples/example-base/example-base.cpp
+++ b/examples/example-base/example-base.cpp
@@ -9,7 +9,11 @@
using namespace Slang;
using namespace gfx;
-Slang::Result WindowedAppBase::initializeBase(const char* title, int width, int height)
+Slang::Result WindowedAppBase::initializeBase(
+ const char* title,
+ int width,
+ int height,
+ DeviceType deviceType)
{
// Create a window for our application to render into.
//
@@ -30,7 +34,7 @@ Slang::Result WindowedAppBase::initializeBase(const char* title, int width, int
gfxEnableDebugLayer();
#endif
IDevice::Desc deviceDesc = {};
- // deviceDesc.slang.targetFlags = SLANG_TARGET_FLAG_DUMP_IR;
+ deviceDesc.deviceType = deviceType;
gfx::Result res = gfxCreateDevice(&deviceDesc, gDevice.writeRef());
if (SLANG_FAILED(res))
return res;