wined3d: Store render targets as IWineD3DSurfaceImpl pointers in the device.

This commit is contained in:
Henri Verbeet 2010-04-19 20:46:59 +02:00 committed by Alexandre Julliard
parent 8b32635091
commit c7a1848656
8 changed files with 51 additions and 49 deletions

View File

@ -509,7 +509,7 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl)
*/ */
float val[4]; float val[4];
val[0] = context->render_offscreen ? 0.0f val[0] = context->render_offscreen ? 0.0f
: ((IWineD3DSurfaceImpl *) deviceImpl->render_targets[0])->currentDesc.Height; : deviceImpl->render_targets[0]->currentDesc.Height;
val[1] = context->render_offscreen ? 1.0f : -1.0f; val[1] = context->render_offscreen ? 1.0f : -1.0f;
val[2] = 1.0f; val[2] = 1.0f;
val[3] = 0.0f; val[3] = 0.0f;

View File

@ -413,17 +413,14 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
/* Apply render targets */ /* Apply render targets */
for (i = 0; i < gl_info->limits.buffers; ++i) for (i = 0; i < gl_info->limits.buffers; ++i)
{ {
IWineD3DSurfaceImpl *render_target = (IWineD3DSurfaceImpl *)device->render_targets[i]; context_attach_surface_fbo(context, GL_FRAMEBUFFER, i, device->render_targets[i]);
context_attach_surface_fbo(context, GL_FRAMEBUFFER, i, render_target);
} }
/* Apply depth targets */ /* Apply depth targets */
if (device->stencilBufferTarget) if (device->stencilBufferTarget)
{ {
unsigned int w = ((IWineD3DSurfaceImpl *)device->render_targets[0])->pow2Width; surface_set_compatible_renderbuffer((IWineD3DSurfaceImpl *)device->stencilBufferTarget,
unsigned int h = ((IWineD3DSurfaceImpl *)device->render_targets[0])->pow2Height; device->render_targets[0]->pow2Width, device->render_targets[0]->pow2Height);
surface_set_compatible_renderbuffer((IWineD3DSurfaceImpl *)device->stencilBufferTarget, w, h);
} }
context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, (IWineD3DSurfaceImpl *)device->stencilBufferTarget, TRUE); context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, (IWineD3DSurfaceImpl *)device->stencilBufferTarget, TRUE);
@ -434,7 +431,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
for (i = 0; i < gl_info->limits.buffers; ++i) for (i = 0; i < gl_info->limits.buffers; ++i)
{ {
if (device->render_targets[i]) if (device->render_targets[i])
context_apply_attachment_filter_states((IWineD3DSurfaceImpl *)device->render_targets[i]); context_apply_attachment_filter_states(device->render_targets[i]);
} }
if (device->stencilBufferTarget) if (device->stencilBufferTarget)
context_apply_attachment_filter_states((IWineD3DSurfaceImpl *)device->stencilBufferTarget); context_apply_attachment_filter_states((IWineD3DSurfaceImpl *)device->stencilBufferTarget);

View File

