# News
1. Visual Studio 2013 is no longer supported
[As scheduled](https://github.com/KhronosGroup/glslang/blob/9eef54b2513ca6b40b47b07d24f453848b65c0df/README.md#planned-deprecationsremovals),
Microsoft Visual Studio 2013 is no longer officially supported. \
Please upgrade to at least Visual Studio 2015.
2. The versioning scheme is being improved, and you might notice some differences. This is currently WIP, but will be coming soon. See, for example, PR #2277.
3. If you get a new **compilation error due to a missing header**, it might be caused by this planned removal:
**SPIRV Folder, 1-May, 2020.** Glslang, when installed through CMake,
will install a `SPIRV` folder into `${CMAKE_INSTALL_INCLUDEDIR}`.
This `SPIRV` folder is being moved to `glslang/SPIRV`.
During the transition the `SPIRV` folder will be installed into both locations.
The old install of `SPIRV/` will be removed as a CMake install target no sooner than May 1, 2020.
See issue #1964.
If people are only using this location to get spirv.hpp, I recommend they get that from [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) instead.
[![appveyor status](https://ci.appveyor.com/api/projects/status/q6fi9cb0qnhkla68/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/glslang/branch/master)
![Continuous Deployment](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_deployment.yml/badge.svg)
# Glslang Components and Status
There are several components:
### Reference Validator and GLSL/ESSL -> AST Front End
An OpenGL GLSL and OpenGL|ES GLSL (ESSL) front-end for reference validation and translation of GLSL/ESSL into an internal abstract syntax tree (AST).
**Status**: Virtually complete, with results carrying similar weight as the specifications.
### HLSL -> AST Front End
An HLSL front-end for translation of an approximation of HLSL to glslang's AST form.
**Status**: Partially complete. Semantics are not reference quality and input is not validated.
This is in contrast to the [DXC project](https://github.com/Microsoft/DirectXShaderCompiler), which receives a much larger investment and attempts to have definitive/reference-level semantics.
See [issue 362](https://github.com/KhronosGroup/glslang/issues/362) and [issue 701](https://github.com/KhronosGroup/glslang/issues/701) for current status.
### AST -> SPIR-V Back End
Translates glslang's AST to the Khronos-specified SPIR-V intermediate language.
**Status**: Virtually complete.
### Reflector
An API for getting reflection information from the AST, reflection types/variables/etc. from the HLL source (not the SPIR-V).
**Status**: There is a large amount of functionality present, but no specification/goal to measure completeness against. It is accurate for the input HLL and AST, but only approximate for what would later be emitted for SPIR-V.
### Standalone Wrapper
`glslangValidator` is command-line tool for accessing the functionality above.
Status: Complete.
Tasks waiting to be done are documented as GitHub issues.
## Other References
Also see the Khronos landing page for glslang as a reference front end:
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
The above page, while not kept up to date, includes additional information regarding glslang as a reference validator.
# How to Use Glslang
## Execution of Standalone Wrapper
To use the standalone binary form, execute `glslangValidator`, and it will print
a usage statement. Basic operation is to give it a file containing a shader,
and it will print out warnings/errors and optionally an AST.
The applied stage-specific rules are based on the file extension:
* `.vert` for a vertex shader
* `.tesc` for a tessellation control shader
* `.tese` for a tessellation evaluation shader
* `.geom` for a geometry shader
* `.frag` for a fragment shader
* `.comp` for a compute shader
For ray tracing pipeline shaders:
* `.rgen` for a ray generation shader
* `.rint` for a ray intersection shader
* `.rahit` for a ray any-hit shader
* `.rchit` for a ray closest-hit shader
* `.rmiss` for a ray miss shader
* `.rcall` for a callable shader
There is also a non-shader extension:
* `.conf` for a configuration file of limits, see usage statement for example
## Building (CMake)
Instead of building manually, you can also download the binaries for your
platform directly from the [master-tot release][master-tot-release] on GitHub.
Those binaries are automatically uploaded by the buildbots after successful
testing and they always reflect the current top of the tree of the master
branch.
### Dependencies
* A C++11 compiler.
(For MSVS: use 2015 or later.)
* [CMake][cmake]: for generating compilation targets.
* make: _Linux_, ninja is an alternative, if configured.
* [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.)
* [bison][bison]: _optional_, but needed when changing the grammar (glslang.y).
* [googletest][googletest]: _optional_, but should use if making any changes to glslang.
### Build steps
The following steps assume a Bash shell. On Windows, that could be the Git Bash
shell or some other shell of your choosing.
#### 1) Check-Out this project
```bash
cd <parent of where you want glslang to be>
git clone https://github.com/KhronosGroup/glslang.git
```
#### 2) Check-Out External Projects
```bash
cd <the directory glslang was cloned to, "External" will be a subdirectory>
git clone https://github.com/google/googletest.git External/googletest
```
TEMPORARY NOTICE: additionally perform the following to avoid a current
breakage in googletest:
```bash
cd External/googletest
git checkout 0c400f67fcf305869c5fb113dd296eca266c9725
cd ../..
```
If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, or wish to run the
integrated test suite, install spirv-tools with this:
```bash
./update_glslang_sources.py
```
#### 3) Configure
Assume the source directory is `$SOURCE_DIR` and the build directory is
`$BUILD_DIR`. First ensure the build directory exists, then navigate to it:
```bash
mkdir -p $BUILD_DIR
cd $BUILD_DIR
```
For building on Linux:
```bash
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" $SOURCE_DIR
# "Release" (for CMAKE_BUILD_TYPE) could also be "Debug" or "RelWithDebInfo"
```
For building on Android:
```bash
cmake $SOURCE_DIR -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=Release -DANDROID_STL=c++_static -DANDROID_PLATFORM=android-24 -DCMAKE_SYSTEM_NAME=Android -DANDROID_TOOLCHAIN=clang -DANDROID_ARM_MODE=arm -DCMAKE_MAKE_PROGRAM=$ANDROID_NDK_HOME/prebuilt/linux-x86_64/bin/make -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake
# If on Windows will be -DCMAKE_MAKE_PROGRAM=%ANDROID_NDK_HOME%\prebuilt\windows-x86_64\bin\make.exe
# -G is needed for building on Windows
# -DANDROID_ABI can also be armeabi-v7a for 32 bit
```
For building on Windows:
```bash
cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX="$(pwd)/install"
# The CMAKE_INSTALL_PREFIX part is for testing (explained later).
```
The CMake GUI also works for Windows (version 3.4.1 tested).
Also, consider using `git config --global core.fileMode false` (or with `--local`) on Windows
to prevent the addition of execution permission on files.
#### 4) Build and Install
```bash
# for Linux:
make -j4 install
# for Windows:
cmake --build . --config Release --target install
# "Release" (for --config) could also be "Debug", "MinSizeRel", or "RelWithDebInfo"
```
If using MSVC, after running CMake to configure, use the
Configuration Manager to check the `INSTALL` project.
### Building
三雷科技
- 粉丝: 4w+
- 资源: 409
最新资源
- 西门子追剪Ver1.1(s7-1200) 1.西门子1200 2.威纶通触摸屏 3.主轴(编码器,电机,变频器或伺服)+PLC+从轴伺服 做切料动作
- MATLAB代码:考虑电动汽车有序充放电的机组组合和最优潮流 关键词:电动汽车 MILP 最优潮流 参考文档:A bi-layer optimization based temporal and
- MATLAB代码:ADMM算法在分布式调度中的应用 关键词:并行算法(Jocobi)和串行算法(Gaussian Seidel, GS) 参考文档:《主动配电网分布式无功优化控制方法》基于串行和并
- 传统电力系统两区域互联调频模型
- Comsol和matlab联合计算PPLN铌酸锂波导倍频效率转 大信号模型
- 无人驾驶的车辆动力学模型验证 配套详细视频讲解 配套无人驾驶车辆模型预测控制资料,有视频讲解carsim2019,matlab2018
- 超快激光烧蚀补,双温方程,用到的模块,PDE模块,变形几何
- 西门子485通讯 西门子smart200 自带的485口 modbus rtu协议 485通讯例程 控制12个温控表一个变频器 提供西门子新手操作485通讯的细节注意点,让新手快速掌握这个功能
- 外弹道仿真程序,质点弹道模型,Matlab仿真程序(fig文件和源码) 可根据设置空气动力、弹体条件等,利用四阶龙格库塔进行对外弹道进行数值解算,并实现GUI界面 附带说明文件
- DSP28335电机控制 TMS320F28335电机驱动,运动控制 采用TMS320F28335作为主控 支持永磁同步电机控制,无刷电机控制,有刷电机控制 支持有刷电机,电流,速度闭环控制 无刷电机
- 西门子smart200 自由通讯 2个例程 看图 ,只供参考学习,改为自己需要的程序
- abaqus双线盾构隧道,含两侧隧道中间联络通道,超精细模型,含软化模量,盾构注浆等等
- Matlab 代码:计及电动汽车灵活性的微网 电厂多时间尺度协调调度模型 关键词 电动汽车优化 微网 电厂 vpp 多时间尺度 优化调度 系统灵活性 火火火 摘要:构建了含有电动汽车参
- 相场模拟 选择性激光烧结 激光融覆 凝固 枝晶生长
- s7-200和两台变频器modbus rtu通信程序采用西门子224xp,配mcgs触摸屏,变频器一台三菱D700,一台台达vfd-m,通过modbus rtu程序可以控制变频器的正反转,停止,频率的
- 三菱通过485bd板 CRC指令通讯示例 不含详细校验程序 所需硬件:三菱FX3Uplc,FX
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