Commit Graph

3376 Commits

Author SHA1 Message Date
Dmitry Shevchik
a0057adaaa Support compute shaders for OpenGLES 3.1 by injecting a proper version. (#3224) 2023-12-16 09:21:04 -08:00
Raziel Alphadios
f4a9bfc4bc Fix D3D12 debug crash due to validation layers SDK bug (#3222)
* Fix D3D12 debug crash due to validation layers SDK bug

* Change LONG to FARPROC to be technically correct

* Make requested changes:
Move windows version checking to function in bgfx.cpp
Change windowsVersionIs to also use this technique
Use bgfx code style
Specify dwOSVersionInfoSize prior to calling rtlGetVersion

* Merge both functions into one
Use bx::dlsym instead of GetProcAddress directly
Fix major & minor comparison logic

* Fix win10 version comment

* Revert rendererCreate check back to Win 0x0602

* Clean up logic as per suggestion
2023-12-13 19:20:07 -08:00
Jamil Halabi
f91c6faaf2 Fixed calcNumMips for non-power-of-2 texture dimensions (#3219) 2023-12-11 07:39:02 -08:00
Justin Boswell
db40a04a08 Minor changes to support Clang on Windows (#3216)
* Minor changes to support Clang on Windows

* Use _MSC_VER instead of BX_PLATFORM_WINDOWS
2023-12-06 17:42:01 -08:00
attilaz
7b8aa2ec75 Fixes metal texture/buffer binding issue (#3214)
Fixes metal texture/buffer binding when when the same resource is bound to both (vertex and fragment) stages

https://github.com/bkaradzic/bgfx/issues/3024
2023-12-04 07:37:39 -08:00
Бранимир Караџић
e9e2e224ee Replaced macros with C++17 attributes. 2023-12-02 20:16:56 -08:00
Бранимир Караџић
837803454a Cleanup. 2023-12-02 10:35:17 -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
Бранимир Караџић
2d17b36a61 Cleanup. 2023-11-23 09:42:25 -08:00
Бранимир Караџић
cf440e29f3 Use bx::assertFunction in BGFX_ASSERT. 2023-11-13 20:57:54 -08:00
Бранимир Караџић
e60dab3c12 Updated bindings. 2023-11-12 09:30:22 -08:00
Бранимир Караџић
49c0e49527 Removed WebGPU. (#3198) 2023-11-09 17:15:22 -08:00
Бранимир Караџић
67107e5511 Cleanup. 2023-11-09 07:26:23 -08:00
Nacho García
466e87fc0e Fix DX12 backend ignoring Init::PlatformData::context (#3197) 2023-11-08 13:31:34 -08:00
Edu Garcia
13d1f19947 Fix D3D12 VBV reading size (#3194)
* Fix D3D12 VBV reading size

When `stream.m_startVertex` is not 0 we target a position past the start of the buffer, so `BufferLocation + SizeInBytes` will be past the end of the buffer, which the debug layer will complaining about.

With this fix we're only creating a view for the part of the buffer we actually need to access.

* Reordered buffer size calculation.

---------

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-11-06 11:15:22 -08:00
Branimir Karadžić
de9f4b3385 Remove unsupported platforms. 2023-11-03 21:42:02 -07:00
Бранимир Караџић
74f9705f52 Updated version. 2023-11-03 21:18:00 -07:00
Бранимир Караџић
f14c14a485 Removed D3D9. (#3191) 2023-11-03 21:15:42 -07:00
Fabio Soldati
e8f51dea4c fixed wrong cast uint16t to uint32t (#3187)
The new Google Pixel 8 device supports maxTextureSize of 65535. The current implementation sets this value to 0 and lets crash my app. With the cast to uint32t the app works correctly again.
2023-10-23 08:01:22 -07:00
Бранимир Караџић
448a42a8c6 Cleanup. 2023-10-17 07:37:29 -07:00
Yanna
d952e5cfb3 Check nativeWindow pointer before dereferencing (#3185)
Fix access violation in headless mode during bgfx::shutdown().
This pointer is usually set by the SwapChainPanel which doesn't exist
in headless mode.

Co-authored-by: Yanna Kang <yaka@microsoft.com>
2023-10-16 11:25:15 -07:00
Carlos Carrasco
6054b49cef fix dx12 dynamic texture array update (#3182)
Co-authored-by: Carlos <carlos@carloscarrasco.com>
2023-10-04 09:03:37 -07:00
issam3105
66d50eb721 Fixed duplicate import of functions on Linux using gles20 (#3117)
Co-authored-by: Issam <issam.dahmen@fittingbox.com>
2023-09-09 08:25:07 -07:00
Hristo Iliev
98f16cd125 Fix an issue where initializing DX11 headless would cause a crash. (#3164) 2023-08-29 05:07:37 +02:00
Julian Sikorski
c18122226e Fix multiple windows handling (#3162) 2023-08-22 19:12:11 +02:00
Бранимир Караџић
5f564db0d5 macOS: Fixed deprecated warnings. 2023-08-18 09:17:17 +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
Jamil Halabi
a16f603e3c A follow up fix for the PrimitiveID capability (#3159)
* Added a new capability to check for PrimitiveID support

* A fix for PrimitiveID capability not listed in the debug log
2023-08-15 11:33:33 +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
Kitchen
20a1e458da make TimerQueryMtl.m_result match BGFX_CONFIG_MAX_VIEWS size (#3148)
* fix error when create backbuffer with msaa and srgb format

* fix d3d12 error when create backbuffer with msaa and srgb format

* fix TimerQueryMtl result bug
2023-07-28 15:56:28 -07:00
Robin Allen
506da0443c Metal: Fix framebuffer hash ignoring sampleCount (#3140) 2023-07-21 18:03:30 -07:00
Robin Allen
c8f6d89f88 Fix MSAA texture pointer not being freed (#3138)
Texture::destroy only freed m_ptr, not m_ptrMsaa. This caused
problems when texture IDs were reused, because a newly-
created texture would sometimes have m_ptrMsaa.
2023-07-20 08:29:47 -07:00
Robin Allen
a50db8f8fd Fix toggling MSAA on Metal. (#3137)
* Fix toggling MSAA on Metal.

m_backBufferColorMsaa was set when sampleCount > 1, but was never reset when
sampleCount became 1 again.

Many other bits of code in the Metal renderer decide what to do by checking
m_backBufferColorMsaa, so these would all do the wrong thing if you toggled
MSAA on and them back off.

* Cleanup
2023-07-20 08:29:24 -07:00
Бранимир Караџић
485a258077 Updated version. 2023-07-19 20:54:37 -07: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
issam3105
e2c5b1d3e1 Fixed EGL library name on Linux (#3122)
* Fixed EGL library name on Linux

* Cleanup.

---------

Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-07-04 09:11:07 -07:00
Бранимир Караџић
e78fc5e6b6 Updated version number. 2023-07-01 08:38:29 -07:00
Бранимир Караџић
93815ab7c7 Cleanup. 2023-06-26 21:16:17 -07:00
Branimir Karadžić
d6a251670a Fixed build. 2023-06-26 20:10:25 -07:00
Бранимир Караџић
b74da5c643 GL: Removed GLX context code. 2023-06-26 19:18:49 -07:00
issam3105
e8eb9782fa Support OpenGL on EGL (#3115)
Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
2023-06-26 17:06:00 -07:00
Бранимир Караџић
c913c2e76a Updated version. 2023-06-24 09:55:36 -07:00
Бранимир Караџић
0418da686a Updated version. 2023-06-24 08:27:42 -07:00