diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /third_party/rust/wgpu-hal/src/metal | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/wgpu-hal/src/metal')
-rw-r--r-- | third_party/rust/wgpu-hal/src/metal/adapter.rs | 16 | ||||
-rw-r--r-- | third_party/rust/wgpu-hal/src/metal/mod.rs | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/third_party/rust/wgpu-hal/src/metal/adapter.rs b/third_party/rust/wgpu-hal/src/metal/adapter.rs index a946ce5819..9ec777b0f0 100644 --- a/third_party/rust/wgpu-hal/src/metal/adapter.rs +++ b/third_party/rust/wgpu-hal/src/metal/adapter.rs @@ -731,6 +731,12 @@ impl super::PrivateCapabilities { } else { 4 }, + // Per https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf + max_color_attachment_bytes_per_sample: if device.supports_family(MTLGPUFamily::Apple4) { + 64 + } else { + 32 + }, max_varying_components: if device .supports_feature_set(MTLFeatureSet::macOS_GPUFamily1_v1) { @@ -833,7 +839,7 @@ impl super::PrivateCapabilities { self.indirect_draw_dispatch, ); features.set( - F::TIMESTAMP_QUERY, + F::TIMESTAMP_QUERY | F::TIMESTAMP_QUERY_INSIDE_ENCODERS, self.timestamp_query_support .contains(TimestampQuerySupport::STAGE_BOUNDARIES), ); @@ -872,6 +878,10 @@ impl super::PrivateCapabilities { { features.insert(F::STORAGE_RESOURCE_BINDING_ARRAY); } + features.set( + F::SHADER_INT64, + self.msl_version >= MTLLanguageVersion::V2_3, + ); features.set( F::ADDRESS_MODE_CLAMP_TO_BORDER, @@ -940,6 +950,10 @@ impl super::PrivateCapabilities { min_uniform_buffer_offset_alignment: self.buffer_alignment as u32, min_storage_buffer_offset_alignment: self.buffer_alignment as u32, max_inter_stage_shader_components: self.max_varying_components, + max_color_attachments: (self.max_color_render_targets as u32) + .min(crate::MAX_COLOR_ATTACHMENTS as u32), + max_color_attachment_bytes_per_sample: self.max_color_attachment_bytes_per_sample + as u32, max_compute_workgroup_storage_size: self.max_total_threadgroup_memory, max_compute_invocations_per_workgroup: self.max_threads_per_group, max_compute_workgroup_size_x: self.max_threads_per_group, diff --git a/third_party/rust/wgpu-hal/src/metal/mod.rs b/third_party/rust/wgpu-hal/src/metal/mod.rs index 298f60faac..62fbf3d49d 100644 --- a/third_party/rust/wgpu-hal/src/metal/mod.rs +++ b/third_party/rust/wgpu-hal/src/metal/mod.rs @@ -248,6 +248,7 @@ struct PrivateCapabilities { max_texture_layers: u64, max_fragment_input_components: u64, max_color_render_targets: u8, + max_color_attachment_bytes_per_sample: u8, max_varying_components: u32, max_threads_per_group: u32, max_total_threadgroup_memory: u32, |