Linux on Windows
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Linux on Windows,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2678字,纯文字阅读大概需要4分钟。
内容图文
![Linux on Windows](/upload/InfoBanner/zyjiaocheng/933/3ca84ede8a524f93a794f19d36d1cc32.jpg)
序
如果在十五年前,那时候我刚开始看Linux内核情景分析,看到了微软这么用心的支持Linux、甚至是在Windows上支持Linux,我可能会很激动吧。
但是现在,我只会说,哦,这样啊!
Linux on Windows有两个阶段:不支持Linux GUI应用的WSL;支持Linux GUI的 WSL2。
XDC2020上有些话题是关于WSL2的图形系统的,这里稍微摘录整理下。
OpenGL over D3D
https://www.collabora.com/news-and-blog/blog/2020/07/09/deep-dive-into-opengl-over-directx-layering/
DXIL: compiled shaders (DXIL bytecode). DXIL is essentially LLVM 3.7 bitcode with some extra metadata and validation.
NIR: Mesa will also translate GLSL shaders into an intermediate representation named NIR.
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-HOQW5MFX-1608183835236)(https://raw.githubusercontent.com/axinging/GPUDocs/master/xorg/d3d12_architecture.png)]
Graphics Architecture on Windows Subsystem for Linux
https://xdc2020.x.org/event/9/contributions/610/attachments/700/1295/XDC_-_WSL_Graphics_Architecture.pdf
Linux子系统其实就是一个完全独立的运行在windows上的虚拟机。
VM提供了虚拟的显存和虚拟的GPU供Linux子系统使用。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Fc84CoYr-1608183835242)(https://raw.githubusercontent.com/axinging/GPUDocs/master/xorg/graphics_on_wsl.jpg)]
如果将OpenGL over D3D和Graphics Architecture on Windows Subsystem for Linux, 就可以一窥整个Windows Graphics for Linux的大概:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-xTR03Pfr-1608183835246)(https://raw.githubusercontent.com/axinging/GPUDocs/master/xorg/graphics_on_wsl2.png)]
And Android on WSL2 without emulator becomes possible:
https://www.reddit.com/r/bashonubuntuonwindows/comments/eofn5s/run_anbox_on_wsl_2/
About OpenGL and Vulkan interoperability
EXT_external_objects(_fd) extensions enable:
- Allocation of resources (textures, buffers) from Vulkan and sharing
of those resources from both APIs - Synchronization of the access to shared resources between APIs.
- Example: a VR compositor where the left and right eye images are allocated and
displayed by Vulkan but their contents are filled by OpenGL processes.
Linux extension:
EXT_external_objects_fd (EXT_memory_object_fd, EXT_semaphore_fd):
- enables an OpenGL application to import a memory object or semaphore
from POSIX file descriptor external handles
EXT_external_objects (EXT_memory_object, EXT_semaphore):
- enables an OpenGL application to create OpenGL objects corresponding to
Vulkan objects (textures, buffers, semaphores) and synchronize access to
shared objects across APIs - extends existing GL calls that set and query properties
Reference:
https://xdc2020.x.org/event/9/contributions/620/attachments/696/1308/estea-xdc2020.pdf
内容总结
以上是互联网集市为您收集整理的Linux on Windows全部内容,希望文章能够帮你解决Linux on Windows所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。