Closed gurchetansingh closed 7 years ago
The "NULL" platform hasn't landed in waffle. It would be great if @fjhenigman and @Sonicadvance1 could join forces and unify the implementations.
bweh?
BTW a hack for the issue described above can be found here :
@Sonicadvance1 got confused between surfaceless(null) and headless. Fwiw I'm all for having both (and even on-screen GBM, which would share a lot with surfaceless), while not a huge fan of the "github way". That's why I've noticed your PR way after it was closed.
@evelikov : I'll try to land null platform while someone still cares. (: Now that I know you're also interested in on-screen GBM, I'll try to take that into account. @Sonicadvance1 : what are you working on in your fork?
I generated an EGL backend that rendered purely in to a pbuffer, which could have been easily extended to support surfaceless rendering(Which I was using locally).
The submitted fix (setting EGL_SURFACE_TYPE = EGL_PBUFFER_BIT) can break platforms that don't support pbuffers. If a platform doesn't support pbuffers, then eglChooseConfig would return no configs.
I think the correct fix is either to (a) leave EGL_SURFACE_TYPE unset so it acquires the driver's default value or (b) set it with a value dependent on the wcore_platform.
I plan on testing (a) and (b) today.
Confirmed that solution (a) does not work. It doesn't work because the EGL spec defines the default value of EGL_SURFACE_TYPE to be EGL_WINDOW_BIT, and Mesa's libEGL conforms to the spec there.
I'll proceed with writing code for solution (b).
I pushed a commit to master that lays some groundwork for this. https://github.com/waffle-gl/waffle/commit/6ee826cb9c9ee98276153d97ea4dae36e96b82e0
Also, see my fixes branch which is based on Chrome OS's Waffle and uses the above commit: https://github.com/chadversary/waffle/tree/wip/cros-fix-egl-surface-type-mask
@gurchetansingh I believe everything mentioned here is addressed in master:
I'd take the silence as an agreement that things are working fine. Feel free to reopen ;-)
I am running the following version of Waffle with ChromeOS: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-libs/waffle With this recent Mesa change, the following wflinfo command returns an error:
localhost ~ # wflinfo -p null -a gles2
Waffle error: 0x2 WAFFLE_ERROR_UNKNOWN: eglChooseConfig found no matching configs
The error can be traced back to this line:
const EGLint surface_type = EGL_PBUFFER_BIT;
The command works fine if we change that line to:const EGLint surface_type = EGL_PBUFFER_BIT | EGL_WINDOW_BIT;
However, since there are no windows with the surfaceless platform, the first method is correct. Before that change, Mesa used to advertise the the window bit only. I am not sure if this error is specific to ChromeOS's version of Waffle, though.