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
3b5c75d9
Commit
3b5c75d9
authored
Dec 31, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Convert clipplane to a bitmap in struct SAVEDSTATES.
parent
52a900d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
20 deletions
+24
-20
device.c
dlls/wined3d/device.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+22
-18
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
3b5c75d9
...
...
@@ -3038,7 +3038,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWO
return
WINED3DERR_INVALIDCALL
;
}
This
->
updateStateBlock
->
changed
.
clipplane
[
Index
]
=
TRUE
;
This
->
updateStateBlock
->
changed
.
clipplane
|=
1
<<
Index
;
if
(
This
->
updateStateBlock
->
clipplane
[
Index
][
0
]
==
pPlane
[
0
]
&&
This
->
updateStateBlock
->
clipplane
[
Index
][
1
]
==
pPlane
[
1
]
&&
...
...
dlls/wined3d/stateblock.c
View file @
3b5c75d9
...
...
@@ -93,7 +93,7 @@ static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES *
memcpy
(
dest
->
renderState
,
source
->
renderState
,
bsize
*
(
WINEHIGHEST_RENDER_STATE
+
1
));
memcpy
(
dest
->
textureState
,
source
->
textureState
,
bsize
*
MAX_TEXTURES
*
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
));
memcpy
(
dest
->
samplerState
,
source
->
samplerState
,
bsize
*
MAX_COMBINED_SAMPLERS
*
(
WINED3D_HIGHEST_SAMPLER_STATE
+
1
));
memcpy
(
dest
->
clipplane
,
source
->
clipplane
,
bsize
*
MAX_CLIPPLANES
)
;
dest
->
clipplane
=
source
->
clipplane
;
dest
->
pixelShaderConstantsB
=
source
->
pixelShaderConstantsB
;
dest
->
pixelShaderConstantsI
=
source
->
pixelShaderConstantsI
;
dest
->
vertexShaderConstantsB
=
source
->
vertexShaderConstantsB
;
...
...
@@ -130,7 +130,7 @@ void stateblock_savedstates_set(
memset
(
states
->
renderState
,
value
,
bsize
*
(
WINEHIGHEST_RENDER_STATE
+
1
));
memset
(
states
->
textureState
,
value
,
bsize
*
MAX_TEXTURES
*
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
));
memset
(
states
->
samplerState
,
value
,
bsize
*
MAX_COMBINED_SAMPLERS
*
(
WINED3D_HIGHEST_SAMPLER_STATE
+
1
));
memset
(
states
->
clipplane
,
value
,
bsize
*
MAX_CLIPPLANES
)
;
states
->
clipplane
=
value
?
0xffffffff
:
0
;
states
->
pixelShaderConstantsB
=
value
?
0xffff
:
0
;
states
->
pixelShaderConstantsI
=
value
?
0xffff
:
0
;
states
->
vertexShaderConstantsB
=
value
?
0xffff
:
0
;
...
...
@@ -372,7 +372,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
IWineD3DStateBlockImpl
*
This
=
(
IWineD3DStateBlockImpl
*
)
iface
;
IWineD3DStateBlockImpl
*
targetStateBlock
=
This
->
wineD3DDevice
->
stateBlock
;
unsigned
int
i
,
j
;
WORD
map
;
D
WORD
map
;
TRACE
(
"(%p) : Updating state block %p ------------------v
\n
"
,
targetStateBlock
,
This
);
...
...
@@ -543,9 +543,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
}
}
for
(
i
=
0
;
i
<
GL_LIMITS
(
clipplanes
);
i
++
)
{
if
(
This
->
changed
.
clipplane
[
i
]
&&
memcmp
(
targetStateBlock
->
clipplane
[
i
],
This
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
)))
map
=
This
->
changed
.
clipplane
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
!
(
map
&
1
))
continue
;
if
(
memcmp
(
targetStateBlock
->
clipplane
[
i
],
This
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
)))
{
TRACE
(
"Updating clipplane %u
\n
"
,
i
);
memcpy
(
This
->
clipplane
[
i
],
targetStateBlock
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
));
...
...
@@ -725,7 +728,7 @@ should really perform a delta so that only the changes get updated*/
UINT
i
;
UINT
j
;
WORD
map
;
D
WORD
map
;
TRACE
(
"(%p) : Applying state block %p ------------------v
\n
"
,
This
,
pDevice
);
...
...
@@ -839,18 +842,19 @@ should really perform a delta so that only the changes get updated*/
}
}
for
(
i
=
0
;
i
<
GL_LIMITS
(
clipplanes
);
i
++
)
{
if
(
This
->
changed
.
clipplane
[
i
])
{
float
clip
[
4
];
clip
[
0
]
=
This
->
clipplane
[
i
][
0
];
clip
[
1
]
=
This
->
clipplane
[
i
][
1
];
clip
[
2
]
=
This
->
clipplane
[
i
][
2
];
clip
[
3
]
=
This
->
clipplane
[
i
][
3
];
IWineD3DDevice_SetClipPlane
(
pDevice
,
i
,
clip
);
}
}
map
=
This
->
changed
.
clipplane
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
float
clip
[
4
];
if
(
!
(
map
&
1
))
continue
;
clip
[
0
]
=
This
->
clipplane
[
i
][
0
];
clip
[
1
]
=
This
->
clipplane
[
i
][
1
];
clip
[
2
]
=
This
->
clipplane
[
i
][
2
];
clip
[
3
]
=
This
->
clipplane
[
i
][
3
];
IWineD3DDevice_SetClipPlane
(
pDevice
,
i
,
clip
);
}
}
else
if
(
This
->
blockType
==
WINED3DSBT_VERTEXSTATE
)
{
IWineD3DDevice_SetVertexShader
(
pDevice
,
This
->
vertexShader
);
for
(
i
=
0
;
i
<
GL_LIMITS
(
vshader_constantsF
);
i
++
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
3b5c75d9
...
...
@@ -1765,7 +1765,7 @@ typedef struct SAVEDSTATES {
BOOL
renderState
[
WINEHIGHEST_RENDER_STATE
+
1
];
BOOL
textureState
[
MAX_TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
BOOL
samplerState
[
MAX_COMBINED_SAMPLERS
][
WINED3D_HIGHEST_SAMPLER_STATE
+
1
];
BOOL
clipplane
[
MAX_CLIPPLANES
];
DWORD
clipplane
;
/* WINED3DMAXUSERCLIPPLANES, 32 */
WORD
pixelShaderConstantsB
;
/* MAX_CONST_B, 16 */
WORD
pixelShaderConstantsI
;
/* MAX_CONST_I, 16 */
BOOL
*
pixelShaderConstantsF
;
...
...
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