* Add Metal Shading Language version options to shaderc. Reference version options from: https://developer.apple.com/documentation/metal/mtllanguageversion?language=objc
Add configuration options for MSL compiler based on MSL version and Platform
Configure MSL->SPIR-V version configuration based on when ray tracing types become available
Set default metal compiler option to be metal 1.2, which is the default version assigned in the current SPIRV-Cross being used
* Add Metal Shading Language version options to shaderc. Reference version options from: https://developer.apple.com/documentation/metal/mtllanguageversion?language=objc
Add configuration options for MSL compiler based on MSL version and Platform
Configure MSL->SPIR-V version configuration based on when ray tracing types become available
Set default metal compiler option to be metal 1.2, which is the default version assigned in the current SPIRV-Cross being used
* Group ios and osx platform code paths
Reduce the size of temp buffer used in writing the MSL preprocessor define
Fix a compiler warning about size_t to int32_t truncation
Adjust whitespace in usage text
* Remove indented scope left-over from branch condition removal
* Remove some testing code
* Adjust whitespace for function arguments
* Replace BX_ASSERT with bx::write to message handler in spirv generation
Add configuration options for MSL compiler based on MSL version and Platform
Configure MSL->SPIR-V version configuration based on when ray tracing types become available
Set default metal compiler option to be metal 1.2, which is the default version assigned in the current SPIRV-Cross being used
* Fixed issue where printing profile names prints unreadable characters
* Use %S for StringLitera.
---------
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Write messages to a stream specified by the caller of compilerShader rather than directly to stdOut, to allow tool writers to easily capture it.
* PR updates
* Missed a write
* PR updates
- add support for Vulkan 1.3 using SPIR-V 1.6 as a profile target
- move ordering of help information of SPIR-V block
- update SPIR-V to Vulkan mapping documentation
* Reworded & reformatted bgfx.rst for better clarity
* Reworded for clarity; made option format more consistent
* Added one character!
* Updated shaderc help
Will update docs to 100% match soon
* Updated geometryc's help
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Fix DebugDraw shaders compilation
Pull request #2317 broke compilation of the DebugDraw shaders (vs_debugdraw_fill.sc, etc)
on the Intel mesa driver. Shaders with a version lower than 130 have no
support for uvec or ivec by default on OpenGL.
This patch detects when these shaders are present and bumps the version when appropriate.
* Removed the ivecs from the patch
It seems the ivecs are infact supported on versions lower than 130 on
OpenGL.
Compiling 'fs_texture_array.sc' with shaderc for OpenGLES fails with a syntax error,
because the matrix transpose function definitions occur before extension directives,
in this case EXT_texture_array.
* WebGPU: Add texture format (shaderc bin version 10)
* WebGPU: Simplify storage images + Fix format decorations
* Shaderc: Cleanup Texture name assumption in textures
* Fix typo in SPIR-V id
* Use backend-agnostic shaderc output
...as opposed to directly storing and comparing against Vulkan and WebGPU enums. This is backwards-compatible with existing code and shaders.
* Remove comments and Undefined value
* [shaderc] Add SPIR-V profiles to support Vulkan 1.1 and Vulkan 1.2.
* * Add support for Vulkan 1.1 with SPIR-V 1.4.
* Update "spirv" values to correlate with shaderc spirv profile name mappings.
* Expand on spirv profile naming and encoding documentation.
* Address PR notes
* Adds UAV support for D3D12, Vulkan and reworked support for OpenGL, D3D11
UAV support is now uniform across compute and draw.
To set a UAV you just use bgfx::setImage() and IMAGE2D in the shader, just like in compute.
Due to these changes shaders will have to be recompiled.
The changes include:
- D3D11 requires patching of the UAV slot number (which is now done by modifying the DXBC instead of using a macro)
- If the DXBC binary includes a debug chunk, that is also patched to match the new slot number
- All the other renderers don't need any kind of patching
- There are some shader annotations to better convert the UAV format used in hlsl to spirv
Possibility of further enhancements:
- bgfx::setViewFrameBuffer() only supports binding to a framebuffer or, using BGFX_INVALID_HANDLE, to bind the default backbuffer. This doesn't allow for the case where there is no need to bind to either one of them, for example when using a fragment shader only to read and write to an UAV.
* Bump shader version, because they need to be recompiled.