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

APPLE: Prevent mipmapping of 1x1 textures. #2264

Closed

Conversation

creijon
Copy link
Contributor

@creijon creijon commented Feb 10, 2023

Description of Change(s)

In Metal, if a texture has any dimension being a single texel big the mipmapping call generateMipmapsForTexture will fail and throw an exception. So we add a check to the existing one in HgiMetalBlitCmds::GenerateMipMaps() which catches this.

Thanks to @Morteeza for this.

Fixes Issue(s)

  • Exception when mipmapping textures with any dimension being 1.
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-8000

@creijon creijon force-pushed the jon/dev/mipmap_check branch 2 times, most recently from 9f6e682 to 1b92063 Compare March 2, 2023 13:19
@creijon creijon force-pushed the jon/dev/mipmap_check branch 2 times, most recently from 119779a to 7136fb4 Compare April 16, 2023 07:37
@creijon creijon force-pushed the jon/dev/mipmap_check branch 2 times, most recently from b00efec to 7acb0b4 Compare May 13, 2023 05:44
pixar-oss pushed a commit that referenced this pull request Jun 21, 2023
In Metal, if a texture has all dimensions being a single texel big the mipmapping call `generateMipmapsForTexture` will fail and throw an exception.  So we add a check to the existing one in `HgiMetalBlitCmds::GenerateMipMaps()` which catches this.

Thanks to @Morteeza for this.

Contribution: Apple

Fixes #2264

(Internal change: 2281900)
@sunyab
Copy link
Contributor

sunyab commented Jun 21, 2023

This PR was merged into the dev branch in c6e09a4.

@sunyab sunyab closed this Jun 21, 2023
@creijon creijon deleted the jon/dev/mipmap_check branch March 13, 2024 07:55
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