Mesa demos #205

Merged
merged 10 commits into from Sep 21, 2016

Conversation

Projects
None yet
4 participants
Contributor

camako commented Aug 8, 2016

First cut snapified mesa demos showcasing opengl, opengles1, opengles2, egl based apps. Will be used as a tool to develop the missing/incomplete interfaces.

Collaborator

dholbach commented Aug 9, 2016

daniel@daydream:/dev/snappy/snappy-playpen/mesa-demos$ mesa-demos.es2gears
/snap/mesa-demos/x1/es2gears: line 13: cd: /snap/mesa-demos/x1/egl/opengles2: No such file or directory
/snap/mesa-demos/x1/es2gears: line 14: /home/daniel/dev/snappy/snappy-playpen/mesa-demos/es2gears_x11: No such file or directory
daniel@daydream:
/dev/snappy/snappy-playpen/mesa-demos$

Collaborator

dholbach commented Aug 9, 2016

Could they all share the same wrapper file?

Collaborator

dholbach commented Aug 9, 2016

Can you maybe explain why --devmode is still required?

Contributor

camako commented Aug 9, 2016

es2 apps should work now.

Contributor

camako commented Aug 9, 2016

'--devmode' is required because seccomp is denying execution due to a missing syscall (sendmsg) for all these apps. I suspect the helper libraries need them (glx, glut, etc). I'm investigating.

Also, the opengles apps shouldn't use the opengl interface. I'll create an opengles interface in snapd. There might also need to be an egl interface that's needed. Still investigating these and devmode will be removed once these concerns are addressed.

Contributor

camako commented Aug 9, 2016

They could possibly share the same wrapper, but I'm not sure how to express that in the yaml (i.e. copying one file to multiple destinations). I'll ask in the snapcraft list.

But better yet, the wrappers can be eliminated once the 'environment' functionality is merged in (see the readme).

Contributor

camako commented Aug 9, 2016

👍

Collaborator

dholbach commented Aug 9, 2016

Sorry, when I said "explain" I meant "note it down in the mesa-demos/README.md file".

A way to express it in the yaml file could be something like

apps:
something:
command: bin/common-wrapper something
something-else:
command: bin/common-wrapper something-else

... if that's possible.

Collaborator

dholbach commented Aug 9, 2016

es2gears works now! :-)

Contributor

camako commented Aug 9, 2016

Thanks for your suggestion. Now I use one wrapper. I've also added to the readme why strict mode isn't yet turned on.

@camako camako closed this Aug 9, 2016

Contributor

camako commented Aug 9, 2016

oops

@camako camako reopened this Aug 9, 2016

Contributor

camako commented Aug 9, 2016

👍

mesa-demos/README.md
+ es2gears
+
+Known issues:
+ - Only validated with Intel (i965) GPU drivers, so far.
@dholbach

dholbach Aug 10, 2016

Collaborator

And i915.

@camako

camako Aug 10, 2016

Contributor

Added it to the readme. Thanks for testing.

@camako

camako Aug 10, 2016

Contributor

👍

mesa-demos/README.md
+Known issues:
+ - Only validated with Intel (i965) GPU drivers, so far.
+ - Only a few of the demos are included in the snap. Currently, each demo requires an env var to be set which is achieved through a wrapper. Having [lp:1583259](https://bugs.launchpad.net/snappy/+bug/1583259) would help when adding the others wholesale.
+ - 'strict' mode is not yet supported as there are some seccomp denials due to 'sendmsg'. Needs more investigation as to whether a rule addressing that needs to be added to the 'opengl' interface or another interface needs to be created for glut, glx, etc that opengl apps typically use.
@dholbach

dholbach Aug 10, 2016

Collaborator

Is there a snapd/snap-confine bug open for this?

@camako

camako Aug 10, 2016

Contributor

I'm still not done investigating this. I'll raise a bug when done.

@camako

camako Aug 10, 2016

Contributor

👍

Collaborator

dholbach commented Aug 10, 2016

Beautiful work, just added two small comments.

Contributor

camako commented Aug 10, 2016

👍

Contributor

camako commented Aug 11, 2016

My investigation has lead to this bug : https://bugs.launchpad.net/snappy/+bug/1611978

Contributor

camako commented Aug 11, 2016

Updated the readme to reflect the result of the investigation about the seccomp denial (hence keeping this snap in devmode).

Contributor

camako commented Aug 12, 2016

👍

+ - 'strict' mode is not yet supported due to [lp:1611978](https://bugs.launchpad.net/snappy/+bug/1611978)
+
+TODO:
+ - Validate on post-Xenial
@zyga

zyga Aug 15, 2016

Validate on Debian, Fedora, Arch, etc...

@camako

camako Aug 17, 2016

Contributor

I've tried to use an lxd container for Debian and Fedora but they failed for different reasons. I've added this task as a TO-DO to the readme and will get to it when I've completed my main task (which is implementing the opengles interface).

@camako

camako Aug 17, 2016

Contributor

👍

mesa-demos/README.md
+
+TODO:
+ - Validate on post-Xenial
+ - Validate on non-Intel GPUs
@zyga

zyga Aug 15, 2016

Validate on various versions of Nvidia proprietary GPU driver (different driver, different behavior from snap-confine!)

@camako

camako Aug 17, 2016

Contributor

Currently I don't have an NVidia based machine. I'll ask around if anyone has one and can help me. For now this task is in the TO-DO.

@camako

camako Aug 17, 2016

Contributor

👍

zyga commented Aug 15, 2016

Looks good. I'd love to use this for my GPU support work in snap-confine. I added two comments that I see as additional TODOs. I would love if those could be included in the tree.

Validated on ubuntu 16.04 with nvidia-361 (361.42-0ubuntu2) proprietary driver. Most of the demos included worked fine except mesa-demos.es2tri but that seems to be due to a driver idiosyncrasy rather than the snap itself.

Contributor

camako commented Aug 24, 2016

So can we merge this now?

Collaborator

dholbach commented Aug 29, 2016

It looks like it currently fails to build: https://travis-ci.org/ubuntu/snappy-playpen/builds/155385333

Contributor

camako commented Aug 29, 2016

I think it fails to build due to an infrastructure problem. I see others failing the same way. How do we rekick the build?

Collaborator

dholbach commented Aug 29, 2016

I re-kicked the build. It ran "about 6 hours ago": https://travis-ci.org/ubuntu/snappy-playpen/builds/155385333

Contributor

camako commented Sep 20, 2016

@dholbach @zyga, I've updated the PR with the latest changes in yaml, and also added the missing {build|stage}_packages. Could you give it a quick review again? Thanks.

Builds and runs nicely! Good work!

Collaborator

dholbach commented Sep 21, 2016

I'll merge this now. From a Playpen perspective this is well-done and working. If we need to test and further validate this, let's do this in a separate thread.

@dholbach dholbach merged commit cc529df into Ubuntu:master Sep 21, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

zyga commented Sep 21, 2016

Thank you for merging this. I will look at validating this against snap-confine 1.0.41 that is in yakkety and will soon enter xenial.

Contributor

camako commented Sep 21, 2016

Thanks. I'll create separate PRs for the rest of the demos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment