Commit Graph

320 Commits

Author SHA1 Message Date
Martijn Courteaux
e488a07f1b Support both X11 and Wayland in the same build. (#3360)
* Support both X11 and Wayland in the same build.

 - Works for both Vulkan and OpenGL.
 - Remove --with-wayland from genie options.
 - Vulkan loads all three extensions for surface creation instead of only one.
 - Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
   a SwapChain with the given window size.
 - Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
   recreating to make sure the window is released of its swapchain.
 - Fix dbgText glitch in example-22-windows.
 - Remove old X11-related dependencies for GLFW3.

* Formatting.
2024-10-05 14:33:22 -07:00
Бранимир Караџић
3f9fe0d34e Cleanup. 2024-10-01 16:23:25 -07:00
Daniel Kalmar
7e5bb54a3e Improve NX Vulkan support. (#3357)
This change was developed using publicly available information found in Vulkan headers and official documentation. No proprietary NX resources were used.

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2024-10-01 09:02:06 -07:00
Martijn Courteaux
3303b451a1 Properly support Wayland under EGL and Vulkan. (#3358) 2024-10-01 09:01:44 -07:00
James Fulop
e464102960 fix typo (scrach -> scratch) (#3353) 2024-09-12 19:19:10 -07:00
Daniel Kalmar
14750e1392 Minimal changes for Vulkan support on NX. (#3317) 2024-06-25 07:19:59 -07:00
Бранимир Караџић
06d0e2af2f Cleanup. 2024-06-21 07:37:44 -07:00
Martijn Courteaux
1109f3c5bf Vulkan: improve staging data performance by using scratch buffers per frame. (#3295)
* Vulkan: improve staging data performance by using scratch buffers per frame.

* vulkan: Add alignment parameter to request scratch space.

* Align staging buffers to texel block size.

* Fix scratch buffer allocation bug.

* Fix some non-deterministic behavior found by Valgrind. Paranoid printing.

* Remove debugging printing

* Fix alignment of converted formats.

* Remove forgotten debug print.
2024-06-21 07:32:00 -07:00
Бранимир Караџић
9547e79867 VK: Disabled allocator callbacks. 2024-06-13 20:32:12 -07:00
Бранимир Караџић
b66f60cba0 Cleanup. 2024-06-05 20:27:29 -07:00
Martijn Courteaux
763732e828 Make the semaphore pool larger, such that there are enough for any number of swapchain images AND frames in flight. (#3307) 2024-06-05 20:24:31 -07:00
Бранимир Караџић
eedda8e5cf VK: Added latency info. 2024-06-05 15:43:41 -07:00
Бранимир Караџић
662071f333 Cleanup. 2024-05-11 22:02:23 -07:00
Бранимир Караџић
cbdc8bf77c Cleanup. 2024-05-10 07:37:28 -07:00
Nikolay Ivanov
2d17b9866b Fixed incorrect mipmap generation on Vulkan for Cubemaps (#3236) (#3290) 2024-05-10 07:34:44 -07:00
Martijn Courteaux
0ed3ac95aa More vulkan profiling. (#3279) 2024-04-17 07:24:11 -07:00
Бранимир Караџић
3afb43090f Fixed #3274. 2024-04-02 07:50:19 -07:00
Бранимир Караџић
632489bef5 Fixed #3274. 2024-04-01 09:51:57 -07:00
Бранимир Караџић
2ad67a4dfd Cleanup. 2024-03-29 16:36:55 -07:00
Branimir Karadžić
98d88d9fc6 Fixed draw indirect. 2024-02-09 20:55:44 -08:00
Бранимир Караџић
83dfadf673 Happy New Year! 2024-01-14 01:56:36 -08:00
Бранимир Караџић
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