Skip to content

Add query_size_lod and query_size methods to SampledImage #281

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

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

LegNeato
Copy link
Collaborator

@LegNeato LegNeato commented Jun 12, 2025

  • Add query_size_lod for non-multisampled sampled images (Sampled=1)
  • Add query_size for multisampled sampled images
  • Add missing HasQuerySize trait implementations for Sampled::Yes
  • Add compiletests for both methods

Fixes #190

- Add query_size_lod for non-multisampled sampled images (Sampled=1)
- Add query_size for multisampled sampled images
- Add missing HasQuerySize trait implementations for Sampled::Yes
- Add tests for both methods
@LegNeato
Copy link
Collaborator Author

I used this in a shader and it worked.

Without this cubemaps were broken...we were returning UVec3 but spirv
validation required UVec2.
@LegNeato
Copy link
Collaborator Author

This was broken for cubemaps, pushed a new commit.

Copy link
Member

@Firestar99 Firestar99 left a comment

Choose a reason for hiding this comment

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

Code looks fine, didn't check the new impl against spec, I'll just assume compiletests would have caught it.

You're missing compiletest for 1D+arrayed, 3d arrayed and buffer images. (And rect images but those are illegal in vulkan iirc, so who cares)

@LegNeato LegNeato enabled auto-merge June 12, 2025 12:33
@LegNeato LegNeato added this pull request to the merge queue Jun 12, 2025
auto-merge was automatically disabled June 12, 2025 12:52

Pull Request is not mergeable

Merged via the queue into Rust-GPU:main with commit 4f3096a Jun 12, 2025
@LegNeato LegNeato deleted the issue190 branch June 12, 2025 13:03
@Firestar99
Copy link
Member

@LegNeato how did this merge into main if the run failed?
https://github.com/Rust-GPU/rust-gpu/actions/runs/15610911293

@LegNeato
Copy link
Collaborator Author

@Firestar99 No clue! I think it is a github bug because it also seemed to have dropped my updated amended commit that fixed the CI?

@Firestar99 Firestar99 mentioned this pull request Jun 12, 2025
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.

Combined image sampler texture size
2 participants