Commit Graph

375 Commits

Author SHA1 Message Date
Oskar Kwaśniewski
3195593d8d
feat: base visionOS bgfx implementation (#3289)
Co-authored-by: mani3xis <mariusz.pas+dev@protonmail.com>

fix: properly set storageMode

cleanup: remove unused variables

fix crash while releasing m_drawable on visionOS

fix: remove unused timing variable

fix: file name cases, cleanup

feat: integrate visionOS into bgfx examples
2024-06-03 08:14:53 -07:00
Бранимир Караџић
87fd766c33 shaderc: Fix integer vecs. 2024-05-24 16:42:41 -07:00
Alastair
3bcaaccd29
use BX_MAKEFOURCC in shaderc_hlsl.cpp (#3293) 2024-05-13 12:06:34 -07:00
pheonix
56ad576dcd
[shaderc] Clean up (#3258)
* 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
2024-02-27 07:32:52 -08:00
pheonix
c00e4395b0
Add Metal Shading Language version options to shaderc. Reference version options from: https://developer.apple.com/documentation/metal/mtllanguageversion?language=objc (#3213)
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
2024-02-26 23:08:51 -08:00
Бранимир Караџић
83dfadf673 Happy New Year! 2024-01-14 01:56:36 -08:00
Бранимир Караџић
03a2c26457 Cleanup. 2023-12-27 20:57:13 -08:00
Бранимир Караџић
0c8292f2af Updated glslang. 2023-11-27 22:27:59 -08:00
00bins
bd0cd504f6
Fix incorrect psslShaderPreamble in compute shader (#3206) 2023-11-21 19:33:33 -08:00
Бранимир Караџић
49c0e49527
Removed WebGPU. (#3198) 2023-11-09 17:15:22 -08:00
Edu Garcia
b01c5d597a
Enable debug information for Vulkan shaders (#3193)
* Enable debug information for Vulkan shaders

* Enable debug information for Metal shaders
2023-11-06 11:14:29 -08:00
Бранимир Караџић
f14c14a485
Removed D3D9. (#3191) 2023-11-03 21:15:42 -07:00
gamecoder-nz
66b020e939
Fixed issue where printing profile names prints unreadable characters (#3188)
* Fixed issue where printing profile names prints unreadable characters

* Use %S for StringLitera.

---------

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-10-23 20:44:51 -07:00
Branimir Karadžić
3e5bfb81b6 shaderc: Must have profile specified. 2023-09-30 16:55:00 -07:00
Branimir Karadžić
f13a6ac8ab shaderc: Fixed GLSL profile downgrade. 2023-09-30 16:54:57 -07:00
Jamil Halabi
f059531885
Added a new capability to check for PrimitiveID support (#3154) 2023-08-04 16:42:33 +02:00
Branimir Karadžić
787ecc1138 Cleanup. 2023-06-29 09:26:04 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
Бранимир Караџић
6dd8edc4b1 Cleanup. 2023-04-12 19:25:14 -07:00
rnbhatt
fda8a3705f
Fix for #2822 -- points rendering error on Apple silicon (#3079)
* Add pointsize to SPIRV-Cross output before writing

Adds 
float bgfx_metal_pointSize [[point_size]] = 1;
to xlatMtlMain_out, ensuring that it always has a value.

* Update shaderc_metal.cpp

Only apply patch to vertex shaders
2023-04-12 10:16:58 -07:00
Бранимир Караџић
b0bb4fc578
Revert "fix unused uniforms replace when multi uniform defined in one line and there is some unused uniforms in that line. (#3056)" (#3064)
This reverts commit bd7a01aa8a.
2023-03-17 19:57:51 -07:00
simon chen
bd7a01aa8a
fix unused uniforms replace when multi uniform defined in one line and there is some unused uniforms in that line. (#3056) 2023-03-17 19:49:42 -07:00
Jorge Rodriguez
70ac58fd38
Write messages to a stream specified by the caller of compilerShader … (#3054)
* 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
2023-03-06 10:30:06 -08:00
issam3105
10ec8e8882
Removed useless precision highp sampler2DArray (#3031)
Co-authored-by: Issam <issam.dahmen@fittingbox.com>
2023-02-02 09:14:22 -08:00
issam3105
6f36b4fb3a
Fix shader preprocessor constructor call (#3030)
Co-authored-by: Issam <issam.dahmen@fittingbox.com>
2023-02-01 07:26:55 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
pheonix
e33efb8b42
shaderc updates (#3018)
- 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
2023-01-07 09:07:15 -08:00
Бранимир Караџић
5f435ea56b Cleanup. 2022-12-28 10:26:39 -08:00
Ali Seyedof
877cdb8b1f
shaderc HLSL profile switch fix (#3005)
* shaderc HLSL profile switch fix

* shader makefiles changed to match new hlsl profile switches

Co-authored-by: Ali Seyedof <ali.seyedof@xyzreality.com>
2022-12-28 10:16:37 -08:00
Бранимир Караџић
c4d4b90e32 shaderc: Fixed SPIR-V uniform array size reflection. Issue #2964. 2022-10-27 19:43:17 -07:00
Бранимир Караџић
24c5c2f096 shaderc: Updated to new glslang. 2022-10-02 23:18:33 -07:00
云风
8207645355
fix getUniformInfo(), See Issue #2883 (#2885) 2022-08-23 19:53:49 -07:00
ichordev
7a5fec1580
Documentation update 2 (#2756)
* 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>
2022-04-04 12:57:00 -07:00
Catalin Moldovan
11ba8de2d1
Shaderc console out (#2758)
* Add support to output compiled shader to stdout

* Whitespace formating fixes

* Updated shaderc cli stdout output option to "--stdout"
2022-04-04 12:52:44 -07:00
Sandy
251e35ae09
Fixes for shader texture array in GLES3 (#2750)
* opengl: use texture for texture2DArray

* shaderc: Add default precision for sampler2DArray on GLES3
2022-03-29 13:14:21 -07:00
Бранимир Караџић
eb76255063 Fixed typo. 2022-03-26 13:45:48 -07:00
Бранимир Караџић
e79f92a241 Cleanup. 2022-01-31 18:10:59 -08:00
Бранимир Караџић
4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Бранимир Караџић
bacb073bc8 Cleanup. 2021-12-07 09:10:27 -08:00
Aleš Mlakar
130bc00608
shaderc: Ignore .@data uniforms when compiling for metal (#2677)
Co-authored-by: Aleš Mlakar <ales.ambits@gmail.com>
2021-12-06 09:39:05 -08:00
Бранимир Караџић
e6125ffa46 shaderc: Fixed gl_FragColor patching for raw GLSL. 2021-11-19 19:11:59 -08:00
Christophe Dehais
6224daf907
Set BGFX_SHADER_LANGUAGE_GLSL to actual profile more consistently (#2664) 2021-11-19 07:27:13 -08:00
Christophe Dehais
08cd17e3b8
Check if gl_Frag[Data/Color] are not already patched (#2661) 2021-11-18 13:12:38 -08:00
Christophe Dehais
5b321e6669
Subtitute texture*EXT functions emitted in WebGL 2 (#2663) 2021-11-18 13:11:45 -08:00
Raziel Alphadios
094d34194c
Cleanup: change POD casts from static_cast to functional/ctor casts, for consistency (#2648)
Co-authored-by: Raziel Alphadios <raziely@gmail.com>
2021-10-31 15:54:10 -07:00
Branimir Karadžić
8f4c22e57a Fixed warning. 2021-10-28 18:40:53 -07:00
Christophe Dehais
89c8e61abd
Strip flags from UniformType before calling getUniformTypeName() (#2635) 2021-10-26 10:07:27 -07:00
Branimir Karadžić
4763f97205 More fixes. 2021-10-25 19:26:38 -07:00
Бранимир Караџић
8392a44b3a Fixed assert macros, and improved error handling. 2021-10-25 18:59:32 -07:00
Branimir Karadžić
a923b86aab Fixed warnings. 2021-10-06 09:55:26 -07:00