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
576e44e0
Commit
576e44e0
authored
Feb 01, 2022
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_bit_scan() in shader_arb_generate_pshader().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
59b06fdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-7
No files found.
dlls/wined3d/arb_program_shader.c
View file @
576e44e0
...
...
@@ -3512,17 +3512,18 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
BOOL
dcl_td
=
FALSE
;
BOOL
want_nv_prog
=
FALSE
;
struct
arb_pshader_private
*
shader_priv
=
shader
->
backend_data
;
DWORD
map
;
BOOL
custom_linear_fog
=
FALSE
;
uint32_t
map
;
char
srgbtmp
[
4
][
4
];
char
ftoa_tmp
[
17
];
unsigned
int
i
,
found
=
0
;
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
temporary
;
while
(
map
)
{
i
f
(
!
(
map
&
1
)
||
(
shader
->
u
.
ps
.
color0_mov
&&
i
==
shader
->
u
.
ps
.
color0_reg
)
i
=
wined3d_bit_scan
(
&
map
);
if
(
(
shader
->
u
.
ps
.
color0_mov
&&
i
==
shader
->
u
.
ps
.
color0_reg
)
||
(
reg_maps
->
shader_version
.
major
<
2
&&
!
i
))
continue
;
...
...
@@ -3681,12 +3682,12 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
/* Base Declarations */
shader_generate_arb_declarations
(
shader
,
reg_maps
,
buffer
,
gl_info
,
NULL
,
&
priv_ctx
);
for
(
i
=
0
,
map
=
reg_maps
->
bumpmat
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
bumpmat
;
while
(
map
)
{
unsigned
char
bump_const
;
if
(
!
(
map
&
1
))
continue
;
i
=
wined3d_bit_scan
(
&
map
);
bump_const
=
compiled
->
numbumpenvmatconsts
;
compiled
->
bumpenvmatconst
[
bump_const
].
const_num
=
WINED3D_CONST_NUM_UNUSED
;
compiled
->
bumpenvmatconst
[
bump_const
].
texunit
=
i
;
...
...
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