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
1e332808
Commit
1e332808
authored
Jan 26, 2022
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_bit_scan() in wined3d_device_process_vertices().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dc990b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
device.c
dlls/wined3d/device.c
+12
-12
No files found.
dlls/wined3d/device.c
View file @
1e332808
...
...
@@ -3509,8 +3509,8 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
struct
wined3d_box
box
=
{
0
};
struct
wined3d_shader
*
vs
;
unsigned
int
i
,
j
;
uint32_t
map
;
HRESULT
hr
;
WORD
map
;
TRACE
(
"device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
"dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.
\n
"
,
...
...
@@ -3530,14 +3530,13 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
* VBOs in those buffers and fix up the stream_info structure.
*
* Also apply the start index. */
for
(
i
=
0
,
map
=
stream_info
.
use_map
;
map
;
map
>>=
1
,
++
i
)
map
=
stream_info
.
use_map
;
while
(
map
)
{
struct
wined3d_stream_info_element
*
e
;
struct
wined3d_map_desc
map_desc
;
if
(
!
(
map
&
1
))
continue
;
i
=
wined3d_bit_scan
(
&
map
);
e
=
&
stream_info
.
elements
[
i
];
resource
=
&
state
->
streams
[
e
->
stream_idx
].
buffer
->
resource
;
box
.
left
=
src_start_idx
*
e
->
stride
;
...
...
@@ -3545,10 +3544,12 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
if
(
FAILED
(
wined3d_resource_map
(
resource
,
0
,
&
map_desc
,
&
box
,
WINED3D_MAP_READ
)))
{
ERR
(
"Failed to map resource.
\n
"
);
for
(
j
=
0
,
map
=
stream_info
.
use_map
;
map
&&
j
<
i
;
map
>>=
1
,
++
j
)
map
=
stream_info
.
use_map
;
while
(
map
)
{
if
(
!
(
map
&
1
))
continue
;
j
=
wined3d_bit_scan
(
&
map
);
if
(
j
>=
i
)
break
;
e
=
&
stream_info
.
elements
[
j
];
resource
=
&
state
->
streams
[
e
->
stream_idx
].
buffer
->
resource
;
...
...
@@ -3564,11 +3565,10 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
hr
=
process_vertices_strided
(
device
,
dst_idx
,
vertex_count
,
&
stream_info
,
dst_buffer
,
flags
,
dst_fvf
);
for
(
i
=
0
,
map
=
stream_info
.
use_map
;
map
;
map
>>=
1
,
++
i
)
map
=
stream_info
.
use_map
;
while
(
map
)
{
if
(
!
(
map
&
1
))
continue
;
i
=
wined3d_bit_scan
(
&
map
);
resource
=
&
state
->
streams
[
stream_info
.
elements
[
i
].
stream_idx
].
buffer
->
resource
;
if
(
FAILED
(
wined3d_resource_unmap
(
resource
,
0
)))
ERR
(
"Failed to unmap resource.
\n
"
);
...
...
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