mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-23 07:15:31 +00:00
Implement conflict_key for immutable buffer
This commit is contained in:
parent
1818ac5bc7
commit
d5a14a2e3c
@ -345,6 +345,11 @@ unsafe impl<T: ?Sized, A> BufferAccess for ImmutableBuffer<T, A> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn conflict_key(&self, self_offset: usize, self_size: usize) -> u64 {
|
||||
self.inner.key()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn try_gpu_lock(&self, exclusive_access: bool, queue: &Queue) -> bool {
|
||||
if exclusive_access {
|
||||
@ -387,6 +392,11 @@ unsafe impl<T: ?Sized, A> BufferAccess for ImmutableBufferInitialization<T, A> {
|
||||
self.buffer.inner()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn conflict_key(&self, self_offset: usize, self_size: usize) -> u64 {
|
||||
self.buffer.inner.key()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn try_gpu_lock(&self, exclusive_access: bool, queue: &Queue) -> bool {
|
||||
!self.used.compare_and_swap(false, true, Ordering::Relaxed)
|
||||
|
Loading…
Reference in New Issue
Block a user