How do I bind an output buffer in Vulkan?

I need to get this done for a school thing. So I’ve been trying for a while and I can’t find anything helpful.
So I want to load some particles into a buffer, have a compute shader process them, then get them back into my particle array on the CPU. I think the CPU to GPU and processing is working fine,
but I just can’t get memory barriers to work.

What I’m doing is
shader:

#version 450
layout (local_size_x = 256) in;

struct Particle {
	vec2 pos;
	vec2 velocity;
	float mass;
};

layout(binding = 0, set = 0) readonly buffer InputBuffer {
	Particle particles[];
} inputData;

layout(binding = 1, set = 0) writeonly buffer OutputBuffer {
	Particle particles[];
} outputData;

layout( push_constant ) uniform Config {
    uint particle_count;
	float delta_time;
} opData;


void main() 
{
	//grab global ID
	uint gID = gl_GlobalInvocationID.x;
    //make sure we don't access past the buffer size
    if(gID < opData.particle_count)
    {
		Particle temp = inputData.particles[gID];
		temp.pos.y += opData.delta_time;
		outputData.particles[gID] = temp;
    }
}

CPU code:

{
    void* particle_data;
    vmaMapMemory(engine->_allocator, get_current_frame()._input_buffer.allocation, &particle_data);

    Particle* _input = (Particle*)particle_data;

    for (uint32_t i = 0; i < particle_count; i++)
    {
        _input[i] = *particles[i];
    }

    vmaUnmapMemory(engine->_allocator, get_current_frame()._input_buffer.allocation);
}

_physics_io_descriptors = fluid_allocator.allocate(engine->_device, _physics_io_descriptor_layout);
{
    DescriptorWriter writer;
    writer.write_buffer(0, get_current_frame()._input_buffer.buffer, sizeof(Particle) * particle_count, 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER);
    writer.update_set(engine->_device, _physics_io_descriptors);
}

VkBufferMemoryBarrier outbar{};
outbar.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
outbar.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
outbar.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
outbar.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
outbar.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
outbar.buffer = get_current_frame()._output_buffer.buffer;
outbar.offset = 0;
outbar.size = sizeof(Particle) * PARTICLE_NUM;

vkCmdBindPipeline(get_current_frame()._mainCommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, _physics_pipeline);

vkCmdBindDescriptorSets(get_current_frame()._mainCommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, _physics_pipeline_layout, 0, 1, &_physics_io_descriptors, 0, nullptr);
//vkCmdBindDescriptorSets(get_current_frame()._mainCommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, _physics_pipeline_layout, 0, 1, &_physics_output_descriptors, 0, nullptr);

vkCmdPushConstants(get_current_frame()._mainCommandBuffer, _physics_pipeline_layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(Config), &config_data);

int groupcount = ((particle_count + 255) >> 8);

vkCmdDispatch(get_current_frame()._mainCommandBuffer, groupcount, 1, 1);

vkCmdPipelineBarrier(get_current_frame()._mainCommandBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_HOST_BIT, VK_DEPENDENCY_DEVICE_GROUP_BIT, 0, nullptr, 1, &outbar, 0, nullptr);

VK_CHECK(vkEndCommandBuffer(cmd));

VkSubmitInfo submit{};
submit.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit.commandBufferCount = 1;
submit.pCommandBuffers = &get_current_frame()._mainCommandBuffer;

VK_CHECK(vkQueueSubmit(engine->_computeQueue, 1, &submit, get_current_frame()._computeFence));

vkWaitForFences(engine->_device, 1, &get_current_frame()._computeFence, VK_TRUE, 1000000000);


{
    void* particle_data;
    vmaMapMemory(engine->_allocator, get_current_frame()._output_buffer.allocation, &particle_data);

    Particle* _output = (Particle*)particle_data;

    for (uint32_t i = 0; i < particle_count; i++)
    {
        *particles[i] = _output[i];
    }

    vmaUnmapMemory(engine->_allocator, get_current_frame()._output_buffer.allocation);
}

Let me know if you need anything else.
Thank you so much to anyone who answers this.