* updated firefox (133.0.3 -> 134.0.2)
[t2sde.git] / package / www / firefox / hotfix-wgpu-atomicu64.patch
bloba551a13a7dc214e0b63437e70c1ef0a01014d2ce
1 # --- T2-COPYRIGHT-BEGIN ---
2 # t2/package/*/firefox/hotfix-wgpu-atomicu64.patch
3 # Copyright (C) 2024 - 2025 The T2 SDE Project
4 # SPDX-License-Identifier: GPL-2.0 or patched project license
5 # --- T2-COPYRIGHT-END ---
7 --- firefox-134.0.2/third_party/rust/wgpu-core/src/device/resource.rs.vanilla 2025-01-31 11:24:53.200939943 +0100
8 +++ firefox-134.0.2/third_party/rust/wgpu-core/src/device/resource.rs 2025-01-31 11:24:58.516939731 +0100
9 @@ -46,7 +46,7 @@
10 mem::{self, ManuallyDrop},
11 num::NonZeroU32,
12 sync::{
13 - atomic::{AtomicBool, AtomicU64, Ordering},
14 + atomic::{AtomicBool, AtomicUsize, Ordering},
15 Arc, OnceLock, Weak,
18 @@ -280,8 +280,8 @@
19 zero_buffer: ManuallyDrop::new(zero_buffer),
20 label: desc.label.to_string(),
21 command_allocator,
22 - active_submission_index: AtomicU64::new(0),
23 - last_successful_submission_index: AtomicU64::new(0),
24 + active_submission_index: AtomicUsize::new(0),
25 + last_successful_submission_index: AtomicUsize::new(0),
26 fence: RwLock::new(rank::DEVICE_FENCE, ManuallyDrop::new(fence)),
27 snatchable_lock: unsafe { SnatchLock::new(rank::DEVICE_SNATCHABLE_LOCK) },
28 valid: AtomicBool::new(true),
29 --- firefox-130.0/third_party/rust/wgpu-hal/src/lib.rs.orig 2024-09-03 13:18:29.730010017 +0200
30 +++ firefox-130.0/third_party/rust/wgpu-hal/src/lib.rs 2024-09-03 13:30:13.876693816 +0200
31 @@ -293,8 +293,8 @@
33 pub type Label<'a> = Option<&'a str>;
34 pub type MemoryRange = Range<wgt::BufferAddress>;
35 -pub type FenceValue = u64;
36 -pub type AtomicFenceValue = std::sync::atomic::AtomicU64;
37 +pub type FenceValue = usize;
38 +pub type AtomicFenceValue = std::sync::atomic::AtomicUsize;
40 /// Drop guard to signal wgpu-hal is no longer using an externally created object.
41 pub type DropGuard = Box<dyn std::any::Any + Send + Sync>;
42 --- firefox-124.0/gfx/wgpu_bindings/src/server.rs.vanilla 2024-03-19 10:40:03.807887783 +0100
43 +++ firefox-124.0/gfx/wgpu_bindings/src/server.rs 2024-03-19 10:41:47.314882569 +0100
44 @@ -1128,7 +1128,7 @@
45 command_buffer_ids: *const id::CommandBufferId,
46 command_buffer_id_length: usize,
47 mut error_buf: ErrorBuffer,
48 -) -> u64 {
49 +) -> usize {
50 let command_buffers = slice::from_raw_parts(command_buffer_ids, command_buffer_id_length);
51 let result = gfx_select!(self_id => global.queue_submit(self_id, command_buffers));
53 --- firefox-128.0/third_party/rust/ash/src/extensions/khr/timeline_semaphore.rs.vanilla 2024-07-09 14:28:32.931405214 +0200
54 +++ firefox-128.0/third_party/rust/ash/src/extensions/khr/timeline_semaphore.rs 2024-07-09 14:29:05.602402066 +0200
55 @@ -7,7 +7,7 @@
56 impl crate::khr::timeline_semaphore::Device {
57 /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSemaphoreCounterValue.html>
58 #[inline]
59 - pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult<u64> {
60 + pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult<usize> {
61 let mut value = mem::MaybeUninit::uninit();
62 (self.fp.get_semaphore_counter_value_khr)(self.handle, semaphore, value.as_mut_ptr())
63 .assume_init_on_success(value)
64 --- firefox-128.0/third_party/rust/ash/src/vk/definitions.rs.vanilla 2024-07-09 14:31:17.061389400 +0200
65 +++ firefox-128.0/third_party/rust/ash/src/vk/definitions.rs 2024-07-09 14:34:06.172373105 +0200
66 @@ -12913,9 +12913,9 @@
67 pub s_type: StructureType,
68 pub p_next: *const c_void,
69 pub wait_semaphore_values_count: u32,
70 - pub p_wait_semaphore_values: *const u64,
71 + pub p_wait_semaphore_values: *const usize,
72 pub signal_semaphore_values_count: u32,
73 - pub p_signal_semaphore_values: *const u64,
74 + pub p_signal_semaphore_values: *const usize,
75 pub _marker: PhantomData<&'a ()>,
77 unsafe impl Send for D3D12FenceSubmitInfoKHR<'_> {}
78 @@ -12940,13 +12940,13 @@
79 unsafe impl ExtendsSubmitInfo for D3D12FenceSubmitInfoKHR<'_> {}
80 impl<'a> D3D12FenceSubmitInfoKHR<'a> {
81 #[inline]
82 - pub fn wait_semaphore_values(mut self, wait_semaphore_values: &'a [u64]) -> Self {
83 + pub fn wait_semaphore_values(mut self, wait_semaphore_values: &'a [usize]) -> Self {
84 self.wait_semaphore_values_count = wait_semaphore_values.len() as _;
85 self.p_wait_semaphore_values = wait_semaphore_values.as_ptr();
86 self
88 #[inline]
89 - pub fn signal_semaphore_values(mut self, signal_semaphore_values: &'a [u64]) -> Self {
90 + pub fn signal_semaphore_values(mut self, signal_semaphore_values: &'a [usize]) -> Self {
91 self.signal_semaphore_values_count = signal_semaphore_values.len() as _;
92 self.p_signal_semaphore_values = signal_semaphore_values.as_ptr();
93 self
94 @@ -21911,9 +21911,9 @@
95 pub s_type: StructureType,
96 pub p_next: *const c_void,
97 pub wait_semaphore_value_count: u32,
98 - pub p_wait_semaphore_values: *const u64,
99 + pub p_wait_semaphore_values: *const usize,
100 pub signal_semaphore_value_count: u32,
101 - pub p_signal_semaphore_values: *const u64,
102 + pub p_signal_semaphore_values: *const usize,
103 pub _marker: PhantomData<&'a ()>,
105 unsafe impl Send for TimelineSemaphoreSubmitInfo<'_> {}
106 @@ -21939,13 +21939,13 @@
107 unsafe impl ExtendsBindSparseInfo for TimelineSemaphoreSubmitInfo<'_> {}
108 impl<'a> TimelineSemaphoreSubmitInfo<'a> {
109 #[inline]
110 - pub fn wait_semaphore_values(mut self, wait_semaphore_values: &'a [u64]) -> Self {
111 + pub fn wait_semaphore_values(mut self, wait_semaphore_values: &'a [usize]) -> Self {
112 self.wait_semaphore_value_count = wait_semaphore_values.len() as _;
113 self.p_wait_semaphore_values = wait_semaphore_values.as_ptr();
114 self
116 #[inline]
117 - pub fn signal_semaphore_values(mut self, signal_semaphore_values: &'a [u64]) -> Self {
118 + pub fn signal_semaphore_values(mut self, signal_semaphore_values: &'a [usize]) -> Self {
119 self.signal_semaphore_value_count = signal_semaphore_values.len() as _;
120 self.p_signal_semaphore_values = signal_semaphore_values.as_ptr();
121 self
122 --- firefox-128.0/third_party/rust/ash/src/vk/extensions.rs.vanilla 2024-07-09 14:36:01.436361999 +0200
123 +++ firefox-128.0/third_party/rust/ash/src/vk/extensions.rs 2024-07-09 14:37:29.562353508 +0200
124 @@ -5945,7 +5945,7 @@
125 pub type PFN_vkGetSemaphoreCounterValue = unsafe extern "system" fn(
126 device: crate::vk::Device,
127 semaphore: Semaphore,
128 - p_value: *mut u64,
129 + p_value: *mut usize,
130 ) -> Result;
131 #[allow(non_camel_case_types)]
132 pub type PFN_vkWaitSemaphores = unsafe extern "system" fn(
133 --- firefox-128.0/third_party/rust/ash/src/device.rs.vanilla 2024-07-09 14:37:45.857351938 +0200
134 +++ firefox-128.0/third_party/rust/ash/src/device.rs 2024-07-09 14:38:22.375348419 +0200
135 @@ -676,7 +676,7 @@
137 /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSemaphoreCounterValue.html>
138 #[inline]
139 - pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult<u64> {
140 + pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult<usize> {
141 let mut value = mem::MaybeUninit::uninit();
142 (self.device_fn_1_2.get_semaphore_counter_value)(
143 self.handle(),
144 --- firefox-128.0/third_party/rust/ash/src/vk/definitions.rs.vanilla 2024-07-09 15:01:16.235216042 +0200
145 +++ firefox-128.0/third_party/rust/ash/src/vk/definitions.rs 2024-07-09 15:03:26.056203534 +0200
146 @@ -21962,7 +21962,7 @@
147 pub flags: SemaphoreWaitFlags,
148 pub semaphore_count: u32,
149 pub p_semaphores: *const Semaphore,
150 - pub p_values: *const u64,
151 + pub p_values: *const usize,
152 pub _marker: PhantomData<&'a ()>,
154 unsafe impl Send for SemaphoreWaitInfo<'_> {}
155 @@ -21997,7 +21997,7 @@
156 self
158 #[inline]
159 - pub fn values(mut self, values: &'a [u64]) -> Self {
160 + pub fn values(mut self, values: &'a [usize]) -> Self {
161 self.semaphore_count = values.len() as _;
162 self.p_values = values.as_ptr();
163 self
164 --- firefox-128.0/third_party/rust/ash/src/extensions_generated.rs.vanilla 2024-07-09 14:49:16.545285387 +0200
165 +++ firefox-128.0/third_party/rust/ash/src/extensions_generated.rs 2024-07-09 14:52:55.543264286 +0200
166 @@ -14711,7 +14711,7 @@
167 unsafe extern "system" fn get_semaphore_counter_value_khr(
168 _device: crate::vk::Device,
169 _semaphore: Semaphore,
170 - _p_value: *mut u64,
171 + _p_value: *mut usize,
172 ) -> Result {
173 panic!(concat!(
174 "Unable to load ",
175 --- firefox-128.0/third_party/rust/ash/src/tables.rs.vanilla 2024-07-09 14:54:09.300257179 +0200
176 +++ firefox-128.0/third_party/rust/ash/src/tables.rs 2024-07-09 14:54:20.596256091 +0200
177 @@ -3463,7 +3463,7 @@
178 unsafe extern "system" fn get_semaphore_counter_value(
179 _device: crate::vk::Device,
180 _semaphore: Semaphore,
181 - _p_value: *mut u64,
182 + _p_value: *mut usize,
183 ) -> Result {
184 panic!(concat!(
185 "Unable to load ",