Commit Graph

395 Commits

Author SHA1 Message Date
Бранимир Караџић
e878147cf9 Added version info to debug stats. 2020-10-05 19:45:22 -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
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
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
Бранимир Караџић
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
James Fulop
276598ad50 fixes for d3d12 texture update (#2220)
---
* support for compressed textures
* support for emulated textures
* fix for incorrect copyable footprint dims
2020-07-28 07:49:22 -07:00
Бранимир Караџић
006548e00f Fixes for D3D12 on Linux. 2020-07-02 19:50:09 -07:00
Бранимир Караџић
d86c16213e Cleanup. 2020-06-18 21:20:01 -07:00
Бранимир Караџић
2cbcb6ea90 RRenamed BX_CHECK to BX_ASSERT. 2020-06-16 10:06:18 -07:00
Hugo Amnov
49687638ef Remove some code duplication in D3D12 (#2144) 2020-05-31 13:22:21 -07:00
Бранимир Караџић
2928ba8c07 Fixed build. 2020-05-15 17:15:35 -07:00
Hugo Amnov
8ee6654695 Cleanup dead code (#2143) 2020-05-15 13:35:38 -07:00
Hugo Amnov
b62302631e Add Webgpu backend (#2132)
* WebGPU first draft (shaderc bin version 8)

* WebGPU scripts
2020-05-08 08:53:53 -07:00
Бранимир Караџић
36ec2a462d Removed alignment macros, and added functions instead. 2020-04-19 18:23:04 -07:00
Бранимир Караџић
aeec903fc3 Fixed #2102. 2020-04-07 15:58:25 -07:00
Pablo Escobar
1b85139371 Revert "Remove debug label quotes"
This reverts commit 08b3ec5814.
2020-04-03 21:56:54 +00:00
Pablo Escobar
fdcdeae23a Remove debug label quotes 2020-04-03 21:56:54 +00:00
Бранимир Караџић
126a3fa6da Fixed issue #2072. 2020-03-21 20:42:10 -07:00
Minmin Gong
68e27b6655 Fix a couple framebuffer related bugs in D3D renderer
1. A crash in D3D11 renderer when create a texture with flag BGFX_TEXTURE_RT_WRITE_ONLY then override it, bcause m_srv is NULL.
2. In headless mode, RendererContextD3D12::m_swapChain is NULL, clear it resulting a D3D12 debug error
2020-02-27 04:59:35 +00:00
Minmin Gong
ca509c136d Store the command queue into device in D3D12 renderer 2020-02-27 04:58:27 +00:00
Minmin Gong
de4e62692d Don't clear RTVs/DSVs after creating them 2020-02-20 05:00:04 +00:00
Minmin Gong
141aae44cd Fix the sRGB support in D3D12 renderer 2020-02-20 04:59:03 +00:00
Minmin Gong
ccdd6676ca Implement the overrideInternal in D3D12 renderer 2020-02-13 07:11:47 +00:00
Cedric Guillemet
b4cac17b93 default parameters 2020-01-21 09:11:53 -08:00
Cedric Guillemet
4b83e0f5bc discard flags 2020-01-21 09:11:53 -08:00
Бранимир Караџић
82f56b5987 Happy New Year! 2020-01-14 21:37:06 -08:00
Cedric Guillemet
6a883a33fd Front facing (#1904)
* Added BGFX_STATE_FRONT_CCW to defines.h and implemented initial usage only in renderer_d3d11.cpp.

* set front facing for d3d12, gl metal and vulkan

* front facing method Metal

* tabs

* removed tab
idl updated
2019-10-25 20:07:05 -07:00
Бранимир Караџић
ff7497fb3e Fixed build. 2019-08-17 17:58:49 -07:00
Leandro Freire
1db46f4fe6 Rename variables and constants 2019-08-17 12:32:16 -07:00
Leandro Freire
855623e153 Rename VertexDecl to VertexLayout 2019-08-13 18:42:01 -07:00
Bastien Brunnenstein
e9ad3a6eba Use SRGB texture format on backbuffer when MSAA is enabled 2019-06-13 23:51:22 +02:00
Бранимир Караџић
29cd7d69c7 Cleanup. 2019-05-23 17:56:25 -07:00
Hugo Amnov
594cc27a65 Implement aliasing vertex buffer with different vertex declaration. 2019-04-16 18:19:55 +02:00
Бранимир Караџић
a1c39c7190 Cleanup. 2019-03-27 09:58:11 -07:00
Jan-Eric Duden
e4f0d6893a FIX asan error (false positive). Use of bx::uint32_cnttz with 0 results in undefined value. 2019-03-27 16:40:41 +01:00
Бранимир Караџић
a25c6b0649 Cleanup. 2019-02-20 17:20:59 -08:00
Branimir Karadžić
464a555101 texturev: Added winapi support for openFileSelectionDialog. 2019-02-19 22:42:46 -08:00
Бранимир Караџић
316b610d96 Cleanup. 2019-02-19 17:54:02 -08:00
Бранимир Караџић
4c899553e3 Cleanup internal profiler. 2019-02-15 16:45:35 -08:00
Бранимир Караџић
b9910211de Cleanup. 2019-02-13 10:28:49 -08:00
Branimir Karadžić
afd8145569 D3D12: Fixed texture array frame buffer. 2019-02-11 11:49:44 -08:00
Бранимир Караџић
dd10b04651 Fixed texture array frame buffer. 2019-02-07 18:02:48 -08:00
Бранимир Караџић
9054588331 Fixed texture mip mismatch. 2019-01-30 17:43:28 -08:00
Branimir Karadžić
001cfa1ba1 Cleanup. 2019-01-29 20:46:55 -08:00
Бранимир Караџић
ec4b823db7 Fixed skip mips when crating BC textures. 2019-01-29 17:43:57 -08:00
Бранимир Караџић
17a620a609 Cleanup. 2019-01-25 17:18:30 -08:00
Sean Burgoon
3e517c5f1b Fixed missing paren on line 2227 for WinRT
WINRT version doesn't compile due to typo
2019-01-25 00:01:53 -08:00
Branimir Karadžić
200778511e Cleanup. 2019-01-24 20:35:09 -08:00