Dawn Build for target Android

已查看 147 次
跳至第一个未读帖子

Sohan Jyoti Ghosh

未读,
2020年4月9日 08:32:542020/4/9
收件人 Dawn Graphics
Hi.

There are a few flags around the code like, is _android, DAWN_PLATFORM_ANDROID
Does Dawn build at this stage for Android, is there some gn flags to enable compilation (even with errors/missing pieces) ?

Br,
Sohan

Corentin Wallez

未读,
2020年4月9日 08:43:052020/4/9
收件人 Sohan Jyoti Ghosh、Dawn Graphics
Hey Sohan,

tl;dr: tests were running a while ago but we haven't tried since.

I brought up Dawn on Android a while ago by having a Chromium checkout on Linux set up to build Android, adding the dawn_end2end_tests and dawn_unittests targets under is_android in Chromium's main BUILD.gn file and building them. The dawn_end2end_tests ran with a couple failures on a Pixel 4.

That was a while ago and we haven't tried building for Android since but it should be fairly easy to get it compiling again. Note that while the tests were running, it was without rendering to the screen: the swapchain support on Android hasn't been started at all.

Hopefully this helps, let us know if you have more questions!

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/675269cb-86b9-4b6c-97c5-7f268273e059%40googlegroups.com.

Sohan Jyoti Ghosh

未读,
2020年4月9日 14:36:312020/4/9
收件人 Corentin Wallez、Dawn Graphics
Thanks Corentin ! That indeed builds fine and the tests run all right on ToT ! Though the num failures in my Pixel 3 is 40 odd.

Just wondering, is there a way we can build this independently for Android, without the Chromium tool chain ? On a stand-alone dawn checkout.

Br,
Sohan

Corentin Wallez

未读,
2020年4月13日 05:00:332020/4/13
收件人 Sohan Jyoti Ghosh、Dawn Graphics
Hey Sohan,

We've never tested building standalone for Android, because building in Chromium made it super easy to run tests on a connected Android device. It might work but most likely some Android-specific build rules will be missing and it's not clear how hard it will be to run the test executables on a device.

Cheers,

Corentin

Sohan Jyoti Ghosh

未读,
2020年4月14日 03:43:182020/4/14
收件人 Corentin Wallez、Dawn Graphics
Thanks Corentin for all the info ! 

Br,
Sohan

Sohan Jyoti Ghosh

未读,
2020年4月20日 13:44:212020/4/20
收件人 Corentin Wallez、Dawn Graphics
Hi Corentin,

Was trying to set up some of the samples in Android next (I understand the window and swapchains are not done yet, was planning to hack at them too)
But the basic build itself throws some odd GN dependency error ?

This is on a Chromium ToT checkout,

ninja -C out/Debug CppHelloTriangle
ninja: Entering directory `out/Debug'
[1/1] Regenerating ninja files
FAILED: build.ninja
../../buildtools/linux64/gn --root=../.. -q gen .
ERROR Unresolved dependencies.
//:gn_all(//build/toolchain/android:android_clang_arm)
  needs //third_party/dawn:CppHelloTraingle(//build/toolchain/android:android_clang_arm)

ninja: error: rebuilding 'build.ninja': subcommand failed


Any idea, what maybe the issue ? dawn_end2end_tests and dawn_unittests builds fine though.
I added  
//third_party/dawn:CppHelloTraingle to  Chromium's main src/BUILD.gn

Br,
Sohan

Corentin Wallez

未读,
2020年4月20日 14:27:352020/4/20
收件人 Sohan Jyoti Ghosh、Dawn Graphics
I think you misspelled triangle as traingle.

Sohan Jyoti Ghosh

未读,
2020年4月20日 14:37:362020/4/20
收件人 Corentin Wallez、Dawn Graphics
Oops that was a bad one ! Thanks for correcting it. 

But, that doesn't solve the problem though, 

ninja -C out/Debug CppHelloTriangle
ninja: Entering directory `out/Debug'
[1/1] Regenerating ninja files
FAILED: build.ninja
../../buildtools/linux64/gn --root=../.. -q gen .
ERROR Unresolved dependencies.
//:gn_all(//build/toolchain/android:android_clang_arm)
  needs //third_party/dawn:CppHelloTriangle(//build/toolchain/android:android_clang_arm)


ninja: error: rebuilding 'build.ninja': subcommand failed

Br,
Sohan

Corentin Wallez

未读,
2020年4月20日 14:39:002020/4/20
收件人 Sohan Jyoti Ghosh、Dawn Graphics
IDK, is CppHelloTriangle in dawn/BUILD.gn? We just move it to examples so it would be //third_party/dawn/examples:CppHelloTriangle.

Sohan Jyoti Ghosh

未读,
2020年4月20日 15:22:032020/4/20
收件人 Corentin Wallez、Dawn Graphics
Right ! There seems to be some newer commit to change the dawn/BUILD.gn.
Now, I see some assertion errors of dawn_standalone, that's more understandable. Thanks !

I will have a look.

Br,
Sohan
回复全部
回复作者
转发
0 个新帖子