Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Image units: initial support #1691

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sapphire-arches
Copy link
Contributor

Adds initial support for image units. Using this support requires either ARB_shader_image_load_store, or the a context conforming to at least the 4.2 core profile. I basically hacked this together to support something that I needed but figured it might be worth upstreaming. The code is not in any way exhaustively tested. Any and all comments are appreciated.

Adds initial support for image units. Using this support requires either
ARB_shader_image_load_store, or the a context conforming to at least the
4.2 core profile.
@sapphire-arches
Copy link
Contributor Author

A friend of mine was trying to use this branch and ran into a few traps that I'll note in case someone else wants to use this patch.

  • All image units are configured to try and sample as R32I by default, rather than the format of the texture. Use set_format on the image unit to work around this
  • You need to explicitly call memory_barrier when doing things that require memory barriers (texture readback, multipass, etc.) There doesn't seem to be an easy way to do this automatically without being ultraconservative and thus sacrificing efficiency unnecessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant