Commit Graph

675 Commits

Author SHA1 Message Date
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
Бранимир Караџић
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
Kitchen
14f8a097fc fix error when create backbuffer with msaa and srgb format (#2258) 2020-09-07 08:05:33 -07:00
云风
03871f12db fix gcc warnings (#2253) 2020-09-01 20:49:08 -07:00
Elliot Cuzzillo
9991b63259 improve explanatory comment about _SRGB backbuffers (#2230) 2020-08-13 16:00:35 -07:00
Elliot Cuzzillo
8244fdf54d only use srgb views into non-srgb backbuffers to enable flip presentation model (#2229) 2020-08-13 15:45:45 -07:00
Бранимир Караџић
825ce15d1f Cleanup. 2020-07-27 21:55:54 -07:00
Gary Hsu
34fbc579ea Fix some uninitialized variables (#2182) 2020-06-24 15:44:43 -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
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
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
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
de4e62692d Don't clear RTVs/DSVs after creating them 2020-02-20 05:00:04 +00:00
Justin Murray
248c7a88df Modified CreateShaderResourceView() calls to use descriptiors from prior SRVs to handle cases where SRV format cannot be directly deduced from texture format. This happens when using D3D11's typeless texture formats, which can be introduced into a BGFX app using overrideInternal. 2020-02-11 03:19:58 +00:00
Attila Kocsis
8a3786c59c Added desciption labels to 08-update
Added row of cubes whose compressed texture is created with empty content then updated using bgx::updateTexture2D.

Fixed default srcPitch in d3d11 renderer for compressed textures.
2020-02-07 07:23:17 -08: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
Gary Hsu
9ec0fd243a Fix D3D11 exception with srgb backbuffer 2019-11-15 15:06:11 -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
Nikolaos Patsiouras
d9110344b0 * Fixed integer overflow when allocating space for very large textures. 2019-06-22 22:45:19 +03: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
Branimir Karadžić
0c2b720f8e Cleanup. 2019-03-07 09:39:19 -08:00
raizam
765c8d2768 d3d11 fix 2019-03-07 17:33:05 +01:00
Branimir Karadžić
1b9dd14683 Fixed framebuffer RW. 2019-02-18 13:40:17 -08:00
Бранимир Караџић
1ee30e6d50 Cleanup. 2019-02-18 10:37:42 -08:00
Бранимир Караџић
e3e7e9aaf4 Cleanup. 2019-02-17 09:03:09 -08:00
Hugo Amnov
58563b0b1b FrameBuffer Read/Write access WIP 2019-02-17 16:50:26 +01:00
Бранимир Караџић
4c899553e3 Cleanup internal profiler. 2019-02-15 16:45:35 -08:00
Бранимир Караџић
dd10b04651 Fixed texture array frame buffer. 2019-02-07 18:02:48 -08:00
attilaz
8aff45398a clearquad uses uniform update instead of vertex update 2019-02-04 17:42:28 +01: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
Branimir Karadžić
200778511e Cleanup. 2019-01-24 20:35:09 -08:00
Бранимир Караџић
b5eec85631 D3D11: Fixed skip mip for 3D textures. 2019-01-22 18:34:56 -08:00
Бранимир Караџић
a0c2907c22 Added internal debug names for index/vertex buffers, shaders, and textures. 2019-01-22 14:45:33 -08:00
Branimir Karadžić
33ececeb96 Fixed PR #1595. 2019-01-16 21:30:58 -08:00