Commit Graph

299 Commits

Author SHA1 Message Date
Бранимир Караџић
e9e2e224ee Replaced macros with C++17 attributes. 2023-12-02 20:16:56 -08:00
Бранимир Караџић
7af65cbbfc Cleanup. 2023-12-01 22:47:06 -08:00
Бранимир Караџић
f828394d7a Cleanup. 2023-12-01 22:42:58 -08:00
Бранимир Караџић
edb72488bc macOS: Fixed VK (MoltenVK 1.2.6). 2023-12-01 20:51:28 -08:00
Julian Sikorski
c18122226e Fix multiple windows handling (#3162) 2023-08-22 19:12:11 +02:00
Julian Sikorski
0758191563 Use WL_EGL_PLATFORM consistently with Khronos (#3161) 2023-08-17 22:12:14 +02:00
Julian Sikorski
f4d463990a Allow simultaneous X11 and Wayland support (#3152)
* Allow simultaneous X11 and Wayland support

* Add NativeWindowHandleType

* Set default value for g_platformData.type

* Use g_platformData.type to check for a native Wayland window

* Stub getNativeWindowHandleType on platform where Wayland is not an option

* Implement getNativeWindowHandleType for GLFW

* Add getNativeWindowHandleType to the remaining C++ examples

* Add getNativeWindowHandleType to the C example
2023-08-17 16:54:31 +02:00
Бранимир Караџић
82b70a0230 Cleanup. 2023-08-15 09:27:39 +02:00
Jamil Halabi
64e83a0ec2 Fixed creating MoltenVk surface with agnostic backends such as SDL2 (#3158) 2023-08-15 09:21:25 +02:00
Jamil Halabi
f059531885 Added a new capability to check for PrimitiveID support (#3154) 2023-08-04 16:42:33 +02:00
Julian Sikorski
3101a0d93f Fix Vulkan renderer on wayland (#3143)
* Initial proof-of-concept of vulkan renderer working on wayland

* Get wayland surface from the window handle
2023-08-02 06:01:54 +02:00
Бранимир Караџић
065f6ddc66 VK: Fixed device selection. 2023-07-07 22:47:12 -07:00
Бранимир Караџић
356c59dbf5 VK: Fixed selecting software rasterizer on Mesa. 2023-07-07 22:19:15 -07:00
Бранимир Караџић
e7e75e4bff Cleanup. 2023-05-26 08:40:53 -07:00
云风
5ddc5595ff Align at least 8 (#3104) 2023-05-26 07:26:22 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
Branimir Karadžić
277b5f4ada Fixed MSVC warning. 2023-04-23 09:06:41 -07:00
HumanBean4
f449f139f1 Fixed texture side iterator being too small (#3025) 2023-01-19 07:16:04 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
kuncarous
7c40b8df62 Vulkan: Fixed R16U format. (#2991) 2022-12-06 13:19:53 -08:00
Jamil Halabi
54ade6e888 Fixed MoltenVK on Mac to reflect new requirements (#2972) 2022-11-22 12:06:30 -08:00
Бранимир Караџић
90e847c46d VK: Fixed some ubsan reported issue. 2022-11-05 07:24:48 -07:00
Raziel Alphadios
c2bc5177b5 Add support for remaining unsupported ASTC formats (#2963)
* Add support for remaining unsupported ASTC formats
Add new ASTC formats into pixelformats example and ninja scripts
Rebuild ASTC textures

* Update idl and generate
Move comma in pixelformats

Co-authored-by: Raziel Alphadios <raziely@gmail.com>
2022-10-25 17:03:40 -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
Sandy
85910e9778 Add BGR versions of 16 bit formats (#2897)
* pixelformats: Add BGRA4

* pixelformats: Add BGR5A1

* pixelformats: Add B5G6R5

* make idl
2022-08-25 16:08:06 -07:00
Бранимир Караџић
6cb74deed4 VK: Fixed GPU selection. 2022-08-23 08:28:29 -07:00
Бранимир Караџић
31c92ece0a VK: Fixed A8 format. 2022-08-22 19:02:57 -07:00
Бранимир Караџић
6b5b50c2cf VK: Fixed RGB10A2, and RGB5A1 swizzle. 2022-08-19 11:29:59 -07:00
Бранимир Караџић
130ac64a0b VK: Fixed RGBA4 swizzle. 2022-08-19 11:25:11 -07:00
Бранимир Караџић
280cae73af VK: Fixed swizzle macro. 2022-08-19 10:57:49 -07:00
Бранимир Караџић
8abb86801f Cleanup. 2022-08-18 21:14:35 -07:00
Бранимир Караџић
51f89e3510 VK: Made swizzle component table more readable. 2022-08-18 20:43:59 -07:00
Miguel Ángel
5ae2271667 Replaced VK_FORMAT_D24_UNORM_S8_UINT with the more supported VK_FORMAT_D32_SFLOAT_S8_UINT (#2755)
Co-authored-by: Miguel Ángel Pérez Martínez <miguel_angel_perez_martinez@not_an_email.com>
2022-04-01 07:27:42 -07:00
pezcode
4b04a8ced8 Vulkan: replace deprecated version macros (#2721) 2022-02-06 17:32:03 -08:00
luzpaz
6875e96bcb Fix various typos (#2719)
Found via `codespell -q 3 -S ./3rdparty,*.ttf -L attribut,ba,clude,conly,indext,inout,lod,nclude,retur,utput`
2022-02-05 11:34:15 -08:00
Бранимир Караџић
4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Branimir Karadžić
da8a5ff449 VK: Fixed update surface size when texture is transcoded. 2021-11-11 17:39:41 -08:00
Бранимир Караџић
6d1791ae2c Cleanup. 2021-11-04 06:53:08 -07:00
Бранимир Караџић
5bc3b18227 Cleanup. 2021-10-31 20:51:13 -07:00
Christophe Dehais
dd7fb33595 Fix layout transitions during series of blit (#2640) 2021-10-31 20:40:17 -07:00
Branimir Karadžić
7bfb8a7b38 More fixes. 2021-10-25 19:15:55 -07:00
Бранимир Караџић
8392a44b3a Fixed assert macros, and improved error handling. 2021-10-25 18:59:32 -07:00
Бранимир Караџић
84a38eede0 Cleanup. 2021-10-13 19:54:27 -07:00
Бранимир Караџић
22d5747719 Cleanup. 2021-09-30 17:24:16 -07:00
pezcode
be2c110781 Vulkan: raise maximum number of swapchain images (#2619) 2021-09-30 15:01:39 -07:00
Christophe Dehais
ad8e7eb974 Simplify vulkan texture resolve (#2611) 2021-09-22 09:20:48 -07:00
Julian Sikorski
9ab8494bdd Fix crash when switching to fullscreen with vulkan (#2598)
Without this change, running examples under XWayland, SDL and vulkan
renderer results in a crash. Credit goes to @pezcode:
https://github.com/bkaradzic/bgfx/issues/2593#issuecomment-905462527
2021-08-30 08:33:37 -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