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
704f0efe
Commit
704f0efe
authored
Jul 05, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Use unsafe_impl_from_IDirect3DPixelShader9 for an app provided iface.
parent
db1dd902
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-0
device.c
dlls/d3d9/device.c
+2
-1
shader.c
dlls/d3d9/shader.c
+15
-0
No files found.
dlls/d3d9/d3d9_private.h
View file @
704f0efe
...
...
@@ -437,6 +437,7 @@ typedef struct IDirect3DPixelShader9Impl {
HRESULT
pixelshader_init
(
IDirect3DPixelShader9Impl
*
shader
,
IDirect3DDevice9Impl
*
device
,
const
DWORD
*
byte_code
)
DECLSPEC_HIDDEN
;
IDirect3DPixelShader9Impl
*
unsafe_impl_from_IDirect3DPixelShader9
(
IDirect3DPixelShader9
*
iface
)
DECLSPEC_HIDDEN
;
/* --------------- */
/* IDirect3DQuery9 */
...
...
dlls/d3d9/device.c
View file @
704f0efe
...
...
@@ -2607,13 +2607,14 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *if
IDirect3DPixelShader9
*
shader
)
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
IDirect3DPixelShader9Impl
*
shader_obj
=
unsafe_impl_from_IDirect3DPixelShader9
(
shader
);
HRESULT
hr
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_pixel_shader
(
This
->
wined3d_device
,
shader
?
((
IDirect3DPixelShader9Impl
*
)
shader
)
->
wined3d_shader
:
NULL
);
shader
_obj
?
shader_obj
->
wined3d_shader
:
NULL
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/shader.c
View file @
704f0efe
...
...
@@ -18,6 +18,7 @@
*/
#include "config.h"
#include <assert.h>
#include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d9
);
...
...
@@ -150,6 +151,11 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
return
D3D_OK
;
}
static
inline
IDirect3DPixelShader9Impl
*
impl_from_IDirect3DPixelShader9
(
IDirect3DPixelShader9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DPixelShader9Impl
,
lpVtbl
);
}
static
HRESULT
WINAPI
d3d9_pixelshader_QueryInterface
(
IDirect3DPixelShader9
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
...
...
@@ -276,3 +282,12 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl
return
D3D_OK
;
}
IDirect3DPixelShader9Impl
*
unsafe_impl_from_IDirect3DPixelShader9
(
IDirect3DPixelShader9
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d9_pixelshader_vtbl
);
return
impl_from_IDirect3DPixelShader9
(
iface
);
}
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