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

naga: Add support for GLSL signed/unsigned samplers #6513

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

DavidPeicho
Copy link
Contributor

Description

Add support for usampler* and isampler for GLSL input. Example of valid input:

#version 440 core

layout(set = 0, binding = 0) uniform utexture2D tex;
layout(set = 0, binding = 1) uniform sampler samp;

layout(local_size_x = 8, local_size_y = 8) in;
void
main()
{
  vec4 data = vec4(texture(usampler2D(tex, samp), vec2(0.0, 1.0)));
}

Testing

Updated the test samplers.frag.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy.
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@DavidPeicho DavidPeicho requested a review from a team November 10, 2024 17:28
@DavidPeicho DavidPeicho force-pushed the naga/add-other-builtin-samplers branch from 7a4e62e to 64aa659 Compare November 10, 2024 17:29
@teoxoy teoxoy changed the title nada: Add support for GLSL signed/unsigned samplers naga: Add support for GLSL signed/unsigned samplers Nov 12, 2024
naga/src/front/glsl/builtins.rs Outdated Show resolved Hide resolved
@DavidPeicho DavidPeicho force-pushed the naga/add-other-builtin-samplers branch from 58536b7 to bf46e5f Compare November 13, 2024 19:06
@DavidPeicho DavidPeicho requested a review from teoxoy November 13, 2024 19:21
@DavidPeicho DavidPeicho force-pushed the naga/add-other-builtin-samplers branch from bf46e5f to 394d3f4 Compare November 15, 2024 10:28
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Thanks!

@teoxoy teoxoy merged commit 3018912 into gfx-rs:trunk Nov 15, 2024
27 checks passed
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.

2 participants