Commit Graph

7861 Commits

Author SHA1 Message Date
Бранимир Караџић
7b49ea5402 Updated ImGui. 2021-07-26 17:36:47 -07:00
C.Even
13e6100681
Fix shaderc consistency (#2553)
* shaderc: Initialize 'texFormat' in uniform.

* glsl-optimizer: Fix consistency error of 'print_float'
2021-07-20 06:06:56 -07:00
Nathan Reed
2f1e14ea82
Use already injected RenderDoc dll, or load it from default location (#2561)
* Use already injected RenderDoc dll, or load it from default location

- on Windows, if the process was launched from RenderDoc and the dll is already injected, use it
- otherwise try to load the dll from the default installation path in Program Files
- doesn't need the dll to be copied next to the exe or in the system PATH, which is not the supported way to do it according to BaldurK - see https://github.com/baldurk/renderdoc/issues/2279#issuecomment-844588691

* Restore previous implementation of findModule

* Address PR feedback

Co-authored-by: Nathan Reed <nareed@adobe.com>
2021-07-19 17:33:02 -07:00
Barrett Kepler
c8b32d38dd
Add compute shader type to shaderc help. (#2559) 2021-07-18 16:53:24 -07:00
Бранимир Караџић
d95a643603 Updated README. 2021-06-27 13:22:28 -07:00
Martijn Courteaux
078666d373
Allow to create a nvg texture from a BGFX texture. (#2548) 2021-06-25 13:29:51 -07:00
James Fulop
9694171d1b
cleanup (#2545)
spelling: treshold -> threshold
2021-06-23 07:14:11 -07:00
James Fulop
684234c089
cleanup (#2544)
replace `long long` with `int64_t`
2021-06-23 07:13:37 -07:00
Бранимир Караџић
40f1d6b0e4 Merge branch 'master' of github.com:bkaradzic/bgfx 2021-06-16 15:19:34 -07:00
Бранимир Караџић
c2974e96d4 Android default is GLES 3.0. 2021-06-16 15:19:22 -07:00
kingscallop
17c9300afd
Allow shaders to be compiled on msys2 (#2539)
Adds support on tools.mk for the msys2 environment. The OS is still
considered windows but the command line tools for mkdir and rmdir
behave as if on linux.

The variable SHADER_TMP on the makefiles also had to be quoted to make
it work on msys2.
2021-06-12 11:36:54 -07:00
kingscallop
c0adb2a51e
Make the generated embedded shader headers the same between linux and gnuwin32 (#2538)
This echo command on the makefile behaves differently between linux and gnuwin32:
```
-@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@)
```

On linux the semicolon immediately ends the echo command and its output is never piped to the embedded shader's header.
If you try to fix it by quoting the string:
```
-@echo "extern const uint8_t* $(basename $(<))_pssl;" >> $(@)
```

It will work on linux but not on gnuwin32 because the quotes will appear on the outputted string.
The solution was to use printf which works consistently between the two.

Also on gnuwin32 the outputted string has 'CRLF' line endings, which clashes with the rest of the 'LF' line endings
of the embedded shaders header which were produced by shaderc.
The solution was to remove the 'CR' from the outputted string by using the tr command.
2021-06-12 10:22:19 -07:00
Бранимир Караџић
e0d26507dc Added BGFX_CONFIG_ENCODER_API_ONLY configuration setting to enable/disable non-encoder API. 2021-06-11 08:05:58 -07:00
Бранимир Караџић
dda3b9a2d7 Updated ImGui. 2021-06-06 18:18:35 -07:00
Бранимир Караџић
9390ad819e Updated spirv-cross. 2021-06-06 18:16:43 -07:00
Бранимир Караџић
e0b3c2635d Updated spirv-tools. 2021-06-06 18:16:34 -07:00
Бранимир Караџић
d0687367d7 Updated spirv-headers. 2021-06-06 18:16:24 -07:00
Бранимир Караџић
f41da45662 Updated glslang. 2021-06-06 18:16:12 -07:00
Бранимир Караџић
187b3dd8c1 Updated cgltf. 2021-06-06 18:15:39 -07:00
kingscallop
d75e1d7724
Split embedded shaders into essl and glsl - Part 2 (#2536)
Here's part 2 of the embedded shaders change.
2021-06-06 16:48:13 -07:00
Branimir Karadžić
f569fe32a6 Rebuilt all embedded shaders. 2021-06-06 14:51:46 -07:00
Branimir Karadžić
24f047b078 Fixed VS warnings. 2021-06-06 14:51:39 -07:00
kingscallop
e65d185ed6
Fix DebugDraw shaders compilation (#2362)
* 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.
2021-06-06 14:05:14 -07:00
kingscallop
73784ac9eb
Split embedded shaders into essl and glsl - Part 1 (#2535)
In non-embedded shaders there is a separation between essl binaries (examples/runtime/shaders/essl)
and glsl binaries (examples/runtime/shaders/glsl). On embedded shaders there is no such separation
and by default essl shaders are being used by the OpenGL runtime. This usually doesn't cause any
issues but in the case of the debugdraw shaders, that started using uvec4, this now leads to a
runtime error. This patch fixes this by splitting the embedded shaders into essl and glsl.

As asked, this is the first part of the change.

To be able to compile the 'examples/common/debugdraw' shaders, pull
request #2362 is needed.
2021-06-06 13:53:26 -07:00
kingscallop
6440d669a8
Add missing examples in makefile (#2534) 2021-06-05 13:56:29 -07:00
kingscallop
6a529fca4b
Fix usage of bx::findIdentifierMatch for gl_FragDepth (#2533)
When trying to find all the instances of gl_FragDepth
and replace them with bgfx_FragDepth it only finds
the first instance.
2021-06-05 13:56:00 -07:00
kingscallop
1ab27e277b
Fix hardcoded bgfx dir from include paths in makefiles (#2532)
Only these four makefiles had these hardcoded paths.
All other makefiles don't specify the bgfx dir name.
2021-06-05 13:55:19 -07:00
kingscallop
8247e061f0
Fixes texturev embedded shaders compilation (#2531)
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.
2021-06-05 13:54:38 -07:00
Бранимир Караџић
ed645ff01a Bounds: Moved pass-thru funcs into .inl header. 2021-06-05 10:29:59 -07:00
Бранимир Караџић
b8dc216fa0 Cleanup. 2021-06-05 07:56:20 -07:00
simon chen
0b179e59e2
fixed GLES3 bug, when "EGL_KHR_create_context" doesn't exist. (#2529)
* fixed gles3 bug

* fixed sdl bug on android platform
2021-06-05 07:54:14 -07:00
Бранимир Караџић
5db742a7b0 Fixed GLES3 build. 2021-06-03 21:28:10 -07:00
Бранимир Караџић
ce807e7899
Updated README. 2021-06-03 14:27:15 -07:00
Mirko-Salm
c5dcd4ea9b
fixed missing brackets in ddy, ddy_coarse, and ddy_fine (#2525) 2021-05-31 08:59:41 -07:00
Бранимир Караџић
6788f87687 Updated spirv-tools. 2021-05-28 20:17:33 -07:00
Бранимир Караџић
7cd0944343 Updated spirv-headers. 2021-05-28 20:17:24 -07:00
Бранимир Караџић
f0b68fd9d4 Updated spirv-cross. 2021-05-28 20:17:12 -07:00
Бранимир Караџић
4ada836d3d Updated meshoptimizer. 2021-05-28 20:16:57 -07:00
Бранимир Караџић
923418d740 Updated vulkan headers. 2021-05-28 20:16:47 -07:00
Бранимир Караџић
1f32a216b3 Updated glslang. 2021-05-28 20:16:37 -07:00
Бранимир Караџић
a4279df6c9 Updated ImGui. 2021-05-28 20:16:28 -07:00
Бранимир Караџић
7c4b654d3d Updated cgltf. 2021-05-28 20:16:17 -07:00
Бранимир Караџић
08e3d51a9e Fixed docs. 2021-05-25 20:13:59 -07:00
Бранимир Караџић
6baa370801 Fixed transient index buffer functions to all have 32-bit indices support, and removed 16-bit only restriction from docs. 2021-05-25 12:47:28 -07:00
Бранимир Караџић
5ecddbf4d5 Updated version number. 2021-05-19 09:53:54 -07:00
Бранимир Караџић
e642efb03a Updated bindings. 2021-05-19 09:53:34 -07:00
Branimir Karadžić
c5aea5325d Fixed MSVC build. 2021-05-19 07:03:02 -07:00
Бранимир Караџић
d53cd6bc42 Merge branch 'master' of github.com:bkaradzic/bgfx 2021-05-18 22:42:06 -07:00
Бранимир Караџић
a47a1c8917 Fixed WebGL instancing and EGL context upgrade. 2021-05-18 22:41:51 -07:00
Branimir Karadžić
daa4f9d627 Updated shaders. 2021-05-18 20:36:03 -07:00