@ -1554,7 +1554,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock); IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock);
This->render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(IWineD3DSurface *) * gl_info->limits.buffers); sizeof(*This->render_targets) * gl_info->limits.buffers);
This->draw_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->draw_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(GLenum) * gl_info->limits.buffers); sizeof(GLenum) * gl_info->limits.buffers);
@ -1612,13 +1612,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
if(swapchain->backBuffer && swapchain->backBuffer[0]) { if(swapchain->backBuffer && swapchain->backBuffer[0]) {
TRACE("Setting rendertarget to %p\n", swapchain->backBuffer); TRACE("Setting rendertarget to %p\n", swapchain->backBuffer);
This->render_targets[0] = swapchain->backBuffer[0]; This->render_targets[0] = (IWineD3DSurfaceImpl *)swapchain->backBuffer[0];
} }
else { else {
TRACE("Setting rendertarget to %p\n", swapchain->frontBuffer); TRACE("Setting rendertarget to %p\n", swapchain->frontBuffer);
This->render_targets[0] = swapchain->frontBuffer; This->render_targets[0] = (IWineD3DSurfaceImpl *)swapchain->frontBuffer;
} }
IWineD3DSurface_AddRef(This->render_targets[0]); IWineD3DSurface_AddRef((IWineD3DSurface *)This->render_targets[0]);
/* Depth Stencil support */ /* Depth Stencil support */
This->stencilBufferTarget = This->auto_depth_stencil_buffer; This->stencilBufferTarget = This->auto_depth_stencil_buffer;
@ -1862,7 +1862,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface,
This->stencilBufferTarget = NULL; This->stencilBufferTarget = NULL;
TRACE("Releasing the render target at %p\n", This->render_targets[0]); TRACE("Releasing the render target at %p\n", This->render_targets[0]);
IWineD3DSurface_Release(This->render_targets[0]); IWineD3DSurface_Release((IWineD3DSurface *)This->render_targets[0]);
TRACE("Setting rendertarget to NULL\n"); TRACE("Setting rendertarget to NULL\n");
This->render_targets[0] = NULL; This->render_targets[0] = NULL;
@ -4527,10 +4527,10 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
return WINED3D_OK; return WINED3D_OK;
} }
static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Count, CONST WINED3DRECT* pRects, static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Count,
DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) { const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DSurfaceImpl *target = (IWineD3DSurfaceImpl *)This->render_targets[0];
TRACE("(%p) Count (%d), pRects (%p), Flags (%x), Color (0x%08x), Z (%f), Stencil (%d)\n", This, TRACE("(%p) Count (%d), pRects (%p), Flags (%x), Color (0x%08x), Z (%f), Stencil (%d)\n", This,
Count, pRects, Flags, Color, Z, Stencil); Count, pRects, Flags, Color, Z, Stencil);
@ -4541,7 +4541,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
return IWineD3DDeviceImpl_ClearSurface(This, target, Count, pRects, Flags, Color, Z, Stencil); return IWineD3DDeviceImpl_ClearSurface(This, This->render_targets[0], Count, pRects, Flags, Color, Z, Stencil);
} }
/***** /*****
@ -5586,7 +5586,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
*ppRenderTarget = This->render_targets[RenderTargetIndex]; *ppRenderTarget = (IWineD3DSurface *)This->render_targets[RenderTargetIndex];
TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget); TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget);
/* Note inc ref on returned surface */ /* Note inc ref on returned surface */
if(*ppRenderTarget != NULL) if(*ppRenderTarget != NULL)
@ -5868,13 +5868,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
} }
/* If we are trying to set what we already have, don't bother */ /* If we are trying to set what we already have, don't bother */
if (pRenderTarget == This->render_targets[RenderTargetIndex]) { if (pRenderTarget == (IWineD3DSurface *)This->render_targets[RenderTargetIndex])
{
TRACE("Trying to do a NOP SetRenderTarget operation\n"); TRACE("Trying to do a NOP SetRenderTarget operation\n");
return WINED3D_OK; return WINED3D_OK;
} }
if(pRenderTarget) IWineD3DSurface_AddRef(pRenderTarget); if (pRenderTarget)
if(This->render_targets[RenderTargetIndex]) IWineD3DSurface_Release(This->render_targets[RenderTargetIndex]); IWineD3DSurface_AddRef(pRenderTarget);
This->render_targets[RenderTargetIndex] = pRenderTarget; if (This->render_targets[RenderTargetIndex])
IWineD3DSurface_Release((IWineD3DSurface *)This->render_targets[RenderTargetIndex]);
This->render_targets[RenderTargetIndex] = (IWineD3DSurfaceImpl *)pRenderTarget;
/* Render target 0 is special */ /* Render target 0 is special */
if(RenderTargetIndex == 0 && set_viewport) { if(RenderTargetIndex == 0 && set_viewport) {
@ -5882,8 +5885,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
* Tests show that stateblock recording is ignored, the change goes * Tests show that stateblock recording is ignored, the change goes
* directly into the primary stateblock. * directly into the primary stateblock.
*/ */
This->stateBlock->viewport.Height = ((IWineD3DSurfaceImpl *)This->render_targets[0])->currentDesc.Height; This->stateBlock->viewport.Height = This->render_targets[0]->currentDesc.Height;
This->stateBlock->viewport.Width = ((IWineD3DSurfaceImpl *)This->render_targets[0])->currentDesc.Width; This->stateBlock->viewport.Width = This->render_targets[0]->currentDesc.Width;
This->stateBlock->viewport.X = 0; This->stateBlock->viewport.X = 0;
This->stateBlock->viewport.Y = 0; This->stateBlock->viewport.Y = 0;
This->stateBlock->viewport.MaxZ = 1.0f; This->stateBlock->viewport.MaxZ = 1.0f;
@ -5920,8 +5923,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
if (((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL if (((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
|| ((IWineD3DSurfaceImpl *)This->stencilBufferTarget)->Flags & SFLAG_DISCARD) { || ((IWineD3DSurfaceImpl *)This->stencilBufferTarget)->Flags & SFLAG_DISCARD) {
surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_DISCARDED); surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_DISCARDED);
} else { }
struct wined3d_context *context = context_acquire(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD); else
{
struct wined3d_context *context = context_acquire(This,
(IWineD3DSurface *)This->render_targets[0], CTXUSAGE_RESOURCELOAD);
surface_load_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, context, SFLAG_DS_OFFSCREEN); surface_load_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, context, SFLAG_DS_OFFSCREEN);
surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_OFFSCREEN); surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_OFFSCREEN);
context_release(context); context_release(context);
@ -6680,10 +6686,9 @@ void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resour
{ {
for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i) for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i)
{ {
if (This->render_targets[i] == (IWineD3DSurface *)resource) { if (This->render_targets[i] == (IWineD3DSurfaceImpl *)resource)
This->render_targets[i] = NULL; This->render_targets[i] = NULL;
} }
}
if (This->stencilBufferTarget == (IWineD3DSurface *)resource) { if (This->stencilBufferTarget == (IWineD3DSurface *)resource) {
This->stencilBufferTarget = NULL; This->stencilBufferTarget = NULL;
} }

View File

@ -572,7 +572,6 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
{ {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DSurfaceImpl *target;
struct wined3d_context *context; struct wined3d_context *context;
unsigned int i; unsigned int i;
@ -583,11 +582,11 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
/* Invalidate the back buffer memory so LockRect will read it the next time */ /* Invalidate the back buffer memory so LockRect will read it the next time */
for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i) for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i)
{ {
target = (IWineD3DSurfaceImpl *)This->render_targets[i]; IWineD3DSurface *target = (IWineD3DSurface *)This->render_targets[i];
if (target) if (target)
{ {
IWineD3DSurface_LoadLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, NULL); IWineD3DSurface_LoadLocation(target, SFLAG_INDRAWABLE, NULL);
IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE); IWineD3DSurface_ModifyLocation(target, SFLAG_INDRAWABLE, TRUE);
} }
} }
} }
@ -595,7 +594,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
/* Signals other modules that a drawing is in progress and the stateblock finalized */ /* Signals other modules that a drawing is in progress and the stateblock finalized */
This->isInDraw = TRUE; This->isInDraw = TRUE;
context = context_acquire(This, This->render_targets[0], CTXUSAGE_DRAWPRIM); context = context_acquire(This, (IWineD3DSurface *)This->render_targets[0], CTXUSAGE_DRAWPRIM);
if (!context->valid) if (!context->valid)
{ {
context_release(context); context_release(context);

View File

@ -1034,7 +1034,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
*/ */
FIXME("Cannot find a free uniform for vpos correction params\n"); FIXME("Cannot find a free uniform for vpos correction params\n");
shader_addline(buffer, "const vec4 ycorrection = vec4(%f, %f, 0.0, 0.0);\n", shader_addline(buffer, "const vec4 ycorrection = vec4(%f, %f, 0.0, 0.0);\n",
context->render_offscreen ? 0.0f : ((IWineD3DSurfaceImpl *)device->render_targets[0])->currentDesc.Height, context->render_offscreen ? 0.0f : device->render_targets[0]->currentDesc.Height,
context->render_offscreen ? 1.0f : -1.0f); context->render_offscreen ? 1.0f : -1.0f);
} }
shader_addline(buffer, "vec4 vpos;\n"); shader_addline(buffer, "vec4 vpos;\n");

