Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7b9d4e3
Commit
b7b9d4e3
authored
Dec 24, 2006
by
Chris Robinson
Committed by
Alexandre Julliard
Dec 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d: GetStreamSource on a stream with NULL data isn't an error.
parent
c5b8df48
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
9 deletions
+31
-9
device.c
dlls/d3d8/device.c
+3
-1
device.c
dlls/d3d8/tests/device.c
+9
-0
device.c
dlls/d3d9/device.c
+3
-1
device.c
dlls/d3d9/tests/device.c
+10
-0
device.c
dlls/wined3d/device.c
+6
-7
No files found.
dlls/d3d8/device.c
View file @
b7b9d4e3
...
...
@@ -1498,7 +1498,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 ifa
IWineD3DVertexBuffer_GetParent
(
retStream
,
(
IUnknown
**
)
pStream
);
IWineD3DVertexBuffer_Release
(
retStream
);
}
else
{
FIXME
(
"Call to GetStreamSource failed %p
\n
"
,
pStride
);
if
(
rc
!=
D3D_OK
){
FIXME
(
"Call to GetStreamSource failed %p
\n
"
,
pStride
);
}
*
pStream
=
NULL
;
}
...
...
dlls/d3d8/tests/device.c
View file @
b7b9d4e3
...
...
@@ -407,13 +407,22 @@ static void test_refcount(void)
CHECK_CALL
(
hr
,
"CreateVertexBuffer"
,
pDevice
,
++
refcount
);
if
(
pVertexBuffer
)
{
IDirect3DVertexBuffer8
*
pVBuf
=
(
void
*
)
~
0
;
UINT
stride
=
~
0
;
tmp
=
get_refcount
(
(
IUnknown
*
)
pVertexBuffer
);
hr
=
IDirect3DDevice8_SetStreamSource
(
pDevice
,
0
,
pVertexBuffer
,
3
*
sizeof
(
float
));
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
hr
=
IDirect3DDevice8_SetStreamSource
(
pDevice
,
0
,
NULL
,
0
);
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
hr
=
IDirect3DDevice8_GetStreamSource
(
pDevice
,
0
,
&
pVBuf
,
&
stride
);
ok
(
SUCCEEDED
(
hr
),
"GetStreamSource did not succeed with NULL stream!
\n
"
);
ok
(
pVBuf
==
NULL
,
"pVBuf not NULL (%p)!
\n
"
,
pVBuf
);
ok
(
stride
==
3
*
sizeof
(
float
),
"stride not %u (got %u)!
\n
"
,
3
*
sizeof
(
float
),
stride
);
}
/* Shaders */
hr
=
IDirect3DDevice8_CreateVertexShader
(
pDevice
,
decl
,
simple_vs
,
&
dVertexShader
,
0
);
CHECK_CALL
(
hr
,
"CreateVertexShader"
,
pDevice
,
refcount
);
...
...
dlls/d3d9/device.c
View file @
b7b9d4e3
...
...
@@ -800,7 +800,9 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(LPDIRECT3DDEVICE9 iface, U
IWineD3DVertexBuffer_GetParent
(
retStream
,
(
IUnknown
**
)
pStream
);
IWineD3DVertexBuffer_Release
(
retStream
);
}
else
{
FIXME
(
"Call to GetStreamSource failed %p %p
\n
"
,
OffsetInBytes
,
pStride
);
if
(
rc
!=
D3D_OK
){
FIXME
(
"Call to GetStreamSource failed %p %p
\n
"
,
OffsetInBytes
,
pStride
);
}
*
pStream
=
NULL
;
}
return
rc
;
...
...
dlls/d3d9/tests/device.c
View file @
b7b9d4e3
...
...
@@ -455,12 +455,22 @@ static void test_refcount(void)
CHECK_CALL
(
hr
,
"CreateVertexBuffer"
,
pDevice
,
++
refcount
);
if
(
pVertexBuffer
)
{
IDirect3DVertexBuffer9
*
pVBuf
=
(
void
*
)
~
0
;
UINT
offset
=
~
0
;
UINT
stride
=
~
0
;
tmp
=
get_refcount
(
(
IUnknown
*
)
pVertexBuffer
);
hr
=
IDirect3DDevice9_SetStreamSource
(
pDevice
,
0
,
pVertexBuffer
,
0
,
3
*
sizeof
(
float
));
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
hr
=
IDirect3DDevice9_SetStreamSource
(
pDevice
,
0
,
NULL
,
0
,
0
);
CHECK_CALL
(
hr
,
"SetStreamSource"
,
pVertexBuffer
,
tmp
);
hr
=
IDirect3DDevice9_GetStreamSource
(
pDevice
,
0
,
&
pVBuf
,
&
offset
,
&
stride
);
ok
(
SUCCEEDED
(
hr
),
"GetStreamSource did not succeed with NULL stream!
\n
"
);
ok
(
pVBuf
==
NULL
,
"pVBuf not NULL (%p)!
\n
"
,
pVBuf
);
ok
(
stride
==
3
*
sizeof
(
float
),
"stride not %u (got %u)!
\n
"
,
3
*
sizeof
(
float
),
stride
);
ok
(
offset
==
0
,
"offset not 0 (got %u)!
\n
"
,
offset
);
}
/* Shaders */
hr
=
IDirect3DDevice9_CreateVertexDeclaration
(
pDevice
,
decl
,
&
pVertexDeclaration
);
...
...
dlls/wined3d/device.c
View file @
b7b9d4e3
...
...
@@ -2421,9 +2421,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface,
This
->
updateStateBlock
->
changed
.
streamSource
[
StreamNumber
]
=
TRUE
;
This
->
updateStateBlock
->
set
.
streamSource
[
StreamNumber
]
=
TRUE
;
This
->
updateStateBlock
->
streamStride
[
StreamNumber
]
=
Stride
;
This
->
updateStateBlock
->
streamSource
[
StreamNumber
]
=
pStreamData
;
This
->
updateStateBlock
->
streamOffset
[
StreamNumber
]
=
OffsetInBytes
;
if
(
pStreamData
)
{
This
->
updateStateBlock
->
streamStride
[
StreamNumber
]
=
Stride
;
This
->
updateStateBlock
->
streamOffset
[
StreamNumber
]
=
OffsetInBytes
;
}
This
->
updateStateBlock
->
streamFlags
[
StreamNumber
]
=
streamFlags
;
/* Handle recording of state blocks */
...
...
@@ -2487,12 +2489,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface,
*
pOffset
=
This
->
stateBlock
->
streamOffset
[
StreamNumber
];
}
if
(
*
pStream
==
NULL
)
{
FIXME
(
"Attempting to get an empty stream %d, returning WINED3DERR_INVALIDCALL
\n
"
,
StreamNumber
);
return
WINED3DERR_INVALIDCALL
;
if
(
*
pStream
!=
NULL
)
{
IWineD3DVertexBuffer_AddRef
(
*
pStream
);
/* We have created a new reference to the VB */
}
IWineD3DVertexBuffer_AddRef
(
*
pStream
);
/* We have created a new reference to the VB */
return
WINED3D_OK
;
}
...
...
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