Commit graph

1027 commits

Author SHA1 Message Date
Branimir Karadžić
2e56304280 Fixed leak in single-threaded mode. 2015-05-19 15:52:47 -07:00
Branimir Karadžić
2048aef329 Cleanup. 2015-05-18 20:34:21 -07:00
Branimir Karadžić
11868f704a GLES31: Fixed image format test. 2015-05-18 20:24:37 -07:00
Branimir Karadžić
6b8964acf7 GL: Added image format test. 2015-05-18 14:35:05 -07: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
Mike Popoloski
ad9e9fe111 Adding missing C99 API methods. 2015-05-16 19:07:10 -04: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ć
cacb332b42 GL: Enabled texture check for all platforms. 2015-05-12 23:03:17 -07:00
Branimir Karadžić
8da183a2f1 Cleanup. 2015-05-12 17:25:09 -07:00
Branimir Karadžić
5e33eaf65b Merge pull request #384 from bullno1/color-texture-format-detection
Fix color texture format detection for webgl and gles < 3.0
2015-05-12 17:05:15 -07:00
Branimir Karadžić
e05eddce21 Merge branch 'master' of github.com:bkaradzic/bgfx 2015-05-12 17:03:32 -07:00
Branimir Karadžić
7d50012dbe Added GPU timer. 2015-05-12 17:03:25 -07:00
bullno1
0a3795ddfc Fix color texture format detection for webgl and gles < 3.0 2015-05-13 03:05:33 +08:00
Jonathan Young
ee5d73a328 Reset glPixelStorei GL_UNPACK_ROW_LENGTH to 0 after texture upload, if it's been changed. 2015-05-12 13:09:31 +10:00
Branimir Karadžić
146829b057 Commenting out RenderDoc interface release. Issue #380. 2015-05-11 18:23:02 -07:00
Branimir Karadžić
306b7060ca Cleanup. 2015-05-11 18:17:43 -07:00
Branimir Karadžić
1dd602dd83 EGL: Fixed compile error. 2015-05-11 14:27:38 -07:00
Branimir Karadžić
a40281ea23 Reverted MinGW info queue fix. Doesn't work with TDM64-1 4.9.2. Pull request #377. 2015-05-11 10:45:31 -07:00
Branimir Karadžić
e70ee88dc7 EGL: Initialize GLES2 when KHR_create_context is not available. 2015-05-10 11:45:49 -07:00
Branimir Karadžić
3afcd2c7c4 Merge pull request #377 from Leandros/mingw-patch-1
fix building under mingw32-w64
2015-05-09 20:16:23 -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
Arvid Gerstmann
3349d7334a fix building under mingw32-w64 2015-05-09 02:33:08 +02:00
Branimir Karadžić
1aea6fc415 Detect RenderDoc presence when it's injected. 2015-05-08 11:49:18 -07:00
Branimir Karadžić
916693c29b Fixed GLES 3.0+ build. 2015-05-08 10:39:56 -07:00
Branimir Karadžić
9e5e7d476b Cleanup. 2015-05-06 07:46:59 -07:00
Ka-ming Chan
e4c15eac32 fixed sRGB-texture related compile erros for gles 2.0 2015-05-06 21:04:12 +08:00
Branimir Karadžić
f3f302a20b GL: Create sRGB textures. D3D9: Enumerate sRGB textures. 2015-05-05 16:34:13 -07:00
Branimir Karadžić
d4cde9cbfa GL: Added sRGB texture caps. 2015-05-04 20:57:22 -07:00
Branimir Karadžić
bd17691a41 Added sRGB texture caps. 2015-05-04 17:23:11 -07:00
Branimir Karadžić
76fa899c22 Merge pull request #373 from MikePopoloski/srgb
sRGB Support
2015-05-04 16:31:24 -07:00
Branimir Karadžić
33dc15476b Updated RenderDoc header to v0.24. 2015-05-04 15:46:55 -07:00
Branimir Karadžić
d5c737924e Added back buffer depth stencil pointer to platform data. 2015-05-04 14:05:04 -07:00
Branimir Karadžić
088bd06b04 Updated C99 API. 2015-05-03 00:01:33 -07:00
MikePopoloski
d5923e25fe sRGB support for D3D9 2015-05-02 23:54:51 -04:00
MikePopoloski
8919b15468 Adding sRGB support for D3D11 and DDS. 2015-05-02 22:57:42 -04:00
Branimir Karadžić
a91232015f Fixed warning. 2015-05-01 15:12:44 -07:00
Branimir Karadžić
3b66dfa5e8 Added indirect compute dispatch. 2015-05-01 14:54:23 -07:00
Branimir Karadžić
d7e362f7dd Fixed warning. 2015-05-01 09:22:57 -07:00
Branimir Karadžić
b04af680ad GL: Added draw indirect support. 2015-04-30 18:06:41 -07:00
Branimir Karadžić
2194728394 GL: Draw indirect WIP. 2015-04-29 23:20:21 -07:00
Branimir Karadžić
3a0f46fe3f Fixed MinGW build. 2015-04-29 17:53:06 -07:00
Branimir Karadžić
d763196407 D3D11: Added draw indirect support. 2015-04-29 17:18:51 -07:00
Branimir Karadžić
80b6202ec0 Fixed switch without case warning. 2015-04-27 19:38:48 -07:00
Branimir Karadžić
38e6d2bbb3 GL: Fixed incomplete texture when using decompress fallback. 2015-04-26 15:23:33 -07:00
Branimir Karadžić
d804ca9023 Cleanup. 2015-04-26 11:34:33 -07:00
Mike Popoloski
9677f4a37c Updating C99 API to support scaled textures. 2015-04-26 10:18:44 -04:00
Mike Popoloski
36ca5cbd18 Exposing flags param for C99 buffer creation methods. 2015-04-26 10:18:43 -04:00
Branimir Karadžić
ae497c58bb Fixed OVR build. 2015-04-25 16:56:29 -07:00
Branimir Karadžić
e5ed5db1f1 Exposed software rasterizer. 2015-04-24 14:57:00 -07:00
Branimir Karadžić
5f9c6df918 Clear bgfx context in single-threaded mode. 2015-04-24 12:15:53 -07:00
Branimir Karadžić
72086ef80a Fixed issue #360. 2015-04-24 09:33:36 -07:00
Andrew Johnson
158799e79c Fixes error C4701 in renderer_d3d11.cpp on VC12 build
renderer_d3d11.cpp(687, 0): error C4701: potentially uninitialized local variable 'adapter' used
2015-04-23 08:14:29 -07:00
Branimir Karadžić
4e431c99db EGL: Fixed use extension use. 2015-04-22 21:39:20 -07:00
Branimir Karadžić
0aa27c112f D3D11: Fixed default settings for user created device. 2015-04-22 15:30:01 -07:00
Branimir Karadžić
0da98e8645 Fixed creation of GLES3 textures with compute write flag. 2015-04-22 15:11:45 -07:00
Branimir Karadžić
d1093eace8 Fixed build. 2015-04-22 00:22:18 -07:00
Branimir Karadžić
391d96f4d8 Cleanup. 2015-04-21 20:44:46 -07:00
Branimir Karadžić
eea21fede2 Enabling KHR_debug on GLES. 2015-04-21 20:30:31 -07:00
Branimir Karadžić
f246fd29fa Added texture caps flag for compute image formats. 2015-04-21 15:44:16 -07:00
Branimir Karadžić
ccb0f73308 Updated compute shader image formats. 2015-04-21 11:49:28 -07:00
Branimir Karadžić
db59a9d44d Enabled texture*Lod for vertex shaders in GLES3+. 2015-04-21 10:58:35 -07:00
Branimir Karadžić
a528554e67 Cleanup passing platform window/context data. 2015-04-20 16:22:40 -07:00
Branimir Karadžić
11794da949 Cleanup. 2015-04-18 00:39:57 -07:00
Ka-ming Chan
9e7e143f21 Add GLSurfaceView / external EGLContext support on Android by skipping the creation of BGFX's eglContext if g_bgfxAndroidWindow is set to NULL 2015-04-18 15:26:17 +08:00
Branimir Karadžić
62d2d744f9 Merge branch 'master' of github.com:bkaradzic/bgfx 2015-04-17 19:27:38 -07:00
Mike Popoloski
117571231a Fixing crash on WP8 ARM
The ViewState struct is so big that it blows out the stack on ARM devices. This change promotes it to a member variable.
2015-04-17 22:06:09 -04:00
James Darpinian
b54d33cdf7 Initialize Oculus pose after reset.
Without this change the pose is uninitialized during the first frame which causes Oculus timewarp to warp the output in crazy ways.
2015-04-17 11:03:41 -07:00
James Darpinian
8a689fac0d Switch Oculus distortion to high quality mode. 2015-04-17 11:03:04 -07:00
James Darpinian
ee649f682e Fix crash on shutdown in HMD mode.
Presumably this crash is due to a bug in either the Oculus SDK or DirectX itself as changing the order of releasing these objects should not have any effect.
2015-04-17 10:55:47 -07:00
Branimir Karadžić
a555a112a6 Cleanup. 2015-04-16 21:53:26 -07:00
Branimir Karadžić
4bc2df890a Make D3D11 work with outdated DXSDK. 2015-04-16 19:47:13 -07:00
Branimir Karadžić
a3a1127b4f Fixed MinGW build. 2015-04-16 19:28:18 -07:00
Mike Popoloski
4bc2e4ec10 This MakeWindowAssociation block got moved to the wrong branch of #if. 2015-04-16 21:47:41 -04:00
Mike Popoloski
3ed95c81f2 Adding proper caps support for D3D11 feature levels. 2015-04-16 19:24:28 -04:00
Mike Popoloski
b234364df9 Special casing texture2DLod for SM 2.0 targets
tex2Dlod and related functions are not supported in shader model 2.0 (or D3D11 feature level 9_x). This commit just aliases them to a straight texture lookup, which doesn't do the same thing but at least it won't fail to compile.
2015-04-16 19:24:27 -04:00
Branimir Karadžić
5c7986ad38 GL: Reset state when switching from compute to draw. 2015-04-16 11:38:46 -07:00
Miodrag Milanovic
6ca4a77353 Fixed initialization order warning 2015-04-16 14:23:02 +02:00
Branimir Karadžić
12998fe580 Update OVR pose. 2015-04-15 21:52:31 -07:00
Branimir Karadžić
6edd804f7a Cleanup. 2015-04-15 21:31:24 -07:00
Branimir Karadžić
66edb6c566 Moved HMD tracking into flip. Removed unnecessary frame data when using single-threaded renderer. 2015-04-15 20:59:00 -07:00
Branimir Karadžić
4210fb0d64 Renamed reset flag. 2015-04-15 11:49:20 -07:00
Branimir Karadžić
9d91d3bbbc Reversed instance data bindings. Issue #309. 2015-04-15 10:37:00 -07:00
Branimir Karadžić
5ac092d036 Cleanup. 2015-04-14 22:05:20 -07:00
Branimir Karadžić
7bfe51d0d8 Added flip after submit reset flag. 2015-04-14 20:03:05 -07:00
Branimir Karadžić
87a5652b46 Added extra error checking when creating frame buffer. 2015-04-14 17:03:07 -07:00
Branimir Karadžić
63cc071a6e D3D11: Fixed frame buffer auto resizing. 2015-04-14 17:02:41 -07:00
Branimir Karadžić
f3a17da8a8 GL: Cleanup FBO on destroy. 2015-04-14 17:02:04 -07:00
Branimir Karadžić
74fb466e92 Fixed issue #308. 2015-04-14 17:01:35 -07:00
Branimir Karadžić
bff3ae937c GL: Update frame buffer after reset. 2015-04-13 22:13:16 -07:00
Branimir Karadžić
c01a93e29d Added support for automatic texture scaling by backbuffer ratio on backbuffer resize. 2015-04-13 18:39:38 -07:00
Branimir Karadžić
dedf75a89b Rebuilt shaders. 2015-04-12 22:26:40 -07:00
Branimir Karadžić
f203c872b1 Moved lcd/gcd and strideAlign functions from bgfx to bx. 2015-04-12 17:31:33 -07:00