Commit Graph

7886 Commits

Author SHA1 Message Date
Бранимир Караџић
4f44a506a8 Updated ImGui. 2021-08-20 07:16:28 -07:00
pezcode
103179f74d
Vulkan: fix present elapsed calculation (#2592) 2021-08-20 07:15:27 -07:00
pezcode
d77f8686f9
Vulkan: fix layer calculation for (cubemap) array texture update (#2591) 2021-08-20 07:15:10 -07:00
attilaz
1f0b90ecdb
Added Off The Road Unleashed to README (#2590) 2021-08-19 07:20:10 -07:00
Бранимир Караџић
568ee4ceac Cleanup. 2021-08-18 09:27:12 -07:00
DarkContact
8f60971dd6
fix deadlock and remove unused bx::Error (#2589) 2021-08-18 09:22:55 -07:00
Бранимир Караџић
be0e7ef307 Added link to help needed. 2021-08-17 13:10:08 -07:00
Бранимир Караџић
925fbe30ae Cleanup. 2021-08-14 12:39:50 -07:00
Бранимир Караџић
962a446055 Cleanup. 2021-08-14 08:33:25 -07:00
James Fulop
82ed74ddb6
cleanup (#2579)
* cleanup

remove unused macro parameters

* de-macro CASE_IMPLEMENT_UNIFORM in d3d11, d3d12, mtl, vk

* fix whitespace

* remove undef of macro that was deleted

* collapse switch statements
2021-08-14 06:57:30 -07:00
pezcode
e8281f8656
Vulkan: correctly resolve attachments of destroyed framebuffer (#2576) 2021-08-09 13:42:54 -07:00
pezcode
ae111f1946
Vulkan: fix RGBA8 backbuffer capture (#2575) 2021-08-09 13:42:00 -07:00
jwdevel
59a73fe9d3
Improve detection of EXT_gpu_shader4 (#2572)
This extension is used to detect support for gl_InstanceID and gl_VertexID. However, in more recent
versions of OpenGL, this is built-in functionality. On my system, it does not list that extension,
even though it supports those features, but BGFX was not detecting that.

Updated detection to look for GL>=3.1.

Note 1: even with this change, you do need to compile BGFX with the appropriate
BGFX_CONFIG_RENDERER_OPENGL value (>=31). The default of 21 is not high enough.

Note 2: Even with all of the above, you will likely hit issues with duplicate '#version' lines in
the generated shader code. For that, see issue #xxxx.

fixes issue #2570
2021-08-07 18:02:08 -07:00
Бранимир Караџић
39b018b3f7 Updated spirv-cross. 2021-08-06 19:13:44 -07:00
Бранимир Караџић
e67311db7e Updated spirv-tools. 2021-08-06 19:13:12 -07:00
Бранимир Караџић
f4642f5ba6 Updated spirv-headers. 2021-08-06 19:12:59 -07:00
Бранимир Караџић
0260fe6204 Updated glslang. 2021-08-06 19:12:41 -07:00
Matt Tytel
25ef0e5c85
Weird fix for frame rate doubling after second created window. (#2564)
* Weird fix for frame rate doubling after second created window.

* Don't double buffer with vsync in metal to prevent 2x fps instead.

* Setting number of back buffers in metal if available.

* Better function call syntax.

* Matching maxFrameLatency to maximumDrawableCount in Metal backend.
2021-07-30 08:39:11 -07:00
Бранимир Караџић
2ec34699af Fix build. 2021-07-27 05:38:44 -07:00
Бранимир Караџић
8a0ae08123 Updated spirv-cross. 2021-07-26 17:38:51 -07:00
Бранимир Караџић
b42d4cc558 Updated spirv-tools. 2021-07-26 17:38:43 -07:00
Бранимир Караџић
be1bf8ec0d Updated spirv-headers. 2021-07-26 17:38:25 -07:00
Бранимир Караџић
6538544f2f Updated glslang. 2021-07-26 17:37:42 -07:00
Бранимир Караџић
d208b18a21 Updated vulkan headers. 2021-07-26 17:37:28 -07:00
Бранимир Караџић
b81511a6af Updated meshoptimizer. 2021-07-26 17:36:58 -07:00
Бранимир Караџић
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