Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Add glsl barrier function #1793

Merged
merged 2 commits into from
Mar 28, 2022
Merged

Add glsl barrier function #1793

merged 2 commits into from
Mar 28, 2022

Conversation

fintelia
Copy link
Contributor

This attempts to implement the GLSL barrier function based some of the surrounding builtin implementations. However, it panics later when emitting expressions, so it evidentially isn't correct yet.

Fixes #1771

@JCapucho
Copy link
Collaborator

Can you show an example that panics? I've tried to reproduce it on your branch with a very simple compute shader

#version 460 core

void main() {
    barrier();
}

But that works

@fintelia
Copy link
Contributor Author

Two barriers in a row seems to be enough to cause a panic:

#version 460 core

void main() {
    barrier();
    barrier();
}

@fintelia fintelia marked this pull request as ready for review March 27, 2022 21:44
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to test it as well

@kvark kvark merged commit 26537c1 into gfx-rs:master Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[glsl-in] Unknown function 'barrier'
3 participants