Skip to content

add Metal support for MULTISAMPLE_ARRAY#9300

Open
39ali wants to merge 2 commits intogfx-rs:trunkfrom
39ali:metal-multisample-array
Open

add Metal support for MULTISAMPLE_ARRAY#9300
39ali wants to merge 2 commits intogfx-rs:trunkfrom
39ali:metal-multisample-array

Conversation

@39ali
Copy link
Copy Markdown
Contributor

@39ali 39ali commented Mar 25, 2026

Connections
#8593

Description
add Metal support for MULTISAMPLE_ARRAY

Testing
no tests where added

Squash or Rebase?

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

Copy link
Copy Markdown
Collaborator

@inner-daemons inner-daemons left a comment

Choose a reason for hiding this comment

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

2 nits, generally looks good

Copy link
Copy Markdown
Collaborator

@inner-daemons inner-daemons left a comment

Choose a reason for hiding this comment

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

This would also need a changelog entry just FYI.

But I actually have bigger concerns, which is that I have absolutely zero clue where you got the requirements from. Ctrl+f looking for "multisample` only pops up 3 items in the feature set tables, and the only non-footnote item is "Layered rendering to multisample textures", which seems related but also the limits there don't match what you did at all.

The fact that you referenced "Mac Family 1" also does not inspire confidence because that has been scrubbed for a while now from the tables.

If you can share a link to the archive.org page you were referencing that would be ideal (assuming you were actually looking at such a page).

// Multisample 2D Array textures are supported on:
// - Apple Family 3 and higher (A10 chips/iPhone 7 and newer)
// - Mac Family 1 and higher (All Intel/AMD/Apple Silicon Macs)
if available!(macos = 10.14, ios = 14.0, tvos = 16.0, visionos = 1.0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should also require family_check or supportsFamily will crash.

Comment on lines +1088 to +1090
// Multisample 2D Array textures are supported on:
// - Apple Family 3 and higher (A10 chips/iPhone 7 and newer)
// - Mac Family 1 and higher (All Intel/AMD/Apple Silicon Macs)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not seeing anything in the metal feature set tables about multisample 2D array textures. What is the exact feature called?

Also, the metal feature set tables have scrubbed all references of "Mac Family 1" a while ago, so are you looking at some older version of this on the internet archive?

@inner-daemons
Copy link
Copy Markdown
Collaborator

Just to be more transparent, my big concern here is that you vibecoded this PR and never bothered to check the references your LLM provided. I hope that's not true though and you can provide the document used.

@39ali
Copy link
Copy Markdown
Contributor Author

39ali commented Mar 27, 2026

@inner-daemons i actually hit the same issue when i was looking at the minimum req for this since there's no specific place that connects multisample to gpu family , so i had to do a bit of connecting by myself, so i looked at https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf : Metal 2 and later support 2D multisampled texture array
then i looked at https://gist.github.com/schwa/3893c225133fd93ae869492ff8fa1610 to connect the metal version to the gpu family, i might be wrong and i'm happy to fix whatever is the issue if

@39ali
Copy link
Copy Markdown
Contributor Author

39ali commented Mar 27, 2026

@inner-daemons i looked at MoltenVK since they do also have to target it, it looks like they just support it across the board if it's not TVOS ,https://github.com/KhronosGroup/MoltenVK/blob/c0d41c221b3903519c83753e559452d9a81ee286/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm#L2463

we could do the same as well

@inner-daemons
Copy link
Copy Markdown
Collaborator

@39ali What was the reasoning for this comment?

                // According to Metal Feature Set Tables:

I don't think that the feature set tables are relevant here?

And yes i will check on the sources you linked.

@39ali
Copy link
Copy Markdown
Contributor Author

39ali commented Mar 28, 2026

@inner-daemons the gist references it, but i do agree it's a bit confusing, i'll fix it according to what we decide to do

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.

3 participants