Skip to content

Commit

Permalink
set macos default as Rgb10a2Unorm and update docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Apr 3, 2024
1 parent 8ab7a53 commit b22ddf0
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 7 deletions.
4 changes: 4 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ const config = {
require.resolve('./src/css/custom.css'),
],
},
gtag: {
trackingID: 'G-6MKJ1X7CFS',
anonymizeIP: true,
},
}),
],
],
Expand Down
275 changes: 269 additions & 6 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@docusaurus/core": "^3.1.0",
"@docusaurus/plugin-google-gtag": "^3.2.0",
"@docusaurus/preset-classic": "^3.1.0",
"@mdx-js/react": "3.0.0",
"clsx": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sugarloaf/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Context {
let caps = surface.get_capabilities(&adapter);

#[cfg(target_os = "macos")]
let format = wgpu::TextureFormat::Bgra8Unorm;
let format = wgpu::TextureFormat::Rgb10a2Unorm;
#[cfg(not(target_os = "macos"))]
let format = find_best_texture_format(caps.formats);

Expand Down
2 changes: 2 additions & 0 deletions wa/src/native/apple/frameworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ pub enum MTLPixelFormat {
Depth24Unorm_Stencil8 = 255,
Depth32Float_Stencil8 = 260,
RGBA8Unorm = 70,
RGBA10A2Unorm = 75,
RGBA16Float = 115,
}

/// See <https://developer.apple.com/documentation/metal/mtlsamplerminmagfilter>
Expand Down

0 comments on commit b22ddf0

Please sign in to comment.