Open rcoreilly opened 1 year ago
Update: got it sort-of-working -- it is just super slow but it draws a triangle!
// todo: these options aren't supported for swiftshader used on android for vulkan on mac
PNext: unsafe.Pointer(&vk.PhysicalDeviceVulkan12Features{
SType: vk.StructureTypePhysicalDeviceVulkan12Features,
DescriptorBindingVariableDescriptorCount: vk.True,
DescriptorBindingPartiallyBound: vk.True,
RuntimeDescriptorArray: vk.True,
DescriptorIndexing: vk.True, // might not be needed? not for phong or draw
DescriptorBindingSampledImageUpdateAfterBind: vk.True, // might not be needed? not for phong or draw
PNext: gp.PlatformDeviceNext,
}),
The basic drawtri
example doesn't need these features, but phong
does, so presumably that won't work.
The gogi 2D gui doesn't requires these features either, so might be able to proceed with that.
In any case, the best way forward here is likely to 1. build swiftshader on mac directly instead of through android. 2. write to the google groups about it.
update: yes can run basic 2d gogi (very slowly) in the above config.
The Pixel 3a
with API 31 (Android 12.0 Google Play | amd64)
is actually not horribly slow -- not great for 3d animations but basically works for 3d. Need to double-check the vgpu options with this.
The basic https:://github.com/goki/vgpu
vgpu/examples/mobile
example fails to run on a Mac M1 platform.tried several different
arm64
images: API 34, Tiramisu (33, android 13.0), Sv2 (32, android 12L) -- Tiramisu keeps spewing huge amounts of log info continuously. nothing works.tried various settings in the mysterious
advancedFeatures.ini
https://renenyffenegger.ch/notes/development/Android/SDK/dirs/system-images/android-apiLevel/variant/arch/advancedFeatures_ini -- in~/.android
directory, which did exist and seems to be the relevant place on mac. Nothing seems to make any diff.tried turning on Software vs. Hardware graphics emulation in device features config -- no diff.
it seems to be using https://github.com/google/swiftshader, per this log item -- bug tracker: https://issuetracker.google.com/issues?q=componentid:408190 -- email list: https://groups.google.com/g/swiftshader