src/render/direct3d11


Log

Author Commit Date CI Message
Sam Lantinga bed7fd80 2017-12-12T12:52:09 Merged latest changes from rel/streaming_client
Sam Lantinga a6a4e27a 2017-11-12T22:51:12 Updated SDL's YUV support, many thanks to Adrien Descamps New functions get and set the YUV colorspace conversion mode: SDL_SetYUVConversionMode() SDL_GetYUVConversionMode() SDL_GetYUVConversionModeForResolution() SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats. Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
Sam Lantinga c59d9923 2017-08-14T05:51:44 Implemented more flexible blending modes for accelerated renderers This fixes bug 2594 - Propose new blend mode, SDL_BLENDMODE_BLEND_DSTA blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD); This fixes bug 2828 - Subtractive Blending blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT); This goes partway to fixing bug 3684 - Add support for a pre-multiplied alpha blending mode blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, SDL_BLENDFACTOR_ONE, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD);
David Ludwig b13c443c 2017-02-24T20:49:14 WinRT: removed buildbot debug code, pending further research
David Ludwig f7bfa3b7 2017-02-24T20:19:28 WinRT: more buildbot debug code
David Ludwig ecb1eb82 2017-02-24T19:59:57 WinRT: added code to help debug a buildbot error
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 057bca8a 2016-11-06T15:15:32 Better fix for last point in D3D11 renderer, thanks to Nader Golbaz
Sam Lantinga 330e2952 2016-11-06T08:47:40 Fixed bug 2421 for D3D11 - SDL_RenderCopyEx off by one when rotating by 90 and -90. Nader Golbaz Updated patch for direct3d renderers
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
David Ludwig 969c3167 2016-10-01T18:49:15 Fixed MinGW-w64 build warnings in SDL_render_d3d11.c Some of these were legitimate bugs, including: - a malformed SDL_snprintf call - a probably-invalid enum comparison
Sam Lantinga 702d9348 2016-10-01T15:23:43 Added SDL prefix to local IID constants
David Ludwig 7851eb08 2016-10-01T18:10:15 Fixed bug 3437 - build error for WinRT/UWP .dlls, caused by fix for SDL bug 3336 This fix has been tested with both MinGW-w64, and Visual C++ 2012-2015.
Sam Lantinga b7e45f8a 2016-10-01T10:28:00 Fixed bug 3336 - Failure to build with MinGW-w64 Kai Sterker There are already patches available from mingw64 that fix the issue https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-SDL2 With those applied, I could compile SDL2 without problems. But of course, it would be preferable if SDL built cleanly from source.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
David Ludwig 25abce51 2015-11-29T19:33:11 WinRT: added Win10/UWP (Universal Windows Platform) support "UWP" appears to be Microsoft's new name for WinRT/Windows-Store APIs. This set of changes updates SDL's WinRT backends to support the Win10 flavor of WinRT. It has been tested on Win10 on a desktop. In theory, it should also support Win10 on other devices (phone, Xbox One, etc.), however further patches may be necessary. This adds: - a set of MSVC 2015 project files, for use in creating UWP apps - modifications to various pieces of SDL, in order to compile via MSVC 2015 + the Win10 API set - enables SDL_Window resizing and programmatic-fullscreen toggling, when using the WinRT backend - WinRT README updates
David Ludwig 623898f7 2015-11-26T00:41:39 WinRT: lots of display and windowing related fixes This change-set fixes a lot of windowing related bugs, especially with regards to Windows 8.x apps running on Windows 10 (which was the driver for this work). The primary fixes include: * listed display modes were wrong, especially when launching apps into a non-fullscreen space * reported window flags were often wrong, especially on Windows 10 * fullscreen/windowed mode switches weren't failing (they are not programmatically possible in Win 8.x apps).
Philipp Wiesemann 4c72d39c 2015-10-15T22:26:21 D3D11: Fixed SDL_RenderDrawPoints() ignoring input after the first 128 points. If a limit would be needed then count should be adapted before stack allocation.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga da190975 2015-05-28T18:57:10 Fixed clip rectangle calculation when there is a viewport offset
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Philipp Wiesemann 26b4898a 2015-04-11T20:43:11 Windows: Fixed format string for error message.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
David Ludwig 78f3a80c 2015-02-08T15:44:15 WinRT: made note that VSync is always enabled on WinPhone, due to OS Windows Phone does not appear to allow VSync to be turned off. Doing so appears to either result in content not getting drawn (when the D3D debug runtime is turned off), or forcing VSync back on and logging an error (when the D3D debug runtime is turned on). VSync had been getting turned on anyways, this change just notes such: - via the WinRT README - by always setting the SDL_RENDERER_PRESENTVSYNC flag when creating an SDL_Renderer on Windows Phone
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
David Ludwig 20a6c623 2014-10-14T09:53:46 WinRT: fixed bug whereby offscreen-rendered content could get improperly rotated Attributes on the host device's rotation were getting applied to offscreen textures in an invalid manner. This was causing some apps to look different, depending on how the device was rotated.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Alfred Reynolds 2748e282 2014-07-03T10:22:12 The YUV offset is 16 / 255, not 16 / 256
David Ludwig 164e5b89 2014-05-09T21:28:52 WinRT: display-information code cleanups
David Ludwig 0a879d63 2014-05-09T20:16:21 Fixed rendering-alignment issues on WinPhone 8.1, when the device was rotated If a Windows Phone 8.1 device was rotated to anything but Portrait mode, the Direct3D 11 renderer's output wouldn't get aligned correctly with the screen.
David Ludwig ec5f6ad5 2014-04-30T21:12:47 WinRT: suppressed an unused param warning when building for Windows Phone 8.1
J?rgen P. Tjern? defd90b6 2014-04-19T13:15:41 Render: Allow empty cliprect. This fixes an issue where an empty cliprect is treated the same as a NULL cliprect, causing the render backends to disable clipping. Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to differentiate between: - SDL_RenderSetClipRect(render, NULL) - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r); Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
David Ludwig a99bf4d7 2014-03-24T22:51:03 WinRT: Call IDXGIDevice3::Trim before app-suspend, as required on Windows 8.1 Thanks to Sylvain Becker for pointing this out!
Sam Lantinga 26823b1b 2014-03-23T23:09:22 Added an event SDL_RENDER_DEVICE_RESET, which is triggered on Direct3D 11 when the device has been lost and all textures need to be recreated.
Sam Lantinga 3317e434 2014-03-23T22:53:50 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. http://msdn.microsoft.com/en-us/library/windows/desktop/bb174540%28v=vs.85%29.aspx
David Ludwig 46a80b04 2014-03-23T16:08:32 D3D11: Fixed a crash after a GPU device-reset on Win32
David Ludwig 6ce684e9 2014-03-23T13:48:16 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.
David Ludwig f25ee50b 2014-03-15T14:54:23 Fixed broken rotation detection routines on WinRT Rotation detection and handling should now work across all, publicly-released, WinRT-based platforms (Windows 8.0, Windows 8.1, and Windows Phone 8.0).
David Ludwig 5281f9f1 2014-03-15T13:27:18 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).
Sam Lantinga ed02f61d 2014-03-13T00:40:08 Fixed the copyright date on files contributed by David Ludwig
David Ludwig 4cd5ed7b 2014-03-12T12:12:20 Merged various WinRT build fixes
David Ludwig b68b6e23 2014-03-12T11:57:15 Fixed various build and runtime errors when using WinRT with VS2012.
Sam Lantinga 641ba099 2014-03-12T07:26:07 Fixed compiling Windows RT code on Visual Studio 2013
David Ludwig 36e7c8d9 2014-03-11T12:40:31 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.
David Ludwig ce3c5b84 2014-03-10T22:53:03 Made VS2012 build the D3D11 renderer This change is currently limited to Win32/Windows-Desktop builds. Build fixes for WinRT + VS2012 are still pending.
Sam Lantinga 2c558ca2 2014-03-10T17:19:19 Fixed D3D9 initialization on Windows 8, which doesn't have D3DX
Sam Lantinga 9c2fb684 2014-03-10T15:00:59 Implemented fullscreen <-> windowed transition on Windows 8
Sam Lantinga 7e8b2553 2014-03-10T14:35:37 Fixed line endings
Sam Lantinga 3df586ce 2014-03-10T12:49:15 Fixed creating the rendering context on a specific device
Sam Lantinga 9aa5b1d4 2014-03-10T05:44:34 Implemented YV12 and IYUV texture support for the D3D11 renderer
Sam Lantinga 965cdf10 2014-03-10T02:13:44 Minor style tweaks
Sam Lantinga 1a35f32b 2014-03-10T01:51:03 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.
Sam Lantinga 05c23063 2014-03-09T11:06:11 Fixed line endings on WinRT source code
David Ludwig 44b0e901 2013-12-30T11:59:04 WinRT: d3d11 blend mode bug fixes The destination target's alpha wasn't getting set correctly in many cases. Among other problems, this prevented some alpha-blended textures from displaying correctly in Windows Phone 8's multitasking screen. The d3d11 renderer now uses the same blending settings found in the d3d9 renderer.
David Ludwig 0562e53f 2013-12-26T11:04:35 WinRT: minor header file usage cleanup in the d3d11 renderer
David Ludwig 94233675 2013-12-26T11:03:43 WinRT: simplified the d3d11 vertex shader a bit The projection and view matrices are now computed ahead of time, as they both get computed in the same spot, and typically not often. If this does, however, become a performance problem later on, this change can always be reverted.
David Ludwig 7ef05d26 2013-12-26T10:18:33 WinRT: implemented SDL_RenderSetClipRect for the d3d11 renderer
David Ludwig 700f82de 2013-12-25T23:46:19 WinRT: corrected a minor error in an end-of-file comment
David Ludwig 8b2694f9 2013-12-25T23:45:07 WinRT: minor rotation/orientation code cleanup in the d3d11 renderer
David Ludwig b93ab1e6 2013-12-25T23:25:25 WinRT: removed a bit of dead d3d11 code
David Ludwig f0e406e9 2013-12-25T22:27:58 WinRT: d3d11 compiled-shader code cleanup I'm surprised this code even compiled, before this change. It did, but regardless, here's a cleanup.
David Ludwig 4d16628f 2013-12-25T22:05:18 WinRT: made sure d3d11 debug mode doesn't get enabled by default D3D11 debug mode got inadvertently enabled, in all cases, via changeset c0e68f3. This change reverts that.
David Ludwig ce805722 2013-12-25T21:39:48 WinRT: compiled the d3d11 renderer's shaders into SDL itself Previously, the shaders would get compiled separately, the output of which would need to be packaged into the app. This change should make SDL's dll be the only binary needed to include SDL in a WinRT app.
David Ludwig 8db33416 2013-12-25T14:20:40 WinRT: added a TODO note regarding texture-[un]locking in the d3d11 renderer
David Ludwig 187f52e8 2013-12-25T14:17:49 WinRT: renamed d3d11-internal struct, SDL_VertexShaderConstants, to just VertexShaderConstants This is primarily to keep naming consistent with other shader-bound structs.
David Ludwig 22254931 2013-12-25T13:13:15 WinRT: moved contents of the d3d11 renderer's header file into its implementation file
David Ludwig d4ae3929 2013-12-25T13:00:41 WinRT: simplified a potentially-common error message from D3D11_SetRenderTarget
David Ludwig b0df9157 2013-12-25T12:58:37 WinRT: removed an unnecessary use of std::string in the d3d11 renderer
David Ludwig 10f2de1e 2013-12-25T12:52:16 WinRT: utilized SDL_SetError's return value in the d3d11 renderer
David Ludwig 43e27aa8 2013-12-25T12:48:47 WinRT: minor d3d11 code cleanups
David Ludwig 8c8feb83 2013-12-25T12:47:39 WinRT: made d3d11-spawned error messages trickle down Some error messages had the potential to be overwritten/obscured.
David Ludwig 5fba7db2 2013-12-25T12:43:26 WinRT: made d3d11-spawned error messages include the function name of failed calls
David Ludwig 5e6aba06 2013-12-22T21:13:35 WinRT: better rendering performance via D3D11_USAGE_DYNAMIC
David Ludwig 446a2704 2013-12-10T22:34:08 WinRT: fixed bug: SDL_RenderReadPixels didn't work with certain orientations of the physical display
David Ludwig 7cc09516 2013-11-01T22:54:39 WinRT: added support for SDL_HINT_RENDER_SCALE_QUALITY
David Ludwig 62c781ea 2013-10-25T20:31:43 WinRT: made the Direct3D 11.x 'Debug Layer' be enable-able in any app via a hint To enable the Debug Layer, set the hint, SDL_HINT_RENDER_DIRECT3D11_DEBUG to '1'. The Debug Layer will be turned off by default, both in Release and Debug builds (of SDL).
David Ludwig fa45a9c9 2013-09-16T00:31:01 WinRT: fixed a line-rendering bug in the D3D 11.1 backend
David Ludwig 31235b4b 2013-08-28T15:27:01 WinRT: made rendering work with orientation changes on Windows Phone Pointer event geometry still needs to be adjusted on Windows Phone, to note.
David Ludwig 91b03902 2013-08-28T12:45:43 WinRT: removed a comment regarding a dealt-with TODO
David Ludwig 8e3886a2 2013-08-28T12:38:30 WinRT: rendering orientation fixes for Windows Phone, part 1 This change should allow apps to render correctly in Portrait mode, at minimum, Support for orientation changes is pending. Thanks to Pierre-Yves for assistance!
David Ludwig 44755f8a 2013-08-28T11:46:02 WinRT: fixed a potential memory-related crash in SDL_Renderer on Windows Phone
David Ludwig 2cafee9d 2013-08-27T21:21:09 WinRT: experimental and preliminary support for XAML-based overlays on Windows 8/RT The XAML support here is still rudimentary. Bugs do exist. You've been warned. XAML support in Windows Phone 8 is not yet available (in SDL/WinRT).
David Ludwig 86ea4c4e 2013-08-27T13:03:43 WinRT: made all WinRT-related TODO comments use the same prefix, "TODO, WinRT"
David Ludwig 7be2ad71 2013-08-27T11:44:43 WinRT: renamed SDL_SYSWM_WINDOWSRT to SDL_SYSWM_WINRT This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name. (WinRT is an API, Windows RT is a product name)
David Ludwig eaf26ff6 2013-08-13T20:33:15 WinRT: added a stub implementation of UpdateClipRect to the D3D 11.1 renderer
David Ludwig f7049b93 2013-08-12T22:29:55 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1)