Merge changes from topic "android-vm-audio" into main
* changes:
Enable aaudio backend
UPSTREAM: Implement virtio-snd aaudio stream to support audio in android
diff --git a/devices/src/virtio/vhost/user/device/wl.rs b/devices/src/virtio/vhost/user/device/wl.rs
index 0d3cf9b..e5c3414 100644
--- a/devices/src/virtio/vhost/user/device/wl.rs
+++ b/devices/src/virtio/vhost/user/device/wl.rs
@@ -28,6 +28,8 @@
use hypervisor::ProtectionType;
#[cfg(feature = "minigbm")]
use rutabaga_gfx::RutabagaGralloc;
+#[cfg(feature = "minigbm")]
+use rutabaga_gfx::RutabagaGrallocBackendFlags;
use vm_memory::GuestMemory;
use vmm_vhost::message::VhostUserProtocolFeatures;
use vmm_vhost::VHOST_USER_F_PROTOCOL_FEATURES;
@@ -234,7 +236,8 @@
} = self;
#[cfg(feature = "minigbm")]
- let gralloc = RutabagaGralloc::new().context("Failed to initailize gralloc")?;
+ let gralloc = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new())
+ .context("Failed to initailize gralloc")?;
let wlstate = match &self.wlstate {
None => {
let mapper = {
diff --git a/devices/src/virtio/wl.rs b/devices/src/virtio/wl.rs
index 8f1e0d4..10e4dd3 100644
--- a/devices/src/virtio/wl.rs
+++ b/devices/src/virtio/wl.rs
@@ -116,6 +116,8 @@
#[cfg(feature = "minigbm")]
use rutabaga_gfx::RutabagaGralloc;
#[cfg(feature = "minigbm")]
+use rutabaga_gfx::RutabagaGrallocBackendFlags;
+#[cfg(feature = "minigbm")]
use rutabaga_gfx::RutabagaGrallocFlags;
#[cfg(feature = "minigbm")]
use rutabaga_gfx::RutabagaIntoRawDescriptor;
@@ -2009,7 +2011,7 @@
fn on_device_sandboxed(&mut self) {
// Gralloc initialization can cause some GPU drivers to create their own threads
// and that must be done after sandboxing.
- match RutabagaGralloc::new() {
+ match RutabagaGralloc::new(RutabagaGrallocBackendFlags::new()) {
Ok(g) => self.gralloc = Some(g),
Err(e) => {
error!("failed to initialize gralloc {:?}", e);
diff --git a/rutabaga_gfx/Android.bp b/rutabaga_gfx/Android.bp
index b355aa2..6c37c03 100644
--- a/rutabaga_gfx/Android.bp
+++ b/rutabaga_gfx/Android.bp
@@ -49,6 +49,12 @@
"liblog",
],
},
+ host: {
+ features: ["vulkano"],
+ rustlibs: [
+ "libvulkano",
+ ],
+ },
},
static_libs: [
"libepoxy",
@@ -81,10 +87,20 @@
cfgs: [
"gfxstream_unstable",
],
- features: ["gfxstream"],
+ features: [
+ "gfxstream",
+ ],
shared_libs: [
"libgfxstream_backend",
],
+ target: {
+ host: {
+ features: ["vulkano"],
+ rustlibs: [
+ "libvulkano",
+ ],
+ },
+ },
}
rust_test {
diff --git a/rutabaga_gfx/Cargo.toml b/rutabaga_gfx/Cargo.toml
index 3b1f33e..78ae2bc 100644
--- a/rutabaga_gfx/Cargo.toml
+++ b/rutabaga_gfx/Cargo.toml
@@ -26,7 +26,7 @@
log = "0.4"
# To build latest Vulkano, change version to git = "https://github.com/vulkano-rs/vulkano.git"
-# vulkano = { version = "0.31.0", optional = true }
+# vulkano = { version = "0.33.0", optional = true }
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
nix = { version = "0.28", features = ["event", "feature", "fs", "mman", "socket", "uio", "ioctl"] }
diff --git a/rutabaga_gfx/patches/Android.bp.patch b/rutabaga_gfx/patches/Android.bp.patch
index b6e9586..6c55ba9 100644
--- a/rutabaga_gfx/patches/Android.bp.patch
+++ b/rutabaga_gfx/patches/Android.bp.patch
@@ -1,8 +1,8 @@
diff --git a/rutabaga_gfx/Android.bp b/rutabaga_gfx/Android.bp
-index 3384aee72..0c64f2ef2 100644
+index b99e49886..6c37c03da 100644
--- a/rutabaga_gfx/Android.bp
+++ b/rutabaga_gfx/Android.bp
-@@ -22,7 +22,6 @@ rust_library {
+@@ -23,7 +23,6 @@ rust_library {
edition: "2021",
features: [
"gfxstream",
@@ -10,7 +10,7 @@
"virgl_renderer",
],
rustlibs: [
-@@ -34,14 +33,59 @@ rust_library {
+@@ -35,14 +34,75 @@ rust_library {
"libzerocopy",
],
proc_macros: ["libremain"],
@@ -30,6 +30,12 @@
+ "liblog",
+ ],
+ },
++ host: {
++ features: ["vulkano"],
++ rustlibs: [
++ "libvulkano",
++ ],
++ },
+ },
+ static_libs: [
"libepoxy",
@@ -62,16 +68,26 @@
+ cfgs: [
+ "gfxstream_unstable",
+ ],
-+ features: ["gfxstream"],
++ features: [
++ "gfxstream",
++ ],
+ shared_libs: [
+ "libgfxstream_backend",
+ ],
++ target: {
++ host: {
++ features: ["vulkano"],
++ rustlibs: [
++ "libvulkano",
++ ],
++ },
++ },
+}
+
rust_test {
name: "rutabaga_gfx_test_src_lib",
defaults: ["crosvm_inner_defaults"],
-@@ -58,7 +102,6 @@ rust_test {
+@@ -59,7 +119,6 @@ rust_test {
edition: "2021",
features: [
"gfxstream",
@@ -79,7 +95,7 @@
"virgl_renderer",
],
rustlibs: [
-@@ -71,9 +114,12 @@ rust_test {
+@@ -72,9 +131,12 @@ rust_test {
],
proc_macros: ["libremain"],
shared_libs: [
diff --git a/rutabaga_gfx/src/cross_domain/mod.rs b/rutabaga_gfx/src/cross_domain/mod.rs
index 5f6baef..782e501 100644
--- a/rutabaga_gfx/src/cross_domain/mod.rs
+++ b/rutabaga_gfx/src/cross_domain/mod.rs
@@ -41,6 +41,7 @@
use crate::ImageAllocationInfo;
use crate::ImageMemoryRequirements;
use crate::RutabagaGralloc;
+use crate::RutabagaGrallocBackendFlags;
use crate::RutabagaGrallocFlags;
mod cross_domain_protocol;
@@ -469,7 +470,7 @@
channels: Option<Vec<RutabagaChannel>>,
fence_handler: RutabagaFenceHandler,
) -> RutabagaResult<Box<dyn RutabagaComponent>> {
- let gralloc = RutabagaGralloc::new()?;
+ let gralloc = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new())?;
Ok(Box::new(CrossDomain {
channels,
gralloc: Arc::new(Mutex::new(gralloc)),
diff --git a/rutabaga_gfx/src/lib.rs b/rutabaga_gfx/src/lib.rs
index 06c75ae..2ddbc59 100644
--- a/rutabaga_gfx/src/lib.rs
+++ b/rutabaga_gfx/src/lib.rs
@@ -29,6 +29,7 @@
pub use crate::rutabaga_gralloc::ImageAllocationInfo;
pub use crate::rutabaga_gralloc::ImageMemoryRequirements;
pub use crate::rutabaga_gralloc::RutabagaGralloc;
+pub use crate::rutabaga_gralloc::RutabagaGrallocBackendFlags;
pub use crate::rutabaga_gralloc::RutabagaGrallocFlags;
pub use crate::rutabaga_os::AsRawDescriptor;
pub use crate::rutabaga_os::FromRawDescriptor as RutabagaFromRawDescriptor;
diff --git a/rutabaga_gfx/src/rutabaga_gralloc/gralloc.rs b/rutabaga_gfx/src/rutabaga_gralloc/gralloc.rs
index 5002716..1e4d85d 100644
--- a/rutabaga_gfx/src/rutabaga_gralloc/gralloc.rs
+++ b/rutabaga_gfx/src/rutabaga_gralloc/gralloc.rs
@@ -20,6 +20,43 @@
use crate::rutabaga_os::MappedRegion;
use crate::rutabaga_utils::*;
+const RUTABAGA_GRALLOC_BACKEND_SYSTEM: u32 = 1 << 0;
+const RUTABAGA_GRALLOC_BACKEND_GBM: u32 = 1 << 1;
+const RUTABAGA_GRALLOC_BACKEND_VULKANO: u32 = 1 << 2;
+
+/// Usage flags for constructing rutabaga gralloc backend
+#[derive(Copy, Clone, Eq, PartialEq, Default)]
+pub struct RutabagaGrallocBackendFlags(pub u32);
+
+impl RutabagaGrallocBackendFlags {
+ /// Returns new set of flags.
+ #[inline(always)]
+ pub fn new() -> RutabagaGrallocBackendFlags {
+ RutabagaGrallocBackendFlags(
+ RUTABAGA_GRALLOC_BACKEND_SYSTEM
+ | RUTABAGA_GRALLOC_BACKEND_GBM
+ | RUTABAGA_GRALLOC_BACKEND_VULKANO,
+ )
+ }
+
+ #[inline(always)]
+ pub fn disable_vulkano(self) -> RutabagaGrallocBackendFlags {
+ RutabagaGrallocBackendFlags(self.0 & !RUTABAGA_GRALLOC_BACKEND_VULKANO)
+ }
+
+ pub fn uses_system(&self) -> bool {
+ self.0 & RUTABAGA_GRALLOC_BACKEND_SYSTEM != 0
+ }
+
+ pub fn uses_gbm(&self) -> bool {
+ self.0 & RUTABAGA_GRALLOC_BACKEND_GBM != 0
+ }
+
+ pub fn uses_vulkano(&self) -> bool {
+ self.0 & RUTABAGA_GRALLOC_BACKEND_VULKANO != 0
+ }
+}
+
/*
* Rutabaga gralloc flags are copied from minigbm, but redundant legacy flags are left out.
* For example, USE_WRITE / USE_CURSOR_64X64 / USE_CURSOR don't add much value.
@@ -219,14 +256,16 @@
impl RutabagaGralloc {
/// Returns a new RutabagaGralloc instance upon success. All allocation backends that have
/// been built are initialized. The default system allocator is always initialized.
- pub fn new() -> RutabagaResult<RutabagaGralloc> {
+ pub fn new(flags: RutabagaGrallocBackendFlags) -> RutabagaResult<RutabagaGralloc> {
let mut grallocs: Map<GrallocBackend, Box<dyn Gralloc>> = Default::default();
- let system = SystemGralloc::init()?;
- grallocs.insert(GrallocBackend::System, system);
+ if flags.uses_system() {
+ let system = SystemGralloc::init()?;
+ grallocs.insert(GrallocBackend::System, system);
+ }
#[cfg(feature = "minigbm")]
- {
+ if flags.uses_gbm() {
// crosvm integration tests build with the "wl-dmabuf" feature, which translates in
// rutabaga to the "minigbm" feature. These tests run on hosts where a rendernode is
// not present, and minigbm can not be initialized.
@@ -238,7 +277,7 @@
}
#[cfg(feature = "vulkano")]
- {
+ if flags.uses_vulkano() {
match VulkanoGralloc::init() {
Ok(vulkano) => {
grallocs.insert(GrallocBackend::Vulkano, vulkano);
@@ -357,7 +396,7 @@
#[test]
#[cfg_attr(target_os = "windows", ignore)]
fn create_render_target() {
- let gralloc_result = RutabagaGralloc::new();
+ let gralloc_result = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new());
if gralloc_result.is_err() {
return;
}
@@ -386,7 +425,7 @@
#[test]
#[cfg_attr(target_os = "windows", ignore)]
fn create_video_buffer() {
- let gralloc_result = RutabagaGralloc::new();
+ let gralloc_result = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new());
if gralloc_result.is_err() {
return;
}
@@ -424,7 +463,7 @@
#[test]
#[cfg_attr(target_os = "windows", ignore)]
fn export_and_map() {
- let gralloc_result = RutabagaGralloc::new();
+ let gralloc_result = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new());
if gralloc_result.is_err() {
return;
}
diff --git a/rutabaga_gfx/src/rutabaga_gralloc/mod.rs b/rutabaga_gfx/src/rutabaga_gralloc/mod.rs
index a4ea8e5..041cd9c 100644
--- a/rutabaga_gfx/src/rutabaga_gralloc/mod.rs
+++ b/rutabaga_gfx/src/rutabaga_gralloc/mod.rs
@@ -19,4 +19,5 @@
pub use gralloc::ImageAllocationInfo;
pub use gralloc::ImageMemoryRequirements;
pub use gralloc::RutabagaGralloc;
+pub use gralloc::RutabagaGrallocBackendFlags;
pub use gralloc::RutabagaGrallocFlags;
diff --git a/rutabaga_gfx/src/rutabaga_gralloc/vulkano_gralloc.rs b/rutabaga_gfx/src/rutabaga_gralloc/vulkano_gralloc.rs
index 5ed01e1..cfcb615 100644
--- a/rutabaga_gfx/src/rutabaga_gralloc/vulkano_gralloc.rs
+++ b/rutabaga_gfx/src/rutabaga_gralloc/vulkano_gralloc.rs
@@ -21,9 +21,10 @@
use vulkano::device::DeviceCreateInfo;
use vulkano::device::DeviceCreationError;
use vulkano::device::QueueCreateInfo;
+use vulkano::device::QueueFlags;
use vulkano::image;
-use vulkano::image::ImageCreationError;
use vulkano::image::ImageDimensions;
+use vulkano::image::ImageError;
use vulkano::image::ImageUsage;
use vulkano::image::SampleCount;
use vulkano::instance::Instance;
@@ -31,7 +32,6 @@
use vulkano::instance::InstanceCreationError;
use vulkano::instance::InstanceExtensions;
use vulkano::instance::Version;
-use vulkano::memory::pool::AllocFromRequirementsFilter;
use vulkano::memory::DedicatedAllocation;
use vulkano::memory::DeviceMemory;
use vulkano::memory::DeviceMemoryError;
@@ -40,6 +40,7 @@
use vulkano::memory::MappedDeviceMemory;
use vulkano::memory::MemoryAllocateInfo;
use vulkano::memory::MemoryMapError;
+use vulkano::memory::MemoryPropertyFlags;
use vulkano::memory::MemoryRequirements;
use vulkano::memory::MemoryType;
use vulkano::sync::Sharing;
@@ -53,6 +54,14 @@
use crate::rutabaga_os::MappedRegion;
use crate::rutabaga_utils::*;
+/// A convenience enum for allocation
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum AllocFromRequirementsFilter {
+ Preferred,
+ Allowed,
+ Forbidden,
+}
+
/// A gralloc implementation capable of allocation `VkDeviceMemory`.
pub struct VulkanoGralloc {
devices: Map<PhysicalDeviceType, Arc<Device>>,
@@ -135,7 +144,7 @@
for physical in instance.enumerate_physical_devices()? {
let queue_family_index = match physical.queue_family_properties().iter().position(|q| {
// We take the first queue family that supports graphics.
- q.queue_flags.graphics
+ q.queue_flags.intersects(QueueFlags::GRAPHICS)
}) {
Some(family) => family,
None => {
@@ -201,7 +210,7 @@
unsafe fn create_image(
&mut self,
info: ImageAllocationInfo,
- ) -> RutabagaResult<(Arc<image::sys::UnsafeImage>, MemoryRequirements)> {
+ ) -> RutabagaResult<(Arc<image::sys::RawImage>, MemoryRequirements)> {
let device = if self.has_integrated_gpu {
self.devices
.get(&PhysicalDeviceType::IntegratedGpu)
@@ -213,14 +222,8 @@
};
let usage = match info.flags.uses_rendering() {
- true => ImageUsage {
- color_attachment: true,
- ..ImageUsage::empty()
- },
- false => ImageUsage {
- sampled: true,
- ..ImageUsage::empty()
- },
+ true => ImageUsage::COLOR_ATTACHMENT,
+ false => ImageUsage::SAMPLED,
};
// Reasonable bounds on image width.
@@ -234,9 +237,9 @@
}
let vulkan_format = info.drm_format.vulkan_format()?;
- let unsafe_image = image::sys::UnsafeImage::new(
+ let raw_image = Arc::new(image::sys::RawImage::new(
device.clone(),
- image::sys::UnsafeImageCreateInfo {
+ image::sys::ImageCreateInfo {
dimensions: ImageDimensions::Dim2d {
width: info.width,
height: info.height,
@@ -249,11 +252,11 @@
sharing: Sharing::Exclusive,
..Default::default()
},
- )?;
+ )?);
- let memory_requirements = unsafe_image.memory_requirements();
-
- Ok((unsafe_image, memory_requirements))
+ // Won't panic since this not a swapchain image.
+ let memory_requirements = raw_image.memory_requirements()[0];
+ Ok((raw_image, memory_requirements))
}
}
@@ -284,7 +287,7 @@
) -> RutabagaResult<ImageMemoryRequirements> {
let mut reqs: ImageMemoryRequirements = Default::default();
- let (unsafe_image, memory_requirements) = unsafe { self.create_image(info)? };
+ let (raw_image, memory_requirements) = unsafe { self.create_image(info)? };
let device_type = if self.has_integrated_gpu {
&PhysicalDeviceType::IntegratedGpu
@@ -304,7 +307,7 @@
// will panic if we are not.
for plane in 0..planar_layout.num_planes {
let aspect = info.drm_format.vulkan_image_aspect(plane)?;
- let layout = unsafe { unsafe_image.multiplane_color_layout(aspect) };
+ let layout = raw_image.subresource_layout(aspect, 0, 0)?;
reqs.strides[plane] = layout.row_pitch as u32;
reqs.offsets[plane] = layout.offset as u32;
}
@@ -314,22 +317,39 @@
let (memory_type_index, memory_type) = {
let filter = |current_type: &MemoryType| {
- if need_visible && !current_type.property_flags.host_visible {
+ if need_visible
+ && !current_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_VISIBLE)
+ {
return AllocFromRequirementsFilter::Forbidden;
}
- if !need_visible && current_type.property_flags.device_local {
+ if !need_visible
+ && current_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::DEVICE_LOCAL)
+ {
return AllocFromRequirementsFilter::Preferred;
}
- if need_visible && want_cached && current_type.property_flags.host_cached {
+ if need_visible
+ && want_cached
+ && current_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_CACHED)
+ {
return AllocFromRequirementsFilter::Preferred;
}
if need_visible
&& !want_cached
- && current_type.property_flags.host_coherent
- && !current_type.property_flags.host_cached
+ && current_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_COHERENT)
+ && !current_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_CACHED)
{
return AllocFromRequirementsFilter::Preferred;
}
@@ -362,12 +382,21 @@
};
reqs.info = info;
- reqs.size = memory_requirements.size as u64;
+ reqs.size = memory_requirements.layout.size() as u64;
- if memory_type.property_flags.host_visible {
- if memory_type.property_flags.host_cached {
+ if memory_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_VISIBLE)
+ {
+ if memory_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_CACHED)
+ {
reqs.map_info = RUTABAGA_MAP_CACHE_CACHED;
- } else if memory_type.property_flags.host_coherent {
+ } else if memory_type
+ .property_flags
+ .intersects(MemoryPropertyFlags::HOST_COHERENT)
+ {
reqs.map_info = RUTABAGA_MAP_CACHE_WC;
}
}
@@ -381,7 +410,7 @@
}
fn allocate_memory(&mut self, reqs: ImageMemoryRequirements) -> RutabagaResult<RutabagaHandle> {
- let (unsafe_image, memory_requirements) = unsafe { self.create_image(reqs.info)? };
+ let (raw_image, memory_requirements) = unsafe { self.create_image(reqs.info)? };
let vulkan_info = reqs.vulkan_info.ok_or(RutabagaError::InvalidVulkanInfo)?;
@@ -409,26 +438,20 @@
match device.enabled_extensions().ext_external_memory_dma_buf {
true => (
ExternalMemoryHandleType::DmaBuf,
- ExternalMemoryHandleTypes {
- dma_buf: true,
- ..ExternalMemoryHandleTypes::empty()
- },
+ ExternalMemoryHandleTypes::DMA_BUF,
RUTABAGA_MEM_HANDLE_TYPE_DMABUF,
),
false => (
ExternalMemoryHandleType::OpaqueFd,
- ExternalMemoryHandleTypes {
- opaque_fd: true,
- ..ExternalMemoryHandleTypes::empty()
- },
+ ExternalMemoryHandleTypes::OPAQUE_FD,
RUTABAGA_MEM_HANDLE_TYPE_OPAQUE_FD,
),
};
let dedicated_allocation = match device.enabled_extensions().khr_dedicated_allocation {
true => {
- if memory_requirements.prefer_dedicated {
- Some(DedicatedAllocation::Image(&unsafe_image))
+ if memory_requirements.prefers_dedicated_allocation {
+ Some(DedicatedAllocation::Image(&raw_image))
} else {
None
}
@@ -496,8 +519,8 @@
}
}
-impl From<ImageCreationError> for RutabagaError {
- fn from(e: ImageCreationError) -> RutabagaError {
+impl From<ImageError> for RutabagaError {
+ fn from(e: ImageError) -> RutabagaError {
RutabagaError::VkImageCreationError(e)
}
}
diff --git a/rutabaga_gfx/src/rutabaga_utils.rs b/rutabaga_gfx/src/rutabaga_utils.rs
index dda10b3..8177057 100644
--- a/rutabaga_gfx/src/rutabaga_utils.rs
+++ b/rutabaga_gfx/src/rutabaga_utils.rs
@@ -21,7 +21,7 @@
#[cfg(feature = "vulkano")]
use vulkano::device::DeviceCreationError;
#[cfg(feature = "vulkano")]
-use vulkano::image::ImageCreationError;
+use vulkano::image::ImageError;
#[cfg(feature = "vulkano")]
use vulkano::instance::InstanceCreationError;
#[cfg(feature = "vulkano")]
@@ -308,7 +308,7 @@
/// Image creation error
#[cfg(feature = "vulkano")]
#[error("vulkano image creation failure {0}")]
- VkImageCreationError(ImageCreationError),
+ VkImageCreationError(ImageError),
/// Instance creation error
#[cfg(feature = "vulkano")]
#[error("vulkano instance creation failure {0}")]
diff --git a/src/crosvm/sys/linux.rs b/src/crosvm/sys/linux.rs
index ec00664..18caed8 100644
--- a/src/crosvm/sys/linux.rs
+++ b/src/crosvm/sys/linux.rs
@@ -174,6 +174,7 @@
#[cfg(target_arch = "riscv64")]
use riscv64::Riscv64 as Arch;
use rutabaga_gfx::RutabagaGralloc;
+use rutabaga_gfx::RutabagaGrallocBackendFlags;
use smallvec::SmallVec;
#[cfg(feature = "swap")]
use swap::SwapController;
@@ -2181,7 +2182,8 @@
})?
};
- let gralloc = RutabagaGralloc::new().context("failed to create gralloc")?;
+ let flags = RutabagaGrallocBackendFlags::new().disable_vulkano();
+ let gralloc = RutabagaGralloc::new(flags).context("failed to create gralloc")?;
run_control(
linux,
diff --git a/src/sys/windows.rs b/src/sys/windows.rs
index 29497dd..a42644b 100644
--- a/src/sys/windows.rs
+++ b/src/sys/windows.rs
@@ -186,6 +186,7 @@
use run_vcpu::run_all_vcpus;
use run_vcpu::VcpuRunMode;
use rutabaga_gfx::RutabagaGralloc;
+use rutabaga_gfx::RutabagaGrallocBackendFlags;
use smallvec::SmallVec;
use sync::Mutex;
use tube_transporter::TubeToken;
@@ -2473,8 +2474,8 @@
(None, None)
};
- let gralloc =
- RutabagaGralloc::new().exit_context(Exit::CreateGralloc, "failed to create gralloc")?;
+ let gralloc = RutabagaGralloc::new(RutabagaGrallocBackendFlags::new())
+ .exit_context(Exit::CreateGralloc, "failed to create gralloc")?;
let pstore_size = components.pstore.as_ref().map(|pstore| pstore.size as u64);
let mut sys_allocator = SystemAllocator::new(