Commit graph

17 commits

Author SHA1 Message Date
Sam Lantinga
ce92ee5307 Fixing Alt-Enter handling, submitted by Nader Golbaz
I encountered a little issue: DXGI monitors application's message queue and this behavior interferes with SDL if the application already handles Alt-Enter sequence. I think it is necessary to disable this behavior.
bb174540%28v=vs.85%29.aspx
2014-03-23 22:53:50 -07:00
David Ludwig
519432a55f D3D11: Fixed a crash after a GPU device-reset on Win32 2014-03-23 16:08:32 -04:00
David Ludwig
48ecbf8800 D3D11: Added code to handle GPU-device-removed scenarios
These scenarios can happen when a GPU is switched, its driver updated, or in
some virtual machines (such as Parallels) are suspended and then resumed.  In
these cases, all GPU resources will already be lost, and it's up to the app to
recover.

For now, SDL's D3D11 renderer will handle this by freeing all GPU resources,
including all textures, and then sending a SDL_RENDER_TARGETS_RESET event.
It's currently up to an app to intercept this event, destroy all of its
textures, then recreate them from scratch.
2014-03-23 13:48:16 -04:00
David Ludwig
4f443b34f0 Fixed a crash on Windows Phone 8 that occurred after rotating a device
This changeset prevents IDXGISwapChain::ResizeBuffers from being invoked on
Windows Phone 8, a function that isn't available on the platform (but is
available on other Windows platforms).  The call would fail, which ultimately
led to a crash.

This changeset also attempts to make sure that the D3D11 swap chain is created
at the correct size, when using Windows Phone 8.

Still TODO: make sure rotation-querying works across relevant Windows
platforms (that support Direct3D 11.x).
2014-03-15 13:27:18 -04:00
Sam Lantinga
67fb6a9aa7 Fixed the copyright date on files contributed by David Ludwig 2014-03-13 00:40:08 -07:00
David Ludwig
468dbccb39 Merged various WinRT build fixes
--HG--
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp => src/render/direct3d11/SDL_render_winrt.cpp
2014-03-12 12:12:20 -04:00
David Ludwig
7ba3100244 Fixed various build and runtime errors when using WinRT with VS2012. 2014-03-12 11:57:15 -04:00
Sam Lantinga
ad407b378a Fixed compiling Windows RT code on Visual Studio 2013
--HG--
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp => src/render/direct3d11/SDL_render_winrt.cpp
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers_cpp.h => src/render/direct3d11/SDL_render_winrt.h
2014-03-12 07:26:07 -07:00
David Ludwig
5007e2996e Fixed compiler errors in the D3D11 renderer when building for WinRT
Still TODO: fix other build errors, especially linker errors, when building
SDL/WinRT, then fix any runtime errors that pop up.

--HG--
extra : rebase_source : dec261a0a61ffe463455f7d0a639f4c087e975ba
2014-03-11 12:40:31 -04:00
David Ludwig
cfebd21bdc Made VS2012 build the D3D11 renderer
This change is currently limited to Win32/Windows-Desktop builds.  Build fixes
for WinRT + VS2012 are still pending.

--HG--
extra : rebase_source : 1ba34b2a9a394347f5d95730eeabc3f0d7e4f197
2014-03-10 22:53:03 -04:00
Sam Lantinga
d16a9a6781 Fixed D3D9 initialization on Windows 8, which doesn't have D3DX 2014-03-10 17:19:19 -07:00
Sam Lantinga
1d203bd13f Implemented fullscreen <-> windowed transition on Windows 8 2014-03-10 15:00:59 -07:00
Sam Lantinga
9d421197ef Fixed line endings 2014-03-10 14:35:37 -07:00
Sam Lantinga
0879cd423c Fixed creating the rendering context on a specific device 2014-03-10 12:49:15 -07:00
Sam Lantinga
aceab387be Implemented YV12 and IYUV texture support for the D3D11 renderer 2014-03-10 05:44:34 -07:00
Sam Lantinga
5e7f7c7f4b Minor style tweaks 2014-03-10 02:13:44 -07:00
Sam Lantinga
1348631206 Converted David Ludwig's D3D11 renderer to C and optimized it.
The D3D11 renderer is now slightly faster than D3D9 on my Windows 8 machine (testsprite2 runs at 3400 FPS vs 3100 FPS)
This will need tweaking to fix the Windows RT build.

--HG--
rename : src/render/direct3d11/SDL_render_d3d11.cpp => src/render/direct3d11/SDL_render_d3d11.c
2014-03-10 01:51:03 -07:00
Renamed from src/render/direct3d11/SDL_render_d3d11.cpp (Browse further)