mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
st/nine: Return device in NineSurface9_GetContainer
According to MSDN the device is returned for surfaces that do not have a regular container. Such surfaces are: OffscreenPlainSurface, DepthStencilSurface and RenderTarget Tested and verified on Windows. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
ba0274c7d6
commit
c1c8e852c1
1 changed files with 10 additions and 2 deletions
|
|
@ -276,8 +276,16 @@ NineSurface9_GetContainer( struct NineSurface9 *This,
|
|||
DBG("This=%p riid=%p id=%s ppContainer=%p\n",
|
||||
This, riid, riid ? GUID_sprintf(guid_str, riid) : "", ppContainer);
|
||||
|
||||
if (!NineUnknown(This)->container)
|
||||
return E_NOINTERFACE;
|
||||
if (!ppContainer) return E_POINTER;
|
||||
|
||||
/* Return device for OffscreenPlainSurface, DepthStencilSurface and RenderTarget */
|
||||
if (!NineUnknown(This)->container) {
|
||||
*ppContainer = NineUnknown(This)->device;
|
||||
NineUnknown_AddRef(NineUnknown(*ppContainer));
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
hr = NineUnknown_QueryInterface(NineUnknown(This)->container, riid, ppContainer);
|
||||
if (FAILED(hr))
|
||||
DBG("QueryInterface FAILED!\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue