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
1a7dbab1
Commit
1a7dbab1
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_generate_glsl_declarations().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bbb7d41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+13
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
1a7dbab1
...
...
@@ -2168,7 +2168,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
const
struct
wined3d_shader_lconst
*
lconst
;
const
char
*
prefix
;
unsigned
int
i
;
DWORD
map
;
uint32_t
map
;
if
(
wined3d_settings
.
strict_shader_math
)
shader_addline
(
buffer
,
"#pragma optionNV(fastmath off)
\n
"
);
...
...
@@ -2176,9 +2176,11 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
prefix
=
shader_glsl_get_prefix
(
version
->
type
);
/* Prototype the subroutines */
for
(
i
=
0
,
map
=
reg_maps
->
labels
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
labels
;
while
(
map
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"void subroutine%u();
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"void subroutine%u();
\n
"
,
i
);
}
if
(
version
->
type
!=
WINED3D_SHADER_TYPE_PIXEL
&&
version
->
type
!=
WINED3D_SHADER_TYPE_COMPUTE
)
...
...
@@ -2500,9 +2502,11 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
/* Declare address variables */
for
(
i
=
0
,
map
=
reg_maps
->
address
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
address
;
while
(
map
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"ivec4 A%u;
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"ivec4 A%u;
\n
"
,
i
);
}
/* Declare output register temporaries */
...
...
@@ -2517,10 +2521,11 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
else
if
(
version
->
major
<
4
)
{
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
map
=
reg_maps
->
temporary
;
while
(
map
)
{
i
f
(
map
&
1
)
shader_addline
(
buffer
,
"vec4 R%u;
\n
"
,
i
);
i
=
wined3d_bit_scan
(
&
map
);
shader_addline
(
buffer
,
"vec4 R%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