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
78577127
Commit
78577127
authored
Jun 05, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the BaseVertexIndex parameter to…
wined3d: Get rid of the BaseVertexIndex parameter to IWineD3DDeviceImpl_SetIndices, use SetBaseVertexIndex instead.
parent
45b531fc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
27 deletions
+17
-27
device.c
dlls/d3d8/device.c
+2
-2
device.c
dlls/d3d9/device.c
+2
-3
device.c
dlls/ddraw/device.c
+3
-6
surface.c
dlls/ddraw/surface.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-11
stateblock.c
dlls/wined3d/stateblock.c
+4
-2
wined3d_interface.h
include/wine/wined3d_interface.h
+2
-2
No files found.
dlls/d3d8/device.c
View file @
78577127
...
...
@@ -1444,9 +1444,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEV
static
HRESULT
WINAPI
IDirect3DDevice8Impl_SetIndices
(
LPDIRECT3DDEVICE8
iface
,
IDirect3DIndexBuffer8
*
pIndexData
,
UINT
baseVertexIndex
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
IWineD3DDevice_SetBaseVertexIndex
(
This
->
WineD3DDevice
,
baseVertexIndex
);
return
IWineD3DDevice_SetIndices
(
This
->
WineD3DDevice
,
NULL
==
pIndexData
?
NULL
:
((
IDirect3DIndexBuffer8Impl
*
)
pIndexData
)
->
wineD3DIndexBuffer
,
baseVertexIndex
);
pIndexData
?
((
IDirect3DIndexBuffer8Impl
*
)
pIndexData
)
->
wineD3DIndexBuffer
:
NULL
);
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_GetIndices
(
LPDIRECT3DDEVICE8
iface
,
IDirect3DIndexBuffer8
**
ppIndexData
,
UINT
*
pBaseVertexIndex
)
{
...
...
dlls/d3d9/device.c
View file @
78577127
...
...
@@ -910,9 +910,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(LPDIRECT3DDEVIC
static
HRESULT
WINAPI
IDirect3DDevice9Impl_SetIndices
(
LPDIRECT3DDEVICE9
iface
,
IDirect3DIndexBuffer9
*
pIndexData
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DDevice_SetIndices
(
This
->
WineD3DDevice
,
pIndexData
==
NULL
?
NULL
:
((
IDirect3DIndexBuffer9Impl
*
)
pIndexData
)
->
wineD3DIndexBuffer
,
0
);
return
IWineD3DDevice_SetIndices
(
This
->
WineD3DDevice
,
pIndexData
?
((
IDirect3DIndexBuffer9Impl
*
)
pIndexData
)
->
wineD3DIndexBuffer
:
NULL
);
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetIndices
(
LPDIRECT3DDEVICE9
iface
,
IDirect3DIndexBuffer9
**
ppIndexData
)
{
...
...
dlls/ddraw/device.c
View file @
78577127
...
...
@@ -288,9 +288,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
EnterCriticalSection
(
&
ddraw_cs
);
/* Free the index buffer. */
IWineD3DDevice_SetIndices
(
This
->
wineD3DDevice
,
NULL
,
0
);
IWineD3DDevice_SetIndices
(
This
->
wineD3DDevice
,
NULL
);
IWineD3DIndexBuffer_GetParent
(
This
->
indexbuffer
,
(
IUnknown
**
)
&
IndexBufferParent
);
IParent_Release
(
IndexBufferParent
);
/* Once for the getParent */
...
...
@@ -3896,9 +3894,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
}
/* Set the index stream */
hr
=
IWineD3DDevice_SetIndices
(
This
->
wineD3DDevice
,
This
->
indexbuffer
,
StartVertex
);
IWineD3DDevice_SetBaseVertexIndex
(
This
->
wineD3DDevice
,
StartVertex
);
hr
=
IWineD3DDevice_SetIndices
(
This
->
wineD3DDevice
,
This
->
indexbuffer
);
/* Set the vertex stream source */
hr
=
IWineD3DDevice_SetStreamSource
(
This
->
wineD3DDevice
,
...
...
dlls/ddraw/surface.c
View file @
78577127
...
...
@@ -311,7 +311,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
TRACE
(
"(%p) Destroying the render target, uninitializing D3D
\n
"
,
This
);
/* Unset any index buffer, just to be sure */
IWineD3DDevice_SetIndices
(
ddraw
->
wineD3DDevice
,
NULL
,
0
);
IWineD3DDevice_SetIndices
(
ddraw
->
wineD3DDevice
,
NULL
);
IWineD3DDevice_SetDepthStencilSurface
(
ddraw
->
wineD3DDevice
,
NULL
);
if
(
IWineD3DDevice_Uninit3D
(
ddraw
->
wineD3DDevice
,
D3D7CB_DestroyDepthStencilSurface
,
D3D7CB_DestroySwapChain
)
!=
D3D_OK
)
...
...
dlls/wined3d/device.c
View file @
78577127
...
...
@@ -2751,19 +2751,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINE
/*****
* Get / Set Indices
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetIndices
(
IWineD3DDevice
*
iface
,
IWineD3DIndexBuffer
*
pIndexData
,
UINT
BaseVertexIndex
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetIndices
(
IWineD3DDevice
*
iface
,
IWineD3DIndexBuffer
*
pIndexData
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DIndexBuffer
*
oldIdxs
;
UINT
oldBaseIndex
=
This
->
updateStateBlock
->
baseVertexIndex
;
TRACE
(
"(%p) : Setting to %p
, base %d
\n
"
,
This
,
pIndexData
,
BaseVertexIndex
);
TRACE
(
"(%p) : Setting to %p
\n
"
,
This
,
pIndexData
);
oldIdxs
=
This
->
updateStateBlock
->
pIndexData
;
This
->
updateStateBlock
->
changed
.
indices
=
TRUE
;
This
->
updateStateBlock
->
set
.
indices
=
TRUE
;
This
->
updateStateBlock
->
pIndexData
=
pIndexData
;
This
->
updateStateBlock
->
baseVertexIndex
=
BaseVertexIndex
;
/* Handle recording of state blocks */
if
(
This
->
isRecordingState
)
{
...
...
@@ -2771,12 +2768,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine
return
WINED3D_OK
;
}
/* The base vertex index affects the stream sources, while
* The index buffer is a seperate index buffer state
*/
if
(
BaseVertexIndex
!=
oldBaseIndex
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_STREAMSRC
);
}
if
(
oldIdxs
!=
pIndexData
)
{
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_INDEXBUFFER
);
}
...
...
@@ -2817,6 +2808,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *ifac
TRACE
(
"Recording... not performing anything
\n
"
);
return
WINED3D_OK
;
}
/* The base vertex index affects the stream sources */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_STREAMSRC
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/stateblock.c
View file @
78577127
...
...
@@ -711,8 +711,10 @@ should really perform a delta so that only the changes get updated*/
IWineD3DDevice_SetTransform
(
pDevice
,
i
,
&
This
->
transforms
[
i
]);
}
if
(
This
->
set
.
indices
&&
This
->
changed
.
indices
)
IWineD3DDevice_SetIndices
(
pDevice
,
This
->
pIndexData
,
This
->
baseVertexIndex
);
if
(
This
->
set
.
indices
&&
This
->
changed
.
indices
)
{
IWineD3DDevice_SetIndices
(
pDevice
,
This
->
pIndexData
);
IWineD3DDevice_SetBaseVertexIndex
(
pDevice
,
This
->
baseVertexIndex
);
}
if
(
This
->
set
.
material
&&
This
->
changed
.
material
)
IWineD3DDevice_SetMaterial
(
pDevice
,
&
This
->
material
);
...
...
include/wine/wined3d_interface.h
View file @
78577127
...
...
@@ -403,7 +403,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD
(
GetFVF
)(
THIS_
DWORD
*
pfvf
)
PURE
;
STDMETHOD_
(
void
,
SetGammaRamp
)(
THIS_
UINT
iSwapChain
,
DWORD
Flags
,
CONST
WINED3DGAMMARAMP
*
pRamp
)
PURE
;
STDMETHOD_
(
void
,
GetGammaRamp
)(
THIS_
UINT
iSwapChain
,
WINED3DGAMMARAMP
*
pRamp
)
PURE
;
STDMETHOD
(
SetIndices
)(
THIS_
struct
IWineD3DIndexBuffer
*
pIndexData
,
UINT
BaseVertexIndex
)
PURE
;
STDMETHOD
(
SetIndices
)(
THIS_
struct
IWineD3DIndexBuffer
*
pIndexData
)
PURE
;
STDMETHOD
(
GetIndices
)(
THIS_
struct
IWineD3DIndexBuffer
**
ppIndexData
,
UINT
*
pBaseVertexIndex
)
PURE
;
STDMETHOD
(
SetBaseVertexIndex
)(
THIS_
UINT
baseIndex
);
STDMETHOD
(
SetLight
)(
THIS_
DWORD
Index
,
CONST
WINED3DLIGHT
*
pLight
)
PURE
;
...
...
@@ -539,7 +539,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_GetDepthStencilSurface(p,a) (p)->lpVtbl->GetDepthStencilSurface(p,a)
#define IWineD3DDevice_SetGammaRamp(p,a,b,c) (p)->lpVtbl->SetGammaRamp(p,a,b,c)
#define IWineD3DDevice_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
#define IWineD3DDevice_SetIndices(p,a
,b) (p)->lpVtbl->SetIndices(p,a,b
)
#define IWineD3DDevice_SetIndices(p,a
) (p)->lpVtbl->SetIndices(p,a
)
#define IWineD3DDevice_GetIndices(p,a,b) (p)->lpVtbl->GetIndices(p,a,b)
#define IWineD3DDevice_SetBaseVertexIndex(p, a) (p)->lpVtbl->SetBaseVertexIndex(p, a)
#define IWineD3DDevice_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
...
...
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