Changed global and local compute work group sizes (Fixes #251)
This commit is contained in:
parent
87e314947e
commit
8a22dd4c68
3 changed files with 2 additions and 2 deletions
|
|
@ -204,7 +204,7 @@ public:
|
||||||
vkCmdBindDescriptorSets(compute.commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, compute.pipelineLayout, 0, 1, &compute.descriptorSet, 0, 0);
|
vkCmdBindDescriptorSets(compute.commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, compute.pipelineLayout, 0, 1, &compute.descriptorSet, 0, 0);
|
||||||
|
|
||||||
// Dispatch the compute job
|
// Dispatch the compute job
|
||||||
vkCmdDispatch(compute.commandBuffer, PARTICLE_COUNT / 16, 1, 1);
|
vkCmdDispatch(compute.commandBuffer, PARTICLE_COUNT / 256, 1, 1);
|
||||||
|
|
||||||
// Add memory barrier to ensure that compute shader has finished writing to the buffer
|
// Add memory barrier to ensure that compute shader has finished writing to the buffer
|
||||||
// Without this the (rendering) vertex shader may display incomplete results (partial data from last frame)
|
// Without this the (rendering) vertex shader may display incomplete results (partial data from last frame)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ layout(std140, binding = 0) buffer Pos
|
||||||
Particle particles[ ];
|
Particle particles[ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
layout (local_size_x = 16, local_size_y = 16) in;
|
layout (local_size_x = 256) in;
|
||||||
|
|
||||||
layout (binding = 1) uniform UBO
|
layout (binding = 1) uniform UBO
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue