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
2650885c
Commit
2650885c
authored
Dec 29, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the element size to create "isStateDirty" bitmap indices.
parent
9ae92661
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
context.c
dlls/wined3d/context.c
+4
-4
device.c
dlls/wined3d/device.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
No files found.
dlls/wined3d/context.c
View file @
2650885c
...
...
@@ -898,8 +898,8 @@ static void Context_MarkStateDirty(struct wined3d_context *context, DWORD state,
if
(
isStateDirty
(
context
,
rep
))
return
;
context
->
dirtyArray
[
context
->
numDirtyEntries
++
]
=
rep
;
idx
=
rep
>>
5
;
shift
=
rep
&
0x1f
;
idx
=
rep
/
(
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
;
shift
=
rep
&
((
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
-
1
)
;
context
->
isStateDirty
[
idx
]
|=
(
1
<<
shift
);
}
...
...
@@ -2194,8 +2194,8 @@ static void context_apply_state(struct wined3d_context *context, IWineD3DDeviceI
for
(
i
=
0
;
i
<
context
->
numDirtyEntries
;
++
i
)
{
DWORD
rep
=
context
->
dirtyArray
[
i
];
DWORD
idx
=
rep
>>
5
;
BYTE
shift
=
rep
&
0x1f
;
DWORD
idx
=
rep
/
(
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
;
BYTE
shift
=
rep
&
((
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
-
1
)
;
context
->
isStateDirty
[
idx
]
&=
~
(
1
<<
shift
);
state_table
[
rep
].
apply
(
rep
,
device
->
stateBlock
,
context
);
}
...
...
dlls/wined3d/device.c
View file @
2650885c
...
...
@@ -7015,8 +7015,8 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
if
(
isStateDirty
(
context
,
rep
))
continue
;
context
->
dirtyArray
[
context
->
numDirtyEntries
++
]
=
rep
;
idx
=
rep
>>
5
;
shift
=
rep
&
0x1f
;
idx
=
rep
/
(
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
;
shift
=
rep
&
((
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
-
1
)
;
context
->
isStateDirty
[
idx
]
|=
(
1
<<
shift
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
2650885c
...
...
@@ -1028,7 +1028,7 @@ struct wined3d_context
*/
DWORD
dirtyArray
[
STATE_HIGHEST
+
1
];
/* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD
numDirtyEntries
;
DWORD
isStateDirty
[
STATE_HIGHEST
/
32
+
1
];
/* Bitmap to find out quickly if a state is dirty */
DWORD
isStateDirty
[
STATE_HIGHEST
/
(
sizeof
(
DWORD
)
*
CHAR_BIT
)
+
1
];
/* Bitmap to find out quickly if a state is dirty */
IWineD3DSurface
*
surface
;
IWineD3DSurface
*
current_rt
;
...
...
@@ -1614,8 +1614,8 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) DE
static
inline
BOOL
isStateDirty
(
struct
wined3d_context
*
context
,
DWORD
state
)
{
DWORD
idx
=
state
>>
5
;
BYTE
shift
=
state
&
0x1f
;
DWORD
idx
=
state
/
(
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
;
BYTE
shift
=
state
&
((
sizeof
(
*
context
->
isStateDirty
)
*
CHAR_BIT
)
-
1
)
;
return
context
->
isStateDirty
[
idx
]
&
(
1
<<
shift
);
}
...
...
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