Skip to content

Commit 177c5dc

Browse files
committed
Added glsl shader test
1 parent ad454c4 commit 177c5dc

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma wave shader_stage(compute)
2+
3+
layout(local_size_x = 16, local_size_y = 1, local_size_z = 1) in;
4+
5+
layout(constant_id = 0) uint32_t SPEC_CONSTANT_VALUE = 10;
6+
layout(binding = 0, set = 0) buffer OutputBuff
7+
{
8+
int data[];
9+
}
10+
11+
[numthreads(WorkgroupSize, 1, 1)]
12+
void main(uint32_t3 ID : SV_DispatchThreadID)
13+
{
14+
uint index = gl_GlobalInvocationID.x;
15+
data[index] = SPEC_CONSTANT_VALUE;
16+
}

03_DeviceSelectionAndSharedSources/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
183183
}
184184

185185
// Nabla hardcodes the maximum descriptor set count to 4
186-
constexpr uint32_t MaxDescriptorSets = 4;
186+
constexpr uint32_t MaxDescriptorSets = ICPUPipelineLayout::DESCRIPTOR_SET_COUNT;
187187
const std::array<IGPUDescriptorSetLayout*, MaxDescriptorSets> dscLayoutPtrs = { nullptr, dsLayout1.get(), nullptr, dsLayout3.get() };
188188
std::array<smart_refctd_ptr<IGPUDescriptorSet>, MaxDescriptorSets> ds;
189189
auto pool = m_device->createDescriptorPoolForDSLayouts(IDescriptorPool::ECF_NONE, std::span(dscLayoutPtrs.begin(), dscLayoutPtrs.end()));

0 commit comments

Comments
 (0)