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
dc67164d
Commit
dc67164d
authored
Apr 20, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix some more misspellings of "device".
parent
db4babfb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
42 deletions
+41
-42
directx.c
dlls/wined3d/directx.c
+2
-2
stateblock.c
dlls/wined3d/stateblock.c
+33
-33
swapchain_base.c
dlls/wined3d/swapchain_base.c
+5
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/directx.c
View file @
dc67164d
...
...
@@ -326,9 +326,9 @@ fail:
}
/* Adjust the amount of used texture memory */
long
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
D3DD
evice
,
long
glram
)
long
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
d
evice
,
long
glram
)
{
struct
wined3d_adapter
*
adapter
=
D3DD
evice
->
adapter
;
struct
wined3d_adapter
*
adapter
=
d
evice
->
adapter
;
adapter
->
UsedTextureRam
+=
glram
;
TRACE
(
"Adjusted gl ram by %ld to %d
\n
"
,
glram
,
adapter
->
UsedTextureRam
);
...
...
dlls/wined3d/stateblock.c
View file @
dc67164d
...
...
@@ -866,7 +866,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
return
WINED3D_OK
;
}
static
void
apply_lights
(
IWineD3DDevice
*
pD
evice
,
const
IWineD3DStateBlockImpl
*
This
)
static
void
apply_lights
(
IWineD3DDevice
*
d
evice
,
const
IWineD3DStateBlockImpl
*
This
)
{
UINT
i
;
for
(
i
=
0
;
i
<
LIGHTMAP_SIZE
;
i
++
)
{
...
...
@@ -876,8 +876,8 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *
{
const
struct
wined3d_light_info
*
light
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
);
IWineD3DDevice_SetLight
(
pD
evice
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
IWineD3DDevice_SetLightEnable
(
pD
evice
,
light
->
OriginalIndex
,
light
->
glIndex
!=
-
1
);
IWineD3DDevice_SetLight
(
d
evice
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
IWineD3DDevice_SetLightEnable
(
d
evice
,
light
->
OriginalIndex
,
light
->
glIndex
!=
-
1
);
}
}
}
...
...
@@ -885,58 +885,58 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *
static
HRESULT
WINAPI
IWineD3DStateBlockImpl_Apply
(
IWineD3DStateBlock
*
iface
)
{
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
IWineD3DDevice
*
pD
evice
=
(
IWineD3DDevice
*
)
This
->
device
;
IWineD3DDevice
*
d
evice
=
(
IWineD3DDevice
*
)
This
->
device
;
unsigned
int
i
;
DWORD
map
;
TRACE
(
"(%p) : Applying state block %p ------------------v
\n
"
,
This
,
pD
evice
);
TRACE
(
"(%p) : Applying state block %p ------------------v
\n
"
,
This
,
d
evice
);
TRACE
(
"Blocktype: %d
\n
"
,
This
->
blockType
);
if
(
This
->
changed
.
vertexShader
)
IWineD3DDevice_SetVertexShader
(
pD
evice
,
This
->
vertexShader
);
if
(
This
->
changed
.
vertexShader
)
IWineD3DDevice_SetVertexShader
(
d
evice
,
This
->
vertexShader
);
/* Vertex Shader Constants */
for
(
i
=
0
;
i
<
This
->
num_contained_vs_consts_f
;
++
i
)
{
IWineD3DDevice_SetVertexShaderConstantF
(
pD
evice
,
This
->
contained_vs_consts_f
[
i
],
IWineD3DDevice_SetVertexShaderConstantF
(
d
evice
,
This
->
contained_vs_consts_f
[
i
],
This
->
vertexShaderConstantF
+
This
->
contained_vs_consts_f
[
i
]
*
4
,
1
);
}
for
(
i
=
0
;
i
<
This
->
num_contained_vs_consts_i
;
++
i
)
{
IWineD3DDevice_SetVertexShaderConstantI
(
pD
evice
,
This
->
contained_vs_consts_i
[
i
],
IWineD3DDevice_SetVertexShaderConstantI
(
d
evice
,
This
->
contained_vs_consts_i
[
i
],
This
->
vertexShaderConstantI
+
This
->
contained_vs_consts_i
[
i
]
*
4
,
1
);
}
for
(
i
=
0
;
i
<
This
->
num_contained_vs_consts_b
;
++
i
)
{
IWineD3DDevice_SetVertexShaderConstantB
(
pD
evice
,
This
->
contained_vs_consts_b
[
i
],
IWineD3DDevice_SetVertexShaderConstantB
(
d
evice
,
This
->
contained_vs_consts_b
[
i
],
This
->
vertexShaderConstantB
+
This
->
contained_vs_consts_b
[
i
],
1
);
}
apply_lights
(
pD
evice
,
This
);
apply_lights
(
d
evice
,
This
);
if
(
This
->
changed
.
pixelShader
)
IWineD3DDevice_SetPixelShader
(
pD
evice
,
This
->
pixelShader
);
if
(
This
->
changed
.
pixelShader
)
IWineD3DDevice_SetPixelShader
(
d
evice
,
This
->
pixelShader
);
/* Pixel Shader Constants */
for
(
i
=
0
;
i
<
This
->
num_contained_ps_consts_f
;
++
i
)
{
IWineD3DDevice_SetPixelShaderConstantF
(
pD
evice
,
This
->
contained_ps_consts_f
[
i
],
IWineD3DDevice_SetPixelShaderConstantF
(
d
evice
,
This
->
contained_ps_consts_f
[
i
],
This
->
pixelShaderConstantF
+
This
->
contained_ps_consts_f
[
i
]
*
4
,
1
);
}
for
(
i
=
0
;
i
<
This
->
num_contained_ps_consts_i
;
++
i
)
{
IWineD3DDevice_SetPixelShaderConstantI
(
pD
evice
,
This
->
contained_ps_consts_i
[
i
],
IWineD3DDevice_SetPixelShaderConstantI
(
d
evice
,
This
->
contained_ps_consts_i
[
i
],
This
->
pixelShaderConstantI
+
This
->
contained_ps_consts_i
[
i
]
*
4
,
1
);
}
for
(
i
=
0
;
i
<
This
->
num_contained_ps_consts_b
;
++
i
)
{
IWineD3DDevice_SetPixelShaderConstantB
(
pD
evice
,
This
->
contained_ps_consts_b
[
i
],
IWineD3DDevice_SetPixelShaderConstantB
(
d
evice
,
This
->
contained_ps_consts_b
[
i
],
This
->
pixelShaderConstantB
+
This
->
contained_ps_consts_b
[
i
],
1
);
}
/* Render */
for
(
i
=
0
;
i
<
This
->
num_contained_render_states
;
++
i
)
{
IWineD3DDevice_SetRenderState
(
pD
evice
,
This
->
contained_render_states
[
i
],
IWineD3DDevice_SetRenderState
(
d
evice
,
This
->
contained_render_states
[
i
],
This
->
renderState
[
This
->
contained_render_states
[
i
]]);
}
...
...
@@ -946,7 +946,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
DWORD
stage
=
This
->
contained_tss_states
[
i
].
stage
;
DWORD
state
=
This
->
contained_tss_states
[
i
].
state
;
IWineD3DDevice_SetTextureStageState
(
pD
evice
,
stage
,
state
,
This
->
textureState
[
stage
][
state
]);
IWineD3DDevice_SetTextureStageState
(
d
evice
,
stage
,
state
,
This
->
textureState
[
stage
][
state
]);
}
/* Sampler states */
...
...
@@ -957,12 +957,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
DWORD
value
=
This
->
samplerState
[
stage
][
state
];
if
(
stage
>=
MAX_FRAGMENT_SAMPLERS
)
stage
+=
WINED3DVERTEXTEXTURESAMPLER0
-
MAX_FRAGMENT_SAMPLERS
;
IWineD3DDevice_SetSamplerState
(
pD
evice
,
stage
,
state
,
value
);
IWineD3DDevice_SetSamplerState
(
d
evice
,
stage
,
state
,
value
);
}
for
(
i
=
0
;
i
<
This
->
num_contained_transform_states
;
++
i
)
{
IWineD3DDevice_SetTransform
(
pD
evice
,
This
->
contained_transform_states
[
i
],
IWineD3DDevice_SetTransform
(
d
evice
,
This
->
contained_transform_states
[
i
],
&
This
->
transforms
[
This
->
contained_transform_states
[
i
]]);
}
...
...
@@ -974,40 +974,40 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
indices
)
{
IWineD3DDevice_SetIndexBuffer
(
pD
evice
,
This
->
pIndexData
,
This
->
IndexFmt
);
IWineD3DDevice_SetBaseVertexIndex
(
pD
evice
,
This
->
baseVertexIndex
);
IWineD3DDevice_SetIndexBuffer
(
d
evice
,
This
->
pIndexData
,
This
->
IndexFmt
);
IWineD3DDevice_SetBaseVertexIndex
(
d
evice
,
This
->
baseVertexIndex
);
}
if
(
This
->
changed
.
vertexDecl
&&
This
->
vertexDecl
)
{
IWineD3DDevice_SetVertexDeclaration
(
pD
evice
,
This
->
vertexDecl
);
IWineD3DDevice_SetVertexDeclaration
(
d
evice
,
This
->
vertexDecl
);
}
if
(
This
->
changed
.
material
)
{
IWineD3DDevice_SetMaterial
(
pD
evice
,
&
This
->
material
);
IWineD3DDevice_SetMaterial
(
d
evice
,
&
This
->
material
);
}
if
(
This
->
changed
.
viewport
)
{
IWineD3DDevice_SetViewport
(
pD
evice
,
&
This
->
viewport
);
IWineD3DDevice_SetViewport
(
d
evice
,
&
This
->
viewport
);
}
if
(
This
->
changed
.
scissorRect
)
{
IWineD3DDevice_SetScissorRect
(
pD
evice
,
&
This
->
scissorRect
);
IWineD3DDevice_SetScissorRect
(
d
evice
,
&
This
->
scissorRect
);
}
map
=
This
->
changed
.
streamSource
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
IWineD3DDevice_SetStreamSource
(
pD
evice
,
i
,
This
->
streamSource
[
i
],
0
,
This
->
streamStride
[
i
]);
if
(
map
&
1
)
IWineD3DDevice_SetStreamSource
(
d
evice
,
i
,
This
->
streamSource
[
i
],
0
,
This
->
streamStride
[
i
]);
}
map
=
This
->
changed
.
streamFreq
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
IWineD3DDevice_SetStreamSourceFreq
(
pD
evice
,
i
,
This
->
streamFreq
[
i
]
|
This
->
streamFlags
[
i
]);
if
(
map
&
1
)
IWineD3DDevice_SetStreamSourceFreq
(
d
evice
,
i
,
This
->
streamFreq
[
i
]
|
This
->
streamFlags
[
i
]);
}
map
=
This
->
changed
.
textures
;
...
...
@@ -1018,7 +1018,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if
(
!
(
map
&
1
))
continue
;
stage
=
i
<
MAX_FRAGMENT_SAMPLERS
?
i
:
WINED3DVERTEXTEXTURESAMPLER0
+
i
-
MAX_FRAGMENT_SAMPLERS
;
IWineD3DDevice_SetTexture
(
pD
evice
,
stage
,
This
->
textures
[
i
]);
IWineD3DDevice_SetTexture
(
d
evice
,
stage
,
This
->
textures
[
i
]);
}
map
=
This
->
changed
.
clipplane
;
...
...
@@ -1032,7 +1032,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
clip
[
1
]
=
This
->
clipplane
[
i
][
1
];
clip
[
2
]
=
This
->
clipplane
[
i
][
2
];
clip
[
3
]
=
This
->
clipplane
[
i
][
3
];
IWineD3DDevice_SetClipPlane
(
pD
evice
,
i
,
clip
);
IWineD3DDevice_SetClipPlane
(
d
evice
,
i
,
clip
);
}
This
->
device
->
stateBlock
->
lowest_disabled_stage
=
MAX_TEXTURES
-
1
;
...
...
@@ -1044,7 +1044,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
break
;
}
}
TRACE
(
"(%p) : Applied state block %p ------------------^
\n
"
,
This
,
pD
evice
);
TRACE
(
"(%p) : Applied state block %p ------------------^
\n
"
,
This
,
d
evice
);
return
WINED3D_OK
;
}
...
...
@@ -1052,8 +1052,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
static
HRESULT
WINAPI
IWineD3DStateBlockImpl_InitStartupStateBlock
(
IWineD3DStateBlock
*
iface
)
{
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
IWineD3DDevice
*
device
=
(
IWineD3DDevice
*
)
This
->
device
;
IWineD3DDeviceImpl
*
ThisDevice
=
(
IWineD3DDeviceImpl
*
)
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
ThisDevice
->
adapter
->
gl_info
;
IWineD3DDeviceImpl
*
device_impl
=
(
IWineD3DDeviceImpl
*
)
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device_impl
->
adapter
->
gl_info
;
union
{
WINED3DLINEPATTERN
lp
;
DWORD
d
;
...
...
@@ -1070,7 +1070,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
/* Note this may have a large overhead but it should only be executed
once, in order to initialize the complete state of the device and
all opengl equivalents */
TRACE
(
"(%p) -----------------------> Setting up device defaults... %p
\n
"
,
This
,
ThisD
evice
);
TRACE
(
"(%p) -----------------------> Setting up device defaults... %p
\n
"
,
This
,
d
evice
);
/* TODO: make a special stateblock type for the primary stateblock (it never gets applied so it doesn't need a real type) */
This
->
blockType
=
WINED3DSBT_INIT
;
...
...
@@ -1083,7 +1083,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
TRACE
(
"Render states
\n
"
);
/* Render states: */
if
(
ThisDevice
->
auto_depth_stencil
)
if
(
device_impl
->
auto_depth_stencil
)
IWineD3DDevice_SetRenderState
(
device
,
WINED3DRS_ZENABLE
,
WINED3DZB_TRUE
);
else
IWineD3DDevice_SetRenderState
(
device
,
WINED3DRS_ZENABLE
,
WINED3DZB_FALSE
);
...
...
dlls/wined3d/swapchain_base.c
View file @
dc67164d
...
...
@@ -145,15 +145,14 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface
return
hr
;
}
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetDevice
(
IWineD3DSwapChain
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetDevice
(
IWineD3DSwapChain
*
iface
,
IWineD3DDevice
**
device
)
{
IWineD3DSwapChainImpl
*
This
=
(
IWineD3DSwapChainImpl
*
)
iface
;
*
ppDevice
=
(
IWineD3DDevice
*
)
This
->
device
;
*
device
=
(
IWineD3DDevice
*
)
This
->
device
;
IWineD3DDevice_AddRef
(
*
device
);
/* Note Calling this method will increase the internal reference count
on the IDirect3DDevice9 interface. */
IWineD3DDevice_AddRef
(
*
ppDevice
);
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppDevice
);
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
device
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
dc67164d
...
...
@@ -2602,7 +2602,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *ifac
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetDisplayMode
(
IWineD3DSwapChain
*
iface
,
WINED3DDISPLAYMODE
*
pMode
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetDevice
(
IWineD3DSwapChain
*
iface
,
IWineD3DDevice
**
ppD
evice
)
DECLSPEC_HIDDEN
;
IWineD3DDevice
**
d
evice
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_GetPresentParameters
(
IWineD3DSwapChain
*
iface
,
WINED3DPRESENT_PARAMETERS
*
pPresentationParameters
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSwapChainImpl_SetGammaRamp
(
IWineD3DSwapChain
*
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