Commit Graph

496 Commits

Author SHA1 Message Date
Branimir Karadžić
331783cf9a Renamed bx::uint32_min/max/clamp/cntlz/cnttz/mod to typed equivalents. (#3692) 2026-04-27 04:19:08 +00:00
Branimir Karadžić
50bf41b224 Fixed stremMask check. (#3682) 2026-04-21 11:21:40 -07:00
Branimir Karadžić
4481b9b46b Cleanup. (#3674) 2026-04-19 16:49:37 +00:00
Vincent Bousquet
d0def7d137 DX12: use discard instead of sequential flip (#3667) 2026-04-19 16:46:31 +00:00
Branimir Karadžić
c5df1d91e8 Cleanup. (#3669) 2026-04-18 06:11:44 +00:00
Branimir Karadžić
0b0ddb7f6b Added generate mips on frame buffer resolve. (#3664) 2026-04-17 05:04:57 +00:00
MatthewBeshay
a2d3c83f0d Fix D3D12 fragment shader constant buffer misalignment (#3663)
The fragment shader CBV address was computed as gpuAddress + vsh->m_size,
but D3D12 requires constant buffer view addresses to be 256-byte aligned
(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT). When the vertex shader
constant buffer exceeds 256 bytes without being a multiple of 256, the
fragment shader reads from a misaligned address, producing corrupt uniform
values.

This causes rendering artifacts or completely black output for any shader
program where the VS constant buffer size is not a multiple of 256 bytes,
since the fragment shader receives incorrect uniform data (e.g. a non-zero
alpha reference threshold that discards all pixels).

The fix aligns the VS constant buffer size to 256 bytes before placing the
FS constants, and uses the aligned offset when computing the FS CBV address
in both the main render loop and the blitter path.
2026-04-15 21:10:01 +00:00
Vincent Bousquet
e9a4f671bc DX12: fix invalid state when creating a BLIT_DST texture without mem block (#3656)
* DX12: fix invalid state when creating a BLIT_DST texture without mem block

* Only set state when it's not external texture.

---------

Co-authored-by: Branimir Karadžić <branimirkaradzic@gmail.com>
2026-04-14 23:28:37 +00:00
Vincent Bousquet
173be4d0fa DX12: fix blitting inside a texture 2D array (#3657) 2026-04-09 21:21:17 +00:00
Branimir Karadžić
7c0d813b83 Remove unused shader parsers. (#3651)
* Removed shader parsers.

* Removed shader parsers.
2026-04-05 02:54:27 +00:00
Branimir Karadžić
a73c12db8f Added bgfx::AttribType::Int8/Uint16. (#3626) 2026-03-09 06:13:51 +00:00
Branimir Karadžić
91814c9729 Added flag for texture formats that can be used as back-buffer format. (#3605) 2026-02-22 02:44:26 +00:00
Branimir Karadžić
856208328c Use back buffer format when capturing screen shot. (#3603) 2026-02-20 00:46:41 +00:00
Branimir Karadžić
40e614c45d Added external texture parameter. (#3596)
* Added external texture parameter.

* Use uint64_t instead of uintptr_t for external texture because VkImage is always 64-bit.
2026-02-18 20:12:37 +00:00
Seremo
c5387cfec2 DX11/DX12: Fix detecting depth capabilities for BGFX_CAPS_FORMAT_TEXTURE_MSAA (#3562) 2026-01-22 18:34:12 +00:00
Branimir Karadžić
f4b6bc79e2 D3D12: Fixed texture update crash. (#3560) 2026-01-21 20:31:19 +00:00
Branimir Karadžić
33541e4bab D3D12: Added DXIL support. (#3558)
* Added DXIL support.

* Fixed Linux build.

* Fixed mingw build.

* Fixed build.
2026-01-20 01:43:31 +00:00
Branimir Karadžić
4baed6e076 Happy New Year! (#3550) 2026-01-14 16:26:51 +00:00
Branimir Karadžić
d9d99f51ad D3D12: Added pipeline stats. (#3534) 2026-01-07 04:44:12 +00:00
Branimir Karadžić
241e9c3330 Added Init.fallback option. Cleanup. (#3522) 2025-12-24 04:29:32 +00:00
Branimir Karadžić
f510ab6db8 Cleanup. (#3501) 2025-11-20 03:13:42 +00:00
Branimir Karadžić
a617e13eeb D3D12: Fixed crash when PIX is not present. (#3489) 2025-11-11 23:34:13 +00:00
Branimir Karadžić
9e8ecf4af4 Added EAC texture formats. (#3487) 2025-11-11 08:39:24 -08:00
Branimir Karadžić
35911ac2d9 Added uniform frequency. (#3485)
* Added uniform frequency.

* Cleanup.

* Cleanup.
2025-11-10 23:41:33 +00:00
Бранимир Караџић
358223c63e Added variable rate shading. 2025-11-06 17:21:53 -08:00
Branimir Karadžić
bcf89eb860 Cleanup. 2025-11-01 21:53:14 -07:00
Бранимир Караџић
f51e393d7b Cleanup. 2025-10-31 08:50:20 -07:00
Branimir Karadžić
5d8eb6d67c Cleanup. 2025-10-31 08:44:02 -07:00
Бранимир Караџић
959cab248e Added ability to configure backbuffer depth/stencil. 2025-10-29 12:10:41 -07:00
Бранимир Караџић
cd3749dac9 Cleanup. 2025-10-25 22:18:15 -07:00
Gary Hsu
e7c2c69edb Add optional layerIndex argument to overrideInternal (#3477)
* Add optional layerIndex argument to overrideInternal

* Run genie idl
2025-10-26 05:12:34 +00:00
Branimir Karadžić
739d12a962 Cleanup. 2025-10-24 12:22:18 -07:00
Branimir Karadžić
66af8692bc D3D12: Show GPU stats. 2025-10-23 23:17:45 -07:00
Branimir Karadžić
f3cab4d2d8 Detect nVidia Nsight debugger presence. 2025-10-23 10:06:24 -07:00
Branimir Karadžić
0cbd4b5c51 Fixed build. 2025-10-22 15:35:19 -07:00
Branimir Karadžić
e15154513c Updated PIX headers to 1.0.240308001.
https://www.nuget.org/packages/WinPixEventRuntime
2025-10-22 14:36:38 -07:00
Martijn Courteaux
abe193a407 Fix UniformBuffer UB regarding UniformType::Enum with extra bits. (#3398) 2025-01-28 09:58:22 -08:00
Бранимир Караџић
860bafb23f Happy New Year! 2025-01-13 15:45:40 -08:00
Бранимир Караџић
896c610b72 Removing alloca compat include. 2024-12-21 19:25:00 -08:00
Бранимир Караџић
042ebe8814 Cleanup. 2024-12-07 22:49:45 -08:00
Бранимир Караџић
69acf28813 Cleanup. 2024-11-21 07:34:58 -08:00
Daniel Kalmar
eaec8ddf3b Fix a crash in renderer_d3d12.cpp (#3349)
If querying the debug1 interface fails, don't attempt to release it.
2024-08-31 11:15:28 -07:00
Daniel Kalmar
ff1fa8dd39 Use the correct options enum when checking D3D12 features. (#3346) 2024-08-28 09:21:59 -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
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
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
Бранимир Караџић
e9e2e224ee Replaced macros with C++17 attributes. 2023-12-02 20:16:56 -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