mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
working on Vulkan descriptor sets
This commit is contained in:
@@ -60,7 +60,7 @@ int main(void)
|
||||
CHECK_PULSE_HANDLE_RETVAL(pass, 1);
|
||||
PulseBindStorageBuffers(pass, 0, &buffer, 1);
|
||||
PulseBindComputePipeline(pass, pipeline);
|
||||
PulseDispatchComputations(pass, 8, 8, 8);
|
||||
PulseDispatchComputations(pass, 32, 32, 1);
|
||||
PulseEndComputePass(pass);
|
||||
|
||||
if(!PulseSubmitCommandList(device, cmd, fence))
|
||||
@@ -70,9 +70,10 @@ int main(void)
|
||||
|
||||
PulseReleaseCommandList(device, cmd);
|
||||
PulseDestroyFence(device, fence);
|
||||
PulseDestroyBuffer(device, buffer);
|
||||
PulseDestroyComputePipeline(device, pipeline);
|
||||
|
||||
PulseDestroyBuffer(device, buffer);
|
||||
|
||||
PulseDestroyDevice(device);
|
||||
PulseUnloadBackend(backend);
|
||||
puts("Successfully loaded Pulse using Vulkan !");
|
||||
|
||||
@@ -3,11 +3,23 @@ module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[layout(std430)]
|
||||
struct SSBO
|
||||
{
|
||||
data: dyn_array[i32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[set(0), binding(0)] ssbo: storage[SSBO],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(8, 8, 8)]
|
||||
[workgroup(32, 32, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
ssbo.data[input.indices.x * input.indices.y] = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user