mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-25 15:32:00 +00:00
Added SDL_GetTextureDXGIResource() to get the DXGI resource associated with a render texture.
Also switched the D3D11 and D3D12 renderers to use real NV12 textures for NV12 data. The combination of these two changes allows us to implement 0-copy video decode and playback for D3D11 in testffmpeg without any access to the renderer internals.
This commit is contained in:
parent
a842446f62
commit
2bd478ae65
10 changed files with 336 additions and 265 deletions
|
|
@ -4186,6 +4186,19 @@ void *SDL_GetRenderMetalCommandEncoder(SDL_Renderer *renderer)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
IDXGIResource *SDL_GetTextureDXGIResource(SDL_Texture *texture)
|
||||
{
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
CHECK_TEXTURE_MAGIC(texture, NULL);
|
||||
renderer = texture->renderer;
|
||||
if (renderer && renderer->GetTextureDXGIResource) {
|
||||
return renderer->GetTextureDXGIResource(texture);
|
||||
}
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static SDL_BlendMode SDL_GetShortBlendMode(SDL_BlendMode blendMode)
|
||||
{
|
||||
if (blendMode == SDL_BLENDMODE_NONE_FULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue