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
dc990b6b
Commit
dc990b6b
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 vshader_get_input().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8350e026
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
shader.c
dlls/wined3d/shader.c
+8
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/shader.c
View file @
dc990b6b
...
...
@@ -3578,24 +3578,24 @@ static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_id
return
FALSE
;
}
BOOL
vshader_get_input
(
const
struct
wined3d_shader
*
shader
,
BYTE
usage_req
,
BYTE
usage_idx_req
,
unsigned
int
*
regnum
)
bool
vshader_get_input
(
const
struct
wined3d_shader
*
shader
,
uint8_t
usage_req
,
uint8_t
usage_idx_req
,
unsigned
int
*
regnum
)
{
WORD
map
=
shader
->
reg_maps
.
input_registers
;
uint32_t
map
=
shader
->
reg_maps
.
input_registers
&
0xffff
;
unsigned
int
i
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
while
(
map
)
{
if
(
!
(
map
&
1
))
continue
;
i
=
wined3d_bit_scan
(
&
map
);
if
(
match_usage
(
shader
->
u
.
vs
.
attributes
[
i
].
usage
,
shader
->
u
.
vs
.
attributes
[
i
].
usage_idx
,
usage_req
,
usage_idx_req
))
{
*
regnum
=
i
;
return
TRUE
;
return
true
;
}
}
return
FALSE
;
return
false
;
}
static
HRESULT
shader_init
(
struct
wined3d_shader
*
shader
,
struct
wined3d_device
*
device
,
...
...
dlls/wined3d/wined3d_private.h
View file @
dc990b6b
...
...
@@ -5759,8 +5759,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
BOOL
position_transformed
,
struct
ps_compile_args
*
args
,
const
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BOOL
vshader_get_input
(
const
struct
wined3d_shader
*
shader
,
BYTE
usage_req
,
BYTE
usage_idx_req
,
unsigned
int
*
regnum
)
DECLSPEC_HIDDEN
;
bool
vshader_get_input
(
const
struct
wined3d_shader
*
shader
,
uint8_t
usage_req
,
uint8_t
usage_idx_req
,
unsigned
int
*
regnum
)
DECLSPEC_HIDDEN
;
void
find_vs_compile_args
(
const
struct
wined3d_state
*
state
,
const
struct
wined3d_shader
*
shader
,
struct
vs_compile_args
*
args
,
const
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
...
...
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