Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
90e44375
Commit
90e44375
authored
Oct 20, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a parameter for SetRenderTarget viewport setup.
parent
1f261160
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
20 deletions
+13
-20
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+1
-1
device.c
dlls/ddraw/device.c
+4
-2
direct3d.c
dlls/ddraw/direct3d.c
+2
-12
device.c
dlls/wined3d/device.c
+3
-3
wined3d.idl
include/wine/wined3d.idl
+2
-1
No files found.
dlls/d3d8/device.c
View file @
90e44375
...
...
@@ -1005,7 +1005,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 ifa
{
hr
=
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
pZSurface
?
pZSurface
->
wineD3DSurface
:
NULL
);
if
(
SUCCEEDED
(
hr
)
&&
pSurface
)
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
0
,
pSurface
->
wineD3DSurface
);
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
0
,
pSurface
->
wineD3DSurface
,
TRUE
);
if
(
FAILED
(
hr
))
IWineD3DDevice_SetDepthStencilSurface
(
This
->
WineD3DDevice
,
original_ds
);
}
if
(
original_ds
)
IWineD3DSurface_Release
(
original_ds
);
...
...
dlls/d3d9/device.c
View file @
90e44375
...
...
@@ -1042,7 +1042,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9EX
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
pSurface
?
pSurface
->
wineD3DSurface
:
NULL
);
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
WineD3DDevice
,
RenderTargetIndex
,
pSurface
?
pSurface
->
wineD3DSurface
:
NULL
,
TRUE
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/ddraw/device.c
View file @
90e44375
...
...
@@ -348,7 +348,8 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
* vanish soon.
*/
IWineD3DDevice_SetRenderTarget
(
This
->
wineD3DDevice
,
0
,
This
->
ddraw
->
d3d_target
->
WineD3DSurface
);
This
->
ddraw
->
d3d_target
->
WineD3DSurface
,
FALSE
);
/* This->target is the offscreen target.
* This->ddraw->d3d_target is the target used by DDraw
*/
...
...
@@ -1984,7 +1985,8 @@ IDirect3DDeviceImpl_7_SetRenderTarget(IDirect3DDevice7 *iface,
hr
=
IWineD3DDevice_SetRenderTarget
(
This
->
wineD3DDevice
,
0
,
Target
?
Target
->
WineD3DSurface
:
NULL
);
Target
?
Target
->
WineD3DSurface
:
NULL
,
FALSE
);
if
(
hr
!=
D3D_OK
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
dlls/ddraw/direct3d.c
View file @
90e44375
...
...
@@ -865,7 +865,6 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
if
(
!
(
target
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
&&
(
This
->
d3d_target
!=
target
))
{
WINED3DVIEWPORT
vp
;
TRACE
(
"(%p) Using %p as front buffer, %p as back buffer
\n
"
,
This
,
This
->
d3d_target
,
target
);
hr
=
IWineD3DDevice_SetFrontBackBuffers
(
This
->
wineD3DDevice
,
This
->
d3d_target
->
WineD3DSurface
,
...
...
@@ -875,17 +874,8 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
/* Render to the back buffer */
IWineD3DDevice_SetRenderTarget
(
This
->
wineD3DDevice
,
0
,
target
->
WineD3DSurface
);
vp
.
X
=
0
;
vp
.
Y
=
0
;
vp
.
Width
=
target
->
surface_desc
.
dwWidth
;
vp
.
Height
=
target
->
surface_desc
.
dwHeight
;
vp
.
MinZ
=
0
.
0
;
vp
.
MaxZ
=
1
.
0
;
IWineD3DDevice_SetViewport
(
This
->
wineD3DDevice
,
&
vp
);
target
->
WineD3DSurface
,
TRUE
);
object
->
OffScreenTarget
=
TRUE
;
}
else
...
...
dlls/wined3d/device.c
View file @
90e44375
...
...
@@ -6184,9 +6184,9 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
context_release
(
context
);
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetRenderTarget
(
IWineD3DDevice
*
iface
,
DWORD
RenderTargetIndex
,
IWineD3DSurface
*
pRenderTarget
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetRenderTarget
(
IWineD3DDevice
*
iface
,
DWORD
RenderTargetIndex
,
IWineD3DSurface
*
pRenderTarget
,
BOOL
set_viewport
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
int
dxVersion
=
(
(
IWineD3DImpl
*
)
This
->
wineD3D
)
->
dxVersion
;
TRACE
(
"(%p) : Setting rendertarget %d to %p
\n
"
,
This
,
RenderTargetIndex
,
pRenderTarget
);
...
...
@@ -6220,7 +6220,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
This
->
render_targets
[
RenderTargetIndex
]
=
pRenderTarget
;
/* Render target 0 is special */
if
(
RenderTargetIndex
==
0
&&
dxVersion
>
7
)
{
if
(
RenderTargetIndex
==
0
&&
set_viewport
)
{
/* Finally, reset the viewport and scissor rect as the MSDN states.
* Tests show that stateblock recording is ignored, the change goes
* directly into the primary stateblock.
...
...
include/wine/wined3d.idl
View file @
90e44375
...
...
@@ -3205,7 +3205,8 @@ interface IWineD3DDevice : IWineD3DBase
)
;
HRESULT
SetRenderTarget
(
[
in
]
DWORD
render_target_idx
,
[
in
]
IWineD3DSurface
*
render_target
[
in
]
IWineD3DSurface
*
render_target
,
[
in
]
BOOL
set_viewport
)
;
HRESULT
GetRenderTarget
(
[
in
]
DWORD
render_target_idx
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment