Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Vulkan barriers not working as expected.

$
0
0

Hi, 

I have a stream compaction algorithm based on a few compute shaders using a prefix sum. First, a number of scan passes, then a number of add passes and then the compaction.

It seems that something goes wrong during the add passes, like the buffer barriers aren't working between them… Am I missing something? Do I need a different type of barrier?

Scan Shader:

#version 450
#extension GL_KHR_shader_subgroup_arithmetic : enable

layout(std430, set = 0, binding = 0) buffer Input
{
    uvec4 dataInput[];
};

layout(std430, set = 0, binding = 1) buffer Output
{
    uvec4 dataOutput[];
};

layout (local_size_x = 256) in;
const int sumSubGroupSize = 64 …

Viewing all articles
Browse latest Browse all 17625

Trending Articles