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

MSL: Fixes for constexpr sampler use with argument buffers. #2339

Merged
merged 1 commit into from
Jun 17, 2024
Merged

MSL: Fixes for constexpr sampler use with argument buffers. #2339

merged 1 commit into from
Jun 17, 2024

Conversation

billhollings
Copy link
Contributor

@billhollings billhollings commented Jun 10, 2024

Constexpr samplers are defined as local variables, but were treated as held within an argument buffer.

  • CompilerMSL::to_sampler_expression() support constexpr samplers when using argument buffers, plus refactor to minimize generating expression text that may not be used.

  • Handle padding around multi-plane images that require multiple textures. Only check for padding on the first plane, but include plane count in total argument buffer slots consumed.

I experimented with a unit test, but couldn't figure out how to add the ability to define a constexpr sampler into the API in a straightforward manner.

Constexpr samplers are defined as local variables,
but were treated as held within an argument buffer.

- CompilerMSL::to_sampler_expression() support constexpr samplers
  when using argument buffers, plus refactor to minimize generating
  expression text that may not be used.

- Handle padding around multi-plane images that require multiple textures.
  Only check for padding on the first plane, but include plane count in
  total argument buffer slots consumed.
@billhollings billhollings changed the title MSL: Fix for constexpr sampler use with argument buffers. MSL: Fixes for constexpr sampler use with argument buffers. Jun 11, 2024
Copy link
Contributor

@HansKristian-Work HansKristian-Work left a comment

Choose a reason for hiding this comment

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

LGTM

@HansKristian-Work HansKristian-Work merged commit e818cfd into KhronosGroup:main Jun 17, 2024
6 checks passed
@billhollings billhollings deleted the constexp-samp-arg-buff branch June 18, 2024 15:46
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