Commit Graph

3254 Commits

Author SHA1 Message Date
Бранимир Караџић
bd696118bb Fixed warning. 2022-09-18 19:24:08 -07:00
Бранимир Караџић
e4be44e92b Updated API version. 2022-09-18 19:11:58 -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
Бранимир Караџић
d30032984b D3D9: Enable compilation on Linux. 2022-09-17 19:59:35 -07:00
Бранимир Караџић
7ffeaefad2 API version 116. 2022-09-17 18:18:51 -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
Бранимир Караџић
c0a7e838b3 D3D11: Enable texture format enumeration on Linux. 2022-09-15 23:29:27 -07:00
Бранимир Караџић
4faed7cc2b Cleanup. 2022-09-15 22:26:41 -07:00
Бранимир Караџић
4c0baf5603 D3D11: Enable compilation on Linux. 2022-09-15 22:13:34 -07:00
Бранимир Караџић
a88c7629c3 Fixed build. 2022-09-15 09:33:44 -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
Бранимир Караџић
cb439deae3 Updated version number. 2022-09-02 08:11:05 -07:00
Бранимир Караџић
c163482a57 Updated version number. 2022-08-26 21:34:06 -07:00
Бранимир Караџић
72cbe83275 Removed bgfx::setPlatformData usage from entry example harness. 2022-08-25 20:07:03 -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
Sandy
561e91a62b
opengl: Implement texture swizzle mapping (#2892)
* opengl: Implement texture swizzle mapping

* imageformats: Fix compilation on android

Android GLES does not have a definition for GL_BGR: Swizzle instead.
2022-08-25 06:54:57 -07:00
Sandy
30f2920ae5
egl: Fix narrowing warning/error (#2891) 2022-08-24 14:31:55 -07:00
云风
8207645355
fix getUniformInfo(), See Issue #2883 (#2885) 2022-08-23 19:53:49 -07:00
Бранимир Караџић
6cb74deed4 VK: Fixed GPU selection. 2022-08-23 08:28:29 -07:00
Sandy
536c4cdbf5
Texture format info: Invert R and B in R5G6B5 (#2886)
d3d9: Do software conversion to take advantage of B5G6R5.
d3d11: Do software conversion to take advantage of B5G6R5.
gl: Set internal representation to swap R and B.
metal: Swizzle R and B and remove software conversion.
2022-08-23 06:46:56 -07:00
Branimir Karadžić
89e1e3b14e Fixed warning. 2022-08-22 20:14:42 -07:00
Branimir Karadžić
cea9c033fc D3D12: Fixed R5G6B5 format. 2022-08-22 20:14:34 -07:00
Sandy
c334d7c8f1
metal: Fix BGR to RGB swizzle (#2879) 2022-08-22 19:42:19 -07:00
Sandy
054a9ecd83
Texture format info: Invert R and B in RGBA4 (#2878)
* texture format info: Invert R and B in RGBA4

d3d9: Revert 06c08adc9e to force software
      conversion because the format doesn't exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert 3e3e655262 to swizzle R and B
mtl: Swizzle channels

* metal: Remove explicit conversion of RGBA4 and RGB5A1 in osx

* metal: Set alpha bit to correct end of short
2022-08-22 19:03:22 -07:00
Бранимир Караџић
31c92ece0a VK: Fixed A8 format. 2022-08-22 19:02:57 -07:00
Sandy
58aeeaf155
texture format info: Invert R and B in RGB5A1 (#2876)
d3d9: Revert 76db2ed38d to force software
      conversion and use the format that does exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert b36aa71403 to swizzle R and B
mtl: Swizzle R and B
2022-08-22 17:36:50 -07:00
Бранимир Караџић
2d313f46ad Cleanup. 2022-08-21 16:26:45 -07:00
Paul Gruenbacher
f99f972c17
Fix invalid boolean logic of texture validation (#2871)
I noticed that this 0363560934
broke b5e7a4cccd/examples/16-shadowmaps/shadowmaps.cpp (L1750)
which shouldn't be the case. The validation was meant for only multisample flags.
my boolean logic assumes that it must be BGFX_TEXTURE_RT in the flag or BGFX_TEXTURE_RT_MSAA_XX in the flag.
2022-08-20 18:04:10 -07:00
Бранимир Караџић
b5e7a4cccd MTL: Added texture format component mapping from PR #2869. 2022-08-20 09:31:53 -07:00
Бранимир Караџић
ec00fa1bc2 GL: Added component mapping stub. 2022-08-19 19:11:13 -07:00
Branimir Karadžić
186c95fd29 D3D12: Added texture format component mapping from PR #2869. 2022-08-19 18:50:02 -07:00
Branimir Karadžić
99770c9f43 Overallocate dynamic buffers on resize. 2022-08-19 18:21:11 -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
Бранимир Караџић
67f27573b9 Cleanup. 2022-08-19 10:40:00 -07:00
Branimir Karadžić
b35b3fa2a7 Fixed dynamic buffer leak. Issue #2867. 2022-08-19 09:51:23 -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
Branimir Karadžić
0363560934 Added depth MSAA texture validation. Issue #2862. 2022-08-17 17:00:21 -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
6aad365c9e
Enable MSAA setting at context creation for Android (#2854) 2022-08-04 06:51:38 -07:00
Cedric Guillemet
bedab93431
Fix D3D12 InputSlot when having streams w/ instances (#2853) 2022-08-03 08:02:03 -07:00
Бранимир Караџић
484a5f0c25 Updated version number. 2022-07-23 10:59:37 -07:00
Бранимир Караџић
e34ae05cdf Cleanup. 2022-07-19 10:36:18 -07:00