Commit graph

307 commits

Author SHA1 Message Date
Branimir Karadžić
8ef8cd5d0e Cleanup. 2015-08-19 20:51:30 -07:00
Branimir Karadžić
1e66ff0440 Added DXSDK header files. 2015-08-19 18:33:56 -07:00
Branimir Karadžić
b4c5bc8e02 Cleanup. 2015-08-17 18:09:27 -07:00
Branimir Karadžić
fc26d1c91c Cleanup. 2015-08-16 16:14:12 -07:00
Branimir Karadžić
6d2e88567e Cleanup. 2015-08-16 15:44:53 -07:00
Branimir Karadžić
bc2077acb0 GL: Fixed GPU timer query. 2015-08-16 15:37:46 -07:00
Branimir Karadžić
d5d21b2a87 Cleanup. 2015-08-16 10:30:29 -07:00
Branimir Karadžić
63e10f3357 D3D11: Fixed compute image mip selection. 2015-08-15 18:07:43 -07:00
Branimir Karadžić
06a865cb7b D3D: Added state cache LRU. 2015-08-13 22:59:23 -07:00
Branimir Karadžić
38820fd732 Cleanup. 2015-08-12 12:24:30 -07:00
Branimir Karadžić
837b1f5461 D3D12: Added detection of sRGB texture formats. 2015-08-09 22:05:28 -07:00
Branimir Karadžić
e21d437c14 D3D1x: Ignore state creation debug messages. 2015-08-09 21:54:25 -07:00
Branimir Karadžić
f82f99b2a6 Fixed vertex attribute. 2015-08-07 11:37:52 -07:00
Branimir Karadžić
8da579ff99 Added vertex attrib Uint10. 2015-08-04 19:03:56 -07:00
Branimir Karadžić
6a0217bbf1 Fixed MinGW build. Issue #467, 2015-07-31 17:34:48 -07:00
Branimir Karadžić
5f59978e6b Added graceful error handling during initialization. 2015-07-30 18:36:12 -07:00
Branimir Karadžić
874ff3c155 DX11: DXGI debug layers. 2015-07-29 14:49:24 -07:00
Branimir Karadžić
1fa85ccf27 Replaced bgfx::setProgram function with bgfx::submit argument. Added bgfx::touch and bgfx::getStats. 2015-07-22 18:05:11 -07:00
Branimir Karadžić
921a315c4d Cleanup. 2015-07-16 20:28:43 -07:00
Branimir Karadžić
b98d3b6978 Added trace method to callback interface. 2015-07-16 17:39:02 -07:00
Branimir Karadžić
ff16073599 Fixed issue #445. 2015-06-30 19:40:49 -07:00
Branimir Karadžić
4cf393bed6 Fixed MinGW warning. 2015-06-25 16:33:56 -07:00
Branimir Karadžić
e84ecf6ee8 Fixed MSVC warning. 2015-06-24 10:20:01 -07:00
Branimir Karadžić
3eb0659898 Cleanup. 2015-06-22 20:45:50 -07:00
Branimir Karadžić
5e0948c7a8 Cleanup. 2015-06-21 20:00:00 -07:00
Branimir Karadžić
5ebe50c705 Cleanup. 2015-06-18 22:33:06 -07:00
Branimir Karadžić
c80cc04445 Removed mapped constant buffers (it doesn't improve performance). 2015-06-18 20:39:16 -07:00
Branimir Karadžić
faf3164ecb Fixed issue #436. 2015-06-17 10:04:12 -07:00
Branimir Karadžić
466c76071a Cleanup. 2015-06-05 10:43:43 -07:00
Branimir Karadžić
d2204e5cf2 Merge pull request #423 from mendsley/vr_viewportfix
VR: Fix skewed viewports with buffered eye textures
2015-06-05 09:14:19 -07:00
Matthew Endsley
05d70ea99d VR: Fix skewed viewports with buffered eye textures
Bug fix for #419

Viewport calculations need to take VR eye buffer size into
account. Noticable at the older 100px boundary. Skewing still
exists at newer 8px buffer, but is harder to notice.
Eventually causes pretty bad eye strain, though.

Easily reproduced by setting the buffer to something obscenely
large, such as 2048.
2015-06-05 02:12:24 -07:00
Matthew Endsley
9a1b1f892c VR: Properly support MSAA in OVR builds
Fixes #338

Create the swap chain without MSAA, and the eye textures
with MSAA. The core issue was using the surface description
for the backbuffer for the DSV on the eye textures which did
not match.

This meethod follows both the oculus and openvr guidance on MSAA -
MSAA is configured on the eye render targets, but not on the swap
chain.
2015-06-05 00:30:05 -07:00
Matthew Endsley
1e604e8f38 VR: Add device resolution to HMD. Init at startup.
BREAKING: bgfx::getHMD() now returns a valid pointer
if the VR runtime was initialized. This is different
from existing behavior where getHMD returned NULL until
a bgfx::reset(... BGFX_RESET_HMD) was issued. Applications
must now check HMD::flags for the current state of the VR
runtime. The following code has the code change required:

`const bgfx::HMD* hmd = bgfx::getHMD()
if (NULL != hmd)`
becomes:
`const bgfx::HMD* hmd = bgfx::getHMD()
if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDRERING))
{
	// rendering logic
}`

See the updated examples for details.

This allows applications to create the appropriately
sized back buffer for the HMD device by using the new device
resolution fields HMD::deviceHeight and HMD::deviceWidth.
These values report the pixel resolution of the attached
HMD hardware.

This also allows applications to query the reported HMD
resolution immediately after bgfx::init. This prevents
the device from being cycled which generates rendring
artifacts on startup - namely flashing back to a black
screen and reseting the Health+Warning disaply.

This involves initialization the ovrHmd device on
initialization, but deferring rendering until
postReset has been called. This adds an addiional
memory overhead of 32k to builds defining BGFX_CONFIG_USE_OVR.
The overhead for current builds is ~1.9MB for calls to
ovr_Initialize, so the additional overhead is pretty
trivial (+1.8%)
2015-06-03 15:39:09 -07:00
Branimir Karadžić
ff01992cb7 Refactored uniform types. 2015-05-28 15:27:00 -07:00
Miodrag Milanovic
b925007b9d Fix for MINGW compile (nw) 2015-05-27 12:27:00 +02:00
Mike Popoloski
b32fc0ec27 Fixing display bug when using flip-sequential swap effect. 2015-05-24 13:29:21 -04:00
Branimir Karadžić
c4231c9731 Added framebuffer support test. 2015-05-18 12:39:42 -07:00
Matthew Endsley
b124334343 Map/Unmap constant buffers instead of using UpdateSubResource
(XB1) Drops GPU Busy % on spiral from 65% to 20%

(PC) Drops bgfx::d3d11::RendererContextD3D11::commitShaderConstants
CPU usage by 95% (11.21%->0.66%)

(PC) Overall decreases bgfx::d3d11::RenderContextD3D11::submit CPU
usage by another 34% (27.18%->17.90%)
2015-05-17 13:08:33 -07:00
Branimir Karadžić
4b18beb082 Rollback #389. 2015-05-15 20:08:38 -07:00
Branimir Karadžić
e348c08ebe D3D11: Disable map constant buffers. 2015-05-15 19:48:36 -07:00
Branimir Karadžić
991a9604cb Merge branch 'master' of github.com:bkaradzic/bgfx 2015-05-15 16:49:59 -07:00
Branimir Karadžić
c957a3dd51 Fixed timer query. 2015-05-15 16:49:53 -07:00
Matthew Endsley
51875f88b0 Map/Unmap constant buffers instead of using UpdateSubResource
(XB1) Drops GPU Busy % on spiral from 65% to 20%

(PC) Drops bgfx::d3d11::RendererContextD3D11::commitShaderConstants
CPU usage by 95% (11.21%->0.66%)

(PC) Overall decreases bgfx::d3d11::RenderContextD3D11::submit CPU
usage by another 34% (27.18%->17.90%)
2015-05-15 13:38:43 -07:00
Branimir Karadžić
2a49e5a143 Added flush after render reset flag. 2015-05-15 13:14:35 -07:00
Branimir Karadžić
a8ef81ae4b D3D11: Force draw indirect UAV format to be uint32x4. 2015-05-14 14:38:53 -07:00
Branimir Karadžić
f5d0a39dd0 Added buffer compute format flags. 2015-05-14 11:37:32 -07:00
Branimir Karadžić
7d50012dbe Added GPU timer. 2015-05-12 17:03:25 -07:00
Branimir Karadžić
146829b057 Commenting out RenderDoc interface release. Issue #380. 2015-05-11 18:23:02 -07:00
Lars Viklund
b965f730c0 Create backbuffer RTVs honoring multisampling
When adding sRGB support for the backbuffer render target in D3D11,
the now explicitly specified RTV desc specifies a TEXTURE2D dimension.
For multisampled targets, this needs to be TEXTURE2DMS dimension.

This solves it by branching on the presence of MSAA in the reset flags but
could envisionably be obtained by looking at the desc of the backbuffer.
2015-05-10 01:14:43 +02:00
Branimir Karadžić
1aea6fc415 Detect RenderDoc presence when it's injected. 2015-05-08 11:49:18 -07:00