Commit Graph

662 Commits

Author SHA1 Message Date
Бранимир Караџић
49c0e49527 Removed WebGPU. (#3198) 2023-11-09 17:15:22 -08:00
Бранимир Караџић
f14c14a485 Removed D3D9. (#3191) 2023-11-03 21:15:42 -07:00
Бранимир Караџић
fa1897bd1f Added headless validation for bgfx::init and bgfx::reset. 2023-06-23 19:16:32 -07:00
Бранимир Караџић
02e67ff404 Cleanup. 2023-06-13 18:27:31 -07:00
云风
498c34273b Larger debug text for retina display (#3109)
* Add Init.Resolution.scaleDebug

* clamp scale to BGFX_CONFIG_MAX_SCALE_DEBUG

* update version

* Use textWdith/textHeight in helloworld
2023-06-13 18:17:38 -07:00
Бранимир Караџић
b5471d14f8 Acquire resource API lock when calling bgfx::reset. 2023-06-12 20:10:07 -07:00
Бранимир Караџић
f611d68f72 Fixed validation when creating dynamic index buffer with compute read flag. 2023-05-09 18:14:30 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Branimir Karadžić
30176ceab8 Fixed MSVC warning. 2022-12-02 19:19:13 -08:00
Бранимир Караџић
c4d4b90e32 shaderc: Fixed SPIR-V uniform array size reflection. Issue #2964. 2022-10-27 19:43:17 -07:00
Бранимир Караџић
4ec3ab3532 Cleanup. 2022-10-15 07:29:00 -07:00
Бранимир Караџић
8a405a0c73 Improved internal handle. 2022-10-05 21:10:19 -07:00
Бранимир Караџић
e87f08b1e5 Cleanup. 2022-10-01 08:48:57 -07:00
Бранимир Караџић
76923d21d9 Cleanup. 2022-10-01 08:29:58 -07:00
jwdevel
f1f77a6cd3 Record frame num in view stats (#2908)
* Add 'frameNumber' to Frame struct

Previously, the frame number returned from bgfx::frame() was tracked separately in the Context. Now,
we store that information in the Frame. This will allow us to attach the frame number to ViewStats.

* Add frame number to ViewStats

When ViewStats are enabled, we tag each timer query with the current frame number, then include
that information in the final results. In this way, clients can correlate specific work that they
submitted to specific GPU timing information.

NOTE: Some backends not implemented, yet. They will always have 0 for frame number.
The ones which are implemented are:
 * OpenGL
 * Vulkan
 * D3D 9,11,12
 * Noop
2022-09-18 19:09:48 -07:00
pezcode
ba467be036 Add support for indirect draw with indirect count (#2925)
* Add indirect draw with indirect count (BGFX_CAPS_DRAW_INDIRECT_COUNT)

* Update bindings

* VK: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* D3D12: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* GL: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* 48-drawindirect: Use BGFX_CAPS_DRAW_INDIRECT_COUNT if available

* 48-drawindirect: Update shaders
2022-09-17 18:16:19 -07:00
云风
8207645355 fix getUniformInfo(), See Issue #2883 (#2885) 2022-08-23 19:53:49 -07:00
Branimir Karadžić
99770c9f43 Overallocate dynamic buffers on resize. 2022-08-19 18:21:11 -07:00
Бранимир Караџић
67f27573b9 Cleanup. 2022-08-19 10:40:00 -07:00
Branimir Karadžić
b35b3fa2a7 Fixed dynamic buffer leak. Issue #2867. 2022-08-19 09:51:23 -07:00
Бранимир Караџић
e34ae05cdf Cleanup. 2022-07-19 10:36:18 -07:00
Бранимир Караџић
9022ffcb64 Add warning when calling RESET with unusupported feature. 2022-07-18 19:25:50 -07:00
bdunkin
f9ab3b5c68 Increase the buffer size if necessary before adding markers (#2838) 2022-07-08 11:46:03 -07:00
Branimir Karadžić
8e7774f735 Fixed build. 2022-05-17 11:30:10 -07:00
Alexander Knorre
7b1d6a98a9 Compute kSortKeyViewNumBits automatically. (#2796)
Compute kSortKeyViewNumBits automatically via log2(BGFX_CONFIG_MAX_VIEWS), so that we could change BGFX_CONFIG_MAX_VIEWS to be above 2^10 = 1024 without changing the `bgfx` source code.
One possible problem with this approach is running out of bits, so maybe we could assert for that, I am not sure where to do it and how many bits we can use though.
Using `bx::uint32_cntlz` because `bx::log2` is not constexpr.
Tested on linux opengl with BGFX_CONFIG_MAX_VIEWS=4096, seems to work.
2022-05-15 19:24:53 -07:00
Бранимир Караџић
36be8a72cc Fixed blit key encoding. 2022-05-14 21:26:20 -07:00
Бранимир Караџић
4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Бранимир Караџић
af68e138fe Cleanup. 2021-12-31 09:43:21 -08:00
Бранимир Караџић
99a7af712f Added more info about transparency sort table. 2021-12-26 09:21:02 -08:00
Бранимир Караџић
5fd83e7a41 Added BGFX_TEXTURE_BLIT_DST validation. 2021-11-01 18:27:20 -07:00
Бранимир Караџић
8392a44b3a Fixed assert macros, and improved error handling. 2021-10-25 18:59:32 -07:00
Branimir Karadžić
46384208ad Define WIN32_LEAN_AND_MEAN if it's not defined when including windows.h. 2021-10-13 20:18:03 -07:00
Бранимир Караџић
84a38eede0 Cleanup. 2021-10-13 19:54:27 -07:00
Бранимир Караџић
73db386165 Added uniform name validation. 2021-09-30 17:24:36 -07:00
Gaetan de Villele
89b6c25c4a fix usage of fatal() function when Clang analyzer is used (#2617) 2021-09-27 19:07:32 -07:00
Бранимир Караџић
227ea05dee Fixed transient vertex buffer when vertex layout allocation fails. 2021-09-16 18:32:58 -07:00
Бранимир Караџић
ee0fbea726 Added AGC renderer stub. 2021-08-24 19:35:09 -07:00
James Fulop
9694171d1b cleanup (#2545)
spelling: treshold -> threshold
2021-06-23 07:14:11 -07:00
Branimir Karadžić
24f047b078 Fixed VS warnings. 2021-06-06 14:51:39 -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
Hugo Amnov
24be4a38d0 WebGPU: Add texture format to shaderc (bin version 10) + streamline storage Images in shaders (#2482)
* WebGPU: Add texture format (shaderc bin version 10)

* WebGPU: Simplify storage images + Fix format decorations

* Shaderc: Cleanup Texture name assumption in textures
2021-04-20 20:18:49 -07:00
Бранимир Караџић
6a5ab30c6c In debug build assert on texture and frame buffer validation. 2021-04-17 08:35:34 -07:00
Бранимир Караџић
6109697ade Added bgfx::isFrameBufferValid API. 2021-04-16 22:13:26 -07:00
Бранимир Караџић
0ff10648b6 Cleanup. 2021-04-13 20:30:14 -07:00
pezcode
9d09088488 Additional framebuffer validation (#2448) 2021-04-05 07:23:25 -07:00
Бранимир Караџић
517942f8e1 Cleanup. 2021-04-02 20:17:42 -07:00
Бранимир Караџић
45c0b29470 Cleanup. 2021-04-02 16:46:42 -07:00
Paul Gruenbacher
3b34b6e68a Update bgfx_p.h (#2444)
If you do 
```
bgfx::setIndexBuffer()
bgfx::submit(BGFX_DISCARD_NONE)
bgfx::submit()
```

then the second submit will be broken because even though it still uses the correct index buffer it will lose the BGFX_SUBMIT_INTERNAL_INDEX32 state.
Basically all multi-pass calls involving a 32index buffer are broken currently in bgfx master. 
This fixes bug introduced by 5c304dad3b
2021-04-02 16:43:52 -07:00
Бранимир Караџић
0df2e90edb Cleanup. 2021-04-01 20:09:16 -07:00