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
59abf094
Commit
59abf094
authored
May 03, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
May 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement ID3DXBaseEffect::GetPixelShader().
parent
54833c9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
4 deletions
+49
-4
effect.c
dlls/d3dx9_36/effect.c
+49
-4
No files found.
dlls/d3dx9_36/effect.c
View file @
59abf094
...
...
@@ -325,6 +325,10 @@ static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child)
HeapFree
(
GetProcessHeap
(),
0
,
*
(
LPSTR
*
)
param
->
data
);
break
;
case
D3DXPT_PIXELSHADER
:
if
(
*
(
IUnknown
**
)
param
->
data
)
IUnknown_Release
(
*
(
IUnknown
**
)
param
->
data
);
break
;
default:
FIXME
(
"Unhandled type %s
\n
"
,
debug_d3dxparameter_type
(
param
->
type
));
break
;
...
...
@@ -993,8 +997,22 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetValue(ID3DXBaseEffect *iface, D3DXH
if
(
data
&&
param
&&
param
->
data
&&
param
->
bytes
<=
bytes
)
{
TRACE
(
"Copy %u bytes
\n
"
,
param
->
bytes
);
memcpy
(
data
,
param
->
data
,
param
->
bytes
);
if
(
param
->
type
==
D3DXPT_PIXELSHADER
)
{
UINT
i
;
for
(
i
=
0
;
i
<
(
param
->
element_count
?
param
->
element_count
:
1
);
++
i
)
{
IUnknown
*
unk
=
((
IUnknown
**
)
param
->
data
)[
i
];
if
(
unk
)
IUnknown_AddRef
(
unk
);
((
IUnknown
**
)
data
)[
i
]
=
unk
;
}
}
else
{
TRACE
(
"Copy %u bytes
\n
"
,
param
->
bytes
);
memcpy
(
data
,
param
->
data
,
param
->
bytes
);
}
return
D3D_OK
;
}
...
...
@@ -1306,10 +1324,23 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetTexture(ID3DXBaseEffect *iface, D3D
static
HRESULT
WINAPI
ID3DXBaseEffectImpl_GetPixelShader
(
ID3DXBaseEffect
*
iface
,
D3DXHANDLE
parameter
,
LPDIRECT3DPIXELSHADER9
*
pshader
)
{
struct
ID3DXBaseEffectImpl
*
This
=
impl_from_ID3DXBaseEffect
(
iface
);
struct
d3dx_parameter
*
param
=
is_valid_parameter
(
This
,
parameter
);
FIXME
(
"iface %p, parameter %p, pshader %p stub
\n
"
,
This
,
parameter
,
pshader
);
TRACE
(
"iface %p, parameter %p, pshader %p
\n
"
,
This
,
parameter
,
pshader
);
return
E_NOTIMPL
;
if
(
!
param
)
param
=
get_parameter_by_name
(
This
,
NULL
,
parameter
);
if
(
pshader
&&
param
&&
!
param
->
element_count
&&
param
->
type
==
D3DXPT_PIXELSHADER
)
{
*
pshader
=
*
(
LPDIRECT3DPIXELSHADER9
*
)
param
->
data
;
if
(
*
pshader
)
IDirect3DPixelShader9_AddRef
(
*
pshader
);
TRACE
(
"Returning %p
\n
"
,
*
pshader
);
return
D3D_OK
;
}
WARN
(
"Invalid argument specified
\n
"
);
return
D3DERR_INVALIDCALL
;
}
static
HRESULT
WINAPI
ID3DXBaseEffectImpl_GetVertexShader
(
ID3DXBaseEffect
*
iface
,
D3DXHANDLE
parameter
,
LPDIRECT3DVERTEXSHADER9
*
vshader
)
...
...
@@ -3054,6 +3085,7 @@ static HRESULT d3dx9_parse_value(struct d3dx_parameter *param, void *value, cons
switch
(
param
->
type
)
{
case
D3DXPT_STRING
:
case
D3DXPT_PIXELSHADER
:
read_dword
(
ptr
,
&
id
);
TRACE
(
"Id: %u
\n
"
,
id
);
param
->
base
->
objects
[
id
]
=
get_parameter_handle
(
param
);
...
...
@@ -3159,6 +3191,15 @@ static HRESULT d3dx9_parse_data(struct d3dx_parameter *param, const char **ptr)
}
break
;
case
D3DXPT_PIXELSHADER
:
hr
=
IDirect3DDevice9_CreatePixelShader
(
param
->
base
->
effect
->
device
,
(
DWORD
*
)
*
ptr
,
(
LPDIRECT3DPIXELSHADER9
*
)
param
->
data
);
if
(
hr
!=
D3D_OK
)
{
WARN
(
"Failed to create pixel shader
\n
"
);
return
hr
;
}
break
;
default:
FIXME
(
"Unhandled type %s
\n
"
,
debug_d3dxparameter_type
(
param
->
type
));
break
;
...
...
@@ -3247,6 +3288,10 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch
param
->
bytes
=
sizeof
(
LPCSTR
);
break
;
case
D3DXPT_PIXELSHADER
:
param
->
bytes
=
sizeof
(
LPDIRECT3DPIXELSHADER9
);
break
;
default:
FIXME
(
"Unhandled type %s
\n
"
,
debug_d3dxparameter_type
(
param
->
type
));
break
;
...
...
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