Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bbb7d41e
Commit
bbb7d41e
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_glsl_load_constantsB().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f150854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-9
No files found.
dlls/wined3d/glsl_shader.c
View file @
bbb7d41e
...
...
@@ -1239,16 +1239,15 @@ static void shader_glsl_load_constants_i(const struct wined3d_shader *shader, co
}
/* Context activation is done by the caller. */
static
void
shader_glsl_load_constants
B
(
const
struct
wined3d_shader
*
shader
,
const
struct
wined3d_gl_info
*
gl_info
,
const
GLint
locations
[
WINED3D_MAX_CONSTS_B
],
const
BOOL
*
constants
,
WORD
constants_set
)
static
void
shader_glsl_load_constants
_b
(
const
struct
wined3d_shader
*
shader
,
const
struct
wined3d_gl_info
*
gl_info
,
const
BOOL
*
constants
,
const
GLint
locations
[
WINED3D_MAX_CONSTS_B
],
uint32_t
constants_set
)
{
unsigned
int
i
;
struct
list
*
ptr
;
for
(
i
=
0
;
constants_set
;
constants_set
>>=
1
,
++
i
)
while
(
constants_set
)
{
if
(
!
(
constants_set
&
1
))
continue
;
i
=
wined3d_bit_scan
(
&
constants_set
);
GL_EXTCALL
(
glUniform1iv
(
locations
[
i
],
1
,
&
constants
[
i
]));
}
...
...
@@ -1546,8 +1545,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
prog
->
vs
.
uniform_i_locations
,
vshader
->
reg_maps
.
integer_constants
);
if
(
update_mask
&
WINED3D_SHADER_CONST_VS_B
)
shader_glsl_load_constants
B
(
vshader
,
gl_info
,
prog
->
vs
.
uniform_b_locations
,
state
->
vs_consts_b
,
vshader
->
reg_maps
.
boolean_constants
);
shader_glsl_load_constants
_b
(
vshader
,
gl_info
,
state
->
vs_consts_b
,
prog
->
vs
.
uniform_b_locations
,
vshader
->
reg_maps
.
boolean_constants
);
if
(
update_mask
&
WINED3D_SHADER_CONST_VS_CLIP_PLANES
)
{
...
...
@@ -1699,8 +1698,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
prog
->
ps
.
uniform_i_locations
,
pshader
->
reg_maps
.
integer_constants
);
if
(
update_mask
&
WINED3D_SHADER_CONST_PS_B
)
shader_glsl_load_constants
B
(
pshader
,
gl_info
,
prog
->
ps
.
uniform_b_locations
,
state
->
ps_consts_b
,
pshader
->
reg_maps
.
boolean_constants
);
shader_glsl_load_constants
_b
(
pshader
,
gl_info
,
state
->
ps_consts_b
,
p
rog
->
ps
.
uniform_b_locations
,
p
shader
->
reg_maps
.
boolean_constants
);
if
(
update_mask
&
WINED3D_SHADER_CONST_PS_BUMP_ENV
)
{
...
...
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