Skip to content

Commit 7121e8b

Browse files
author
kevyuu
committed
Fix example 05
1 parent c06b97e commit 7121e8b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

05_StreamingAndBufferDeviceAddressApp/app_resources/shader.comp.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ template<typename capability_traits=nbl::hlsl::jit::device_capabilities_traits>
1010
void dummyTraitTest() {}
1111

1212
[numthreads(WorkgroupSize,1,1)]
13+
[shader("compute")]
1314
void main(uint32_t3 ID : SV_DispatchThreadID)
1415
{
1516
dummyTraitTest();

05_StreamingAndBufferDeviceAddressApp/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ class StreamingAndBufferDeviceAddressApp final : public application_templates::M
102102
return logFail("Could not load shader!");
103103

104104
// lets go straight from ICPUSpecializedShader to IGPUSpecializedShader
105-
shader = IAsset::castDown<IShader>(assets[0]);
105+
const auto shaderSource = IAsset::castDown<IShader>(assets[0]);
106+
shader = m_device->compileShader({shaderSource.get()});
106107
// The down-cast should not fail!
107108
assert(shader);
108109
}

0 commit comments

Comments
 (0)