Commit Graph

573 Commits

Author SHA1 Message Date
Бранимир Караџић
3bffe3a05d Fixed undefined behavior. 2020-11-13 20:53:11 -08:00
pheonix
e541312851
Update g_verbose SpirvToolsDisassemble to output based on spirv target env for Metal and SPIRV. (#2306)
Fix up alignment in shaderc help string.
2020-11-08 10:57:03 -08:00
Бранимир Караџић
f7f32319c6 Fixed build. 2020-10-26 12:40:40 -07:00
Christophe Dehais
2fee82dc56
Add missing preprocessor macro for ESSL (#2298)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
2020-10-26 10:42:55 -07:00
pheonix
72b04e3913
Shaderc SPIR-V profile additions (#2284)
* [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
2020-10-17 20:02:51 -07:00
Christophe Dehais
daa61822d2
Accept GLSL and SPIRV on Windows (#2286)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
2020-10-14 09:16:34 -07:00
Бранимир Караџић
adf93db26b Updated ImGui. 2020-10-09 08:50:40 -07:00
kingscallop
436b7fab9e
Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119)
* 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.
2020-10-04 21:51:41 -07:00
Kitchen
c0bce01cc9
fix texture bind info missed in vertex shader after compiled (#2270) 2020-09-24 23:33:57 -07:00
云风
03871f12db
fix gcc warnings (#2253) 2020-09-01 20:49:08 -07:00
Martijn Courteaux
1ca9f894d1
Fix uniform stripping procedure for unexpected newlines in Metal shaderc. (#2223) 2020-08-16 21:08:01 -07:00
Бранимир Караџић
22df26ab70 Cleanup. 2020-07-15 10:42:23 -07:00
Бранимир Караџић
a84b13a77c Cleanup. 2020-07-05 21:36:04 -07:00
Бранимир Караџић
301629ed16 Cleanup. 2020-07-05 21:30:52 -07:00
Бранимир Караџић
a95ddd1c0c Reemoved use of old LineReader. 2020-06-20 15:14:54 -07:00
Бранимир Караџић
d86c16213e Cleanup. 2020-06-18 21:20:01 -07:00
Бранимир Караџић
eec559cc55 shaderc: Initialize uniform. 2020-06-18 17:24:47 -07:00
Бранимир Караџић
2cbcb6ea90 RRenamed BX_CHECK to BX_ASSERT. 2020-06-16 10:06:18 -07:00
Бранимир Караџић
594be53891 Reverted #2021. 2020-05-12 07:11:01 -07:00
Hugo Amnov
e1c211b537
WebGPU various small fixes (#2140) 2020-05-10 17:48:25 -07:00
Hugo Amnov
b62302631e
Add Webgpu backend (#2132)
* WebGPU first draft (shaderc bin version 8)

* WebGPU scripts
2020-05-08 08:53:53 -07:00
Бранимир Караџић
7f7c8a9bc0 Updated glslang. 2020-05-04 21:14:04 -07:00
Hugo Amnov
b48b084d25
Vulkan cleanup for Webgpu (#2127)
* Harmonize and simplify Vulkan SPIRV bindings mappings

* Handle Vulkan V-flip properly

* Update Embedded shaders
2020-05-03 13:54:30 -07:00
kingscallop
eaab1be079
Fix GpuShader5 extension on Intel and support 'bitsTo' functions (#2118)
GpuShader5 extension isn't supported on fragment shaders.
Bumps the GLSL version to support the 'bitsTo' functions when present on the shader.
2020-04-26 20:43:03 -07:00
Бранимир Караџић
36ec2a462d Removed alignment macros, and added functions instead. 2020-04-19 18:23:04 -07:00
James Fulop
ea4bbbfcb7
shader read optimization (#2109)
Currently `const char * str` gets converted to a StringView when its passed to `bx::strFindNl`, incurring a strlen. We have the data to calculate the strlen and fully construct the StringView.
2020-04-15 21:12:33 -07:00
Бранимир Караџић
ba5a6b0e46 Fixed build. 2020-04-07 22:49:55 -07:00
G
f07a0f5179
Added support for the extension OES_EGL_image_external(_essl3) for GLES2/3 (#2021)
Co-authored-by: Gabriel <gabriel.sulka@visiarc.com>
2020-04-06 08:20:49 -07:00
Бранимир Караџић
6c0c5c9921 Renamed vertexdecl.* to vertexlayout.* 2020-03-28 20:06:03 -07:00
Sandy Carter
9d09b965f5 shaderc_glsl: skip interp params when parsing glslopt output
Keywords like `flat` qualify type names. Without skipping them, the parser
will not find the type used and fail.
2020-02-20 16:05:00 +00:00
Бранимир Караџић
82f56b5987 Happy New Year! 2020-01-14 21:37:06 -08:00
Бранимир Караџић
3f1c51203b Cleanup. 2019-11-28 20:59:44 -08:00
Attila Kocsis
16e12b30fd geometryv: added attrib/radius info and show 3d axes option
max camera distance depends on loaded mesh size
2019-11-08 07:07:19 -08:00
Attila Kocsis
84e8935180 added gltf 2.0 input to geometryc
Preferred output coordinate system transformation added.

glTF2.0 is tested with all models from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0

Static mesh output looks ok for all of them, but as output file format hasn't changed only static mesh is exported. No animation, nodes, materials. etc.
2019-11-08 07:06:52 -08:00
Бранимир Караџић
35abd01cfb Fixed warnings. 2019-10-05 09:52:04 -07:00
attilaz
3a6f9ff5b0 Fixed isampler and usampler for metal/spirv (#1903) 2019-10-04 20:03:27 -07:00
Бранимир Караџић
010676412e Fixed issue #1894. 2019-09-28 19:30:23 +02:00
Sandy
78614c9b55 shaderc: Add before hlsl validation option to spirv (#1892)
Fixes opaque type in struct error by disabling check.
```
Error: In Vulkan, OpTypeStruct must not contain an opaque type.
  %BgfxSampler2D = OpTypeStruct %6 %8
```
2019-09-26 19:00:44 +00:00
kingscallop
65303869ab Fixes shaderc texture array usage detection. 2019-09-01 15:06:20 -07:00
Leandro Freire
1db46f4fe6 Rename variables and constants 2019-08-17 12:32:16 -07:00
Бранимир Караџић
9009ba50ba Cleanup. 2019-08-15 21:55:09 -07:00
Бранимир Караџић
5edeea64a9 Cleanup. 2019-08-15 21:37:35 -07:00
Бранимир Караџић
90e6afd47d shaderc: Cleanup. 2019-08-13 19:35:10 -07:00
Rinthel
2fa32d855d implement compute shader support 2019-08-13 18:44:42 -07:00
Leandro Freire
855623e153 Rename VertexDecl to VertexLayout 2019-08-13 18:42:01 -07:00
Attila Kocsis
e58a108387 Metal: Fix resource binding for latest spirv-cross
More info:

https://github.com/KhronosGroup/SPIRV-Cross/pull/1036
https://github.com/KhronosGroup/SPIRV-Cross/issues/1072
2019-08-10 09:32:16 -07:00
Rinthel Kwon
6927a9179b vulkan renderer draft implementation 2019-08-04 19:51:16 -07:00
Бранимир Караџић
bbba6aa1ab shaderc: Split Metal and SPIRV compilers. 2019-08-03 08:54:02 -07:00
Бранимир Караџић
564f484ab7 shaderc: Split Metal and SPIRV compilers. 2019-08-03 08:52:14 -07:00
Бранимир Караџић
1ce3e6d256 Cleanup. 2019-07-24 20:17:26 -07:00