View File

@ -233,7 +233,7 @@ static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock, struc
static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{ {
IWineD3DSurfaceImpl *target = (IWineD3DSurfaceImpl *)stateblock->device->render_targets[0]; IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0];
int srcBlend = GL_ZERO; int srcBlend = GL_ZERO;
int dstBlend = GL_ZERO; int dstBlend = GL_ZERO;
@ -4644,7 +4644,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, s
static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{ {
IWineD3DSurfaceImpl *target = (IWineD3DSurfaceImpl *)stateblock->device->render_targets[0]; IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0];
UINT width, height; UINT width, height;
WINED3DVIEWPORT vp = stateblock->viewport; WINED3DVIEWPORT vp = stateblock->viewport;
@ -4802,7 +4802,7 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3
static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{ {
IWineD3DSurfaceImpl *target = (IWineD3DSurfaceImpl *)stateblock->device->render_targets[0]; IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0];
RECT *pRect = &stateblock->scissorRect; RECT *pRect = &stateblock->scissorRect;
UINT height; UINT height;
UINT width; UINT width;

View File

@ -554,8 +554,9 @@ static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This, BOOL srgb) {
/* This function checks if the primary render target uses the 8bit paletted format. */ /* This function checks if the primary render target uses the 8bit paletted format. */
static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device) static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device)
{ {
if (device->render_targets && device->render_targets[0]) { if (device->render_targets && device->render_targets[0])
IWineD3DSurfaceImpl* render_target = (IWineD3DSurfaceImpl*)device->render_targets[0]; {
IWineD3DSurfaceImpl *render_target = device->render_targets[0];
if ((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) if ((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET)
&& (render_target->resource.format_desc->format == WINED3DFMT_P8_UINT)) && (render_target->resource.format_desc->format == WINED3DFMT_P8_UINT))
return TRUE; return TRUE;
@ -1700,7 +1701,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
} }
if (!(wined3d_settings.rendertargetlock_mode == RTL_DISABLE if (!(wined3d_settings.rendertargetlock_mode == RTL_DISABLE
&& ((This->Flags & SFLAG_SWAPCHAIN) || iface == device->render_targets[0]))) && ((This->Flags & SFLAG_SWAPCHAIN) || This == device->render_targets[0])))
{ {
IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, pass_rect); IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, pass_rect);
} }
@ -1891,7 +1892,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
goto unlock_end; goto unlock_end;
} }
if ((This->Flags & SFLAG_SWAPCHAIN) || (device->render_targets && iface == device->render_targets[0])) if ((This->Flags & SFLAG_SWAPCHAIN) || (device->render_targets && This == device->render_targets[0]))
{ {
if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) { if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {
static BOOL warned = FALSE; static BOOL warned = FALSE;
@ -2152,7 +2153,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
* in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which * in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which
* conflicts with this. * conflicts with this.
*/ */
if (!((blit_supported && device->render_targets && This == (IWineD3DSurfaceImpl*)device->render_targets[0])) if (!((blit_supported && device->render_targets && This == device->render_targets[0]))
|| colorkey_active || !use_texturing) || colorkey_active || !use_texturing)
{ {
desc->glFormat = GL_RGBA; desc->glFormat = GL_RGBA;
@ -3377,8 +3378,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
/* Early sort out of cases where no render target is used */ /* Early sort out of cases where no render target is used */
if (!dstSwapchain && !srcSwapchain if (!dstSwapchain && !srcSwapchain
&& SrcSurface != device->render_targets[0] && Src != device->render_targets[0]
&& This != (IWineD3DSurfaceImpl *)device->render_targets[0]) && This != device->render_targets[0])
{ {
TRACE("No surface is render target, not using hardware blit. Src = %p, dst = %p\n", Src, This); TRACE("No surface is render target, not using hardware blit. Src = %p, dst = %p\n", Src, This);
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
@ -3498,17 +3499,17 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
} }
else if (dstSwapchain) else if (dstSwapchain)
{ {
/* Handled with regular texture -> swapchain blit. */ /* Handled with regular texture -> swapchain blit */
if (SrcSurface == device->render_targets[0]) if (Src == device->render_targets[0])
TRACE("Blit from active render target to a swapchain\n"); TRACE("Blit from active render target to a swapchain\n");
} }
else if (srcSwapchain && This == (IWineD3DSurfaceImpl *)device->render_targets[0]) else if (srcSwapchain && This == device->render_targets[0])
{ {
FIXME("Implement blit from a swapchain to the active render target\n"); FIXME("Implement blit from a swapchain to the active render target\n");
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
if ((srcSwapchain || SrcSurface == device->render_targets[0]) && !dstSwapchain) if ((srcSwapchain || Src == device->render_targets[0]) && !dstSwapchain)
{ {
/* Blit from render target to texture */ /* Blit from render target to texture */
BOOL stretchx; BOOL stretchx;

View File

@ -1666,7 +1666,7 @@ struct IWineD3DDeviceImpl
unsigned int highest_dirty_ps_const, highest_dirty_vs_const; unsigned int highest_dirty_ps_const, highest_dirty_vs_const;
/* Render Target Support */ /* Render Target Support */
IWineD3DSurface **render_targets; IWineD3DSurfaceImpl **render_targets;
IWineD3DSurface *auto_depth_stencil_buffer; IWineD3DSurface *auto_depth_stencil_buffer;
IWineD3DSurface *stencilBufferTarget; IWineD3DSurface *stencilBufferTarget;