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
59b06fdb
Commit
59b06fdb
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_generate_arb_declarations().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b7b841eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+13
-7
No files found.
dlls/wined3d/arb_program_shader.c
View file @
59b06fdb
...
...
@@ -765,7 +765,7 @@ static void shader_generate_arb_declarations(const struct wined3d_shader *shader
char
pshader
=
shader_is_pshader_version
(
reg_maps
->
shader_version
.
type
);
const
struct
wined3d_shader_lconst
*
lconst
;
unsigned
max_constantsF
;
DWORD
map
;
uint32_t
map
;
/* In pixel shaders, all private constants are program local, we don't need anything
* from program.env. Thus we can advertise the full set of constants in pixel shaders.
...
...
@@ -837,21 +837,27 @@ static void shader_generate_arb_declarations(const struct wined3d_shader *shader
}
}
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
temporary
;
while
(
map
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"TEMP R%u;
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"TEMP R%u;
\n
"
,
i
);
}
for
(
i
=
0
,
map
=
reg_maps
->
address
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
address
;
while
(
map
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"ADDRESS A%u;
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"ADDRESS A%u;
\n
"
,
i
);
}
if
(
pshader
&&
reg_maps
->
shader_version
.
major
==
1
&&
reg_maps
->
shader_version
.
minor
<=
3
)
{
for
(
i
=
0
,
map
=
reg_maps
->
texcoord
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
texcoord
;
while
(
map
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"TEMP T%u;
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"TEMP T%u;
\n
"
,
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