Commit Graph

464 Commits

Author SHA1 Message Date
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
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
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
Jamil Halabi
f059531885 Added a new capability to check for PrimitiveID support (#3154) 2023-08-04 16:42:33 +02:00
Andy Fillebrown
5ae4386bf0 Fix D3D12 clear rect not being passed to frameBuffer.clear (#3113) 2023-06-23 20:12:04 -07:00
Branimir Karadžić
cd4f64b643 Issue #3093. 2023-05-05 19:22:44 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
HumanBean4
9cc4d85b69 Fixed texture side iterator being too small (#3026) 2023-01-19 07:16:28 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Branimir Karadžić
eb7f79c358 D3D12: Fixed setting draw scissor. 2022-12-22 20:21:39 -08:00
Branimir Karadžić
7911b10c07 D3D12: Probe highest version of device. 2022-12-08 18:57:42 -08:00
Branimir Karadžić
6d08be28f7 D3D12: Dump all feature support options. 2022-12-03 09:22:27 -08:00
Бранимир Караџић
ab207b67a4 D3D12: Fixed R16U format. #2987 2022-12-01 16:45:55 -08: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
Бранимир Караџић
a855f1cf2d Cleanup. 2022-10-07 17:30:27 -07:00
Ciro Mondueri
bf411dd393 d3d12: fixes triangle list primitive state change not ackd. after touch call (#2951)
Suppose this is the draw call sequence in a frame:
- triangle strip
- touch (required to apply stencil changes for example)
- triangle list

Touch masks the change (as it's triangle list by default) by setting
changedFlags, but not primIndex. When the triangle list is processed,
the STATE_PT is already set to triangle list, so the test for
changedFlags is skipped and primIndex stays with triangle strip.

The fix detects the change in the STATE_PT and updates primIndex.
2022-10-07 17:28:18 -07:00
Бранимир Караџић
8a405a0c73 Improved internal handle. 2022-10-05 21:10:19 -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
Branimir Karadžić
408988946d Cleanup. 2022-09-16 20:12:31 -07:00
Бранимир Караџић
cbbaba4099 Cleanup. 2022-09-16 19:32:41 -07:00
Бранимир Караџић
4c0baf5603 D3D11: Enable compilation on Linux. 2022-09-15 22:13:34 -07:00
Бранимир Караџић
9ad3825cee D3D12: Linux build. 2022-09-14 20:59:59 -07:00
Branimir Karadžić
11ac9f27c7 D3D12: Removed dependency on D3DX12 header. 2022-09-13 22:03:20 -07:00
Branimir Karadžić
358f48879a Updated directx-headers. 2022-09-12 20:19:21 -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
Branimir Karadžić
cea9c033fc D3D12: Fixed R5G6B5 format. 2022-08-22 20:14:34 -07:00
Branimir Karadžić
186c95fd29 D3D12: Added texture format component mapping from PR #2869. 2022-08-19 18:50:02 -07:00
Бранимир Караџић
2449610af7 Revert "Resolve texture format correctly on D3D11/D3D12 (#2859)" (#2865)
This reverts commit 8358bf6ecf.
2022-08-17 16:44:30 -07:00
Julian Xhokaxhiu
8358bf6ecf Resolve texture format correctly on D3D11/D3D12 (#2859)
* D3D12: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.

* D3D11: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.
2022-08-09 11:37:44 -07:00
Cedric Guillemet
bedab93431 Fix D3D12 InputSlot when having streams w/ instances (#2853) 2022-08-03 08:02:03 -07:00
James Fulop
d9cdc67993 add missing semicolon (#2751) 2022-03-30 07:26:40 -07:00
Branimir Karadžić
da9e2f0400 D3D12: Fixed texture array update. 2022-03-05 16:44:56 -08:00