Commit Graph

2943 Commits

Author SHA1 Message Date
Бранимир Караџић
ad062bde3c Fixed #2301: Vertex layout leak. 2020-10-30 11:37:05 -07:00
Бранимир Караџић
fa97a50df0 VK: GPU timer stub. 2020-10-19 19:30:39 -07:00
Бранимир Караџић
6e86a2f074 Updated version number. 2020-10-19 07:31:29 -07:00
Бранимир Караџић
f953605343 Updated version number. 2020-10-17 22:52:29 -07:00
generalzzd
0cce398530 generalzzd fix ios compling error (#2288)
Co-authored-by: Zidi <zzd007@hotmail.com>
2020-10-17 20:02:25 -07:00
Бранимир Караџић
eae703399b Updated version number. 2020-10-14 07:14:51 -07:00
Бранимир Караџић
eaddeb98fa Cleanup. 2020-10-11 20:55:01 -07:00
pheonix
13bbf02a67 Vulkan API version auto selector (#2283)
* [vulkan] Vulkan API auto-selection for latest available.
- Selects for the maximum vulkan API version available on the host's vulkan driver for a created instance.
- Stores the created instance's vulkan API version on RendererContextVK.
- Created instance's vulkan API version dumped using BX_TRACE in MAJOR.MINOR.PATCH format.
- Physical Device's vulkan API version dumped in MAJOR.MINOR.PATCH format.

* Address code review notes.
- Actually use `vkEnumerateInstanceVersion` if it exists.
- Remove "bgfx supported" vulkan api static array.
2020-10-11 20:38:57 -07:00
Бранимир Караџић
8c2b99d81e Cleanup. 2020-10-09 20:50:03 -07:00
Бранимир Караџић
a94c5d7052 Updated version number. 2020-10-09 20:47:59 -07:00
Бранимир Караџић
3a8e0e2bb1 Fixed blit on cubemaps. 2020-10-09 20:47:50 -07:00
pezcode
09c11bca29 Mip + blit fixes (#2281)
* D3D12: Fix readback for non-zero mip

* Fix blit with non-zero mip

This required clamping the blit extents to the mip size, which is moved out of the renderers now

* Assert formatting
2020-10-09 15:32:50 -07:00
Бранимир Караџић
7f2861eceb Updated version number. 2020-10-09 13:07:58 -07:00
pezcode
2829df055c Vulkan: Add texture readback (#2280)
* Vulkan: Add texture readback support

* Vulkan: Simplify screenshot code
2020-10-09 13:05:44 -07:00
Бранимир Караџић
5453faacf1 Fixed issue #2279. 2020-10-09 09:52:00 -07:00
pezcode
3142be44a5 D3D12: Fix readback src pitch calculation (#2278) 2020-10-08 16:47:29 -07:00
Бранимир Караџић
e878147cf9 Added version info to debug stats. 2020-10-05 19:45:22 -07:00
Бранимир Караџић
766ab668f8 Updated version number. 2020-10-05 10:17:31 -07:00
MooZ
9d369ab4a0 Fixed msaa for OpenGL ES targets. (#2277) 2020-10-05 10:17:01 -07:00
kingscallop
436b7fab9e Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119)
* Adds UAV support for D3D12, Vulkan and reworked support for OpenGL, D3D11

UAV support is now uniform across compute and draw.
To set a UAV you just use bgfx::setImage() and IMAGE2D in the shader, just like in compute.
Due to these changes shaders will have to be recompiled.

The changes include:
	- D3D11 requires patching of the UAV slot number (which is now done by modifying the DXBC instead of using a macro)
	- If the DXBC binary includes a debug chunk, that is also patched to match the new slot number
	- All the other renderers don't need any kind of patching
	- There are some shader annotations to better convert the UAV format used in hlsl to spirv

Possibility of further enhancements:
	- bgfx::setViewFrameBuffer() only supports binding to a framebuffer or, using BGFX_INVALID_HANDLE, to bind the default backbuffer. This doesn't allow for the case where there is no need to bind to either one of them, for example when using a fragment shader only to read and write to an UAV.

* Bump shader version, because they need to be recompiled.
2020-10-04 21:51:41 -07:00
Бранимир Караџић
32aa281147 Cleanup. 2020-10-04 15:01:05 -07:00
Branimir Karadžić
082b71676c Cleanup. 2020-10-04 14:23:33 -07:00
Бранимир Караџић
a1d12fe7f3 Cleanup. 2020-10-04 14:23:00 -07:00
Julian Xhokaxhiu
2c38e090d2 Various Vulkan/Direct3D 12 enhancements (#2246)
* [VK] Add RT MSAA support

* [VK] Add GenerateMips support

* [VK] Add Screenshot feature

* [D3D12] Add MSAA RT support

* [VK] Fix blit operation on MSAA RT textures

* [D3D12] Fix blit operation on MSAA RT textures
2020-10-04 14:21:12 -07:00
Бранимир Караџић
ffb2518d5a Cleanup. 2020-09-28 10:05:18 -07:00
Christophe Dehais
816026a8bf Add blitting fallback for OGL (#2269)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
2020-09-28 09:53:37 -07:00
Бранимир Караџић
942daad4e4 Fixed OSX build. 2020-09-17 08:31:03 -07:00
Бранимир Караџић
d402810fcf Fixed webgl build. 2020-09-17 08:30:01 -07:00
Бранимир Караџић
9b7f950cd6 Cleanup. 2020-09-16 20:03:04 -07:00
Бранимир Караџић
cce003c99f Fixed warning. 2020-09-16 09:12:09 -07:00
Бранимир Караџић
fa826a4935 Fixed webgl build. 2020-09-16 09:11:15 -07:00
Бранимир Караџић
4c0b7621d9 Fixed Encoder allocation alignment. 2020-09-14 09:30:33 -07:00
Kitchen
aa24588800 fix d3d12 error when create backbuffer with msaa and srgb format (#2261) 2020-09-09 19:29:00 -07:00
云风
95b4e6eaa5 Use getResourceDesc instead of GetDesc, See #1239 (#2260)
* Use getResourceDesc instead of GetDesc, See #1239

* Fix MSAA on d3d12
2020-09-09 05:52:13 -07:00
Branimir Karadžić
2996246a90 Cleanup. 2020-09-08 07:42:03 -07:00
Kitchen
14f8a097fc fix error when create backbuffer with msaa and srgb format (#2258) 2020-09-07 08:05:33 -07:00
Бранимир Караџић
86402fec24 Updated version number. 2020-09-05 11:24:50 -07:00
Бранимир Караџић
d1685a366a Fixed build. 2020-09-03 23:45:20 -07:00
Бранимир Караџић
8f4750b199 Cleanup. 2020-09-02 20:43:47 -07:00
云风
03871f12db fix gcc warnings (#2253) 2020-09-01 20:49:08 -07:00
云风
2480ea3dbe avoid gcc warnings: cast-function-type (#2252) 2020-09-01 20:20:03 -07:00
云风
0e1c095c3b add *_with_layout APIs (#2251) 2020-09-01 20:19:14 -07:00
云风
4d6445896e Add missing VertexLayoutHandle for C APIs (#2249) 2020-09-01 08:36:52 -07:00
Бранимир Караџић
e272a31e19 Better frame buffer validation. 2020-08-27 12:42:37 -07:00
Doug Binks
ab036d2a05 Add support for non main thread rendering for WGL and NSGL when developer provides context (#2241)
* WGL support for passing a context when using renderFrame on non main thread

* NSGL support for passing a context when using renderFrame on non main thread

* WGL: Moved no window warning and added check prior to calling GetDC
2020-08-25 07:47:46 -07:00
Бранимир Караџић
f20fd61e4f Revert "[ VK/DX12] Bring setScissor on par with the other renderers (#2239)"
This reverts commit fbd7e9efd6.
2020-08-22 09:10:49 -07:00
Julian Xhokaxhiu
fbd7e9efd6 [ VK/DX12] Bring setScissor on par with the other renderers (#2239) 2020-08-22 09:09:11 -07:00
kingscallop
b297b48e88 Vulkan validation fixes (#2205)
When resizing the window, there's a race condition between the
validation of vkCreateSwapchainKHR's arguments and the actual
size of the window.
This ignores the validation warning when vkCreateSwapchainKHR succeeds.

On some graphic drivers vkAcquireNextImage and vkQueuePresentKHR
may return VK_SUBOPTIMAL_KHR. This is being handled as an error, which
leads to those frames being unnecessarily skipped.
2020-08-16 21:08:32 -07:00
kingscallop
cb8f6dfcec Fixes example 08 when using OpenGL (#2233)
This example was broken on Windows and Linux when using OpenGL.
The code path when using immutable compressed textures was wrong.
2020-08-16 11:42:42 -07:00
Elliot Cuzzillo
9991b63259 improve explanatory comment about _SRGB backbuffers (#2230) 2020-08-13 16:00:35 -07:00