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
837e6050
Commit
837e6050
authored
Jan 28, 2022
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_bit_scan() in shader_arb_load_np2fixup_constants().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4946471b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+10
-11
No files found.
dlls/wined3d/arb_program_shader.c
View file @
837e6050
...
@@ -497,27 +497,26 @@ static void shader_arb_load_np2fixup_constants(const struct arb_ps_np2fixup_info
...
@@ -497,27 +497,26 @@ static void shader_arb_load_np2fixup_constants(const struct arb_ps_np2fixup_info
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
)
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_state
*
state
)
{
{
GLfloat
np2fixup_constants
[
4
*
WINED3D_MAX_FRAGMENT_SAMPLERS
];
GLfloat
np2fixup_constants
[
4
*
WINED3D_MAX_FRAGMENT_SAMPLERS
];
WORD
active
=
fixup
->
super
.
active
;
uint32_t
active
=
fixup
->
super
.
active
;
UINT
i
;
const
struct
wined3d_texture
*
tex
;
unsigned
char
idx
;
GLfloat
*
tex_dim
;
unsigned
int
i
;
if
(
!
active
)
if
(
!
active
)
return
;
return
;
for
(
i
=
0
;
active
;
active
>>=
1
,
++
i
)
while
(
active
)
{
{
const
struct
wined3d_texture
*
tex
=
state
->
textures
[
i
];
i
=
wined3d_bit_scan
(
&
active
);
unsigned
char
idx
=
fixup
->
super
.
idx
[
i
];
if
(
!
(
tex
=
state
->
textures
[
i
]))
GLfloat
*
tex_dim
=
&
np2fixup_constants
[(
idx
>>
1
)
*
4
];
if
(
!
(
active
&
1
))
continue
;
if
(
!
tex
)
{
{
ERR
(
"Nonexistent texture is flagged for NP2 texcoord fixup.
\n
"
);
ERR
(
"Nonexistent texture is flagged for NP2 texcoord fixup.
\n
"
);
continue
;
continue
;
}
}
idx
=
fixup
->
super
.
idx
[
i
];
tex_dim
=
&
np2fixup_constants
[(
idx
>>
1
)
*
4
];
if
(
idx
%
2
)
if
(
idx
%
2
)
{
{
tex_dim
[
2
]
=
tex
->
pow2_matrix
[
0
];
tex_dim
[
2
]
=
tex
->
pow2_matrix
[
0
];
...
...
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