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
468b1d9d
Commit
468b1d9d
authored
Apr 25, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_vec4 structure to apply_clamped_constant().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
364701db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+11
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
468b1d9d
...
...
@@ -625,16 +625,17 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con
}
/* Context activation is done by the caller. */
static
inline
void
apply_clamped_constant
(
const
struct
wined3d_gl_info
*
gl_info
,
GLint
location
,
const
GLfloat
*
data
)
static
inline
void
apply_clamped_constant
(
const
struct
wined3d_gl_info
*
gl_info
,
GLint
location
,
const
struct
wined3d_vec4
*
data
)
{
GLfloat
clamped_constant
[
4
];
if
(
location
==
-
1
)
return
;
clamped_constant
[
0
]
=
data
[
0
]
<
-
1
.
0
f
?
-
1
.
0
f
:
data
[
0
]
>
1
.
0
f
?
1
.
0
f
:
data
[
0
]
;
clamped_constant
[
1
]
=
data
[
1
]
<
-
1
.
0
f
?
-
1
.
0
f
:
data
[
1
]
>
1
.
0
f
?
1
.
0
f
:
data
[
1
]
;
clamped_constant
[
2
]
=
data
[
2
]
<
-
1
.
0
f
?
-
1
.
0
f
:
data
[
2
]
>
1
.
0
f
?
1
.
0
f
:
data
[
2
]
;
clamped_constant
[
3
]
=
data
[
3
]
<
-
1
.
0
f
?
-
1
.
0
f
:
data
[
3
]
>
1
.
0
f
?
1
.
0
f
:
data
[
3
]
;
clamped_constant
[
0
]
=
data
->
x
<
-
1
.
0
f
?
-
1
.
0
f
:
data
->
x
>
1
.
0
f
?
1
.
0
f
:
data
->
x
;
clamped_constant
[
1
]
=
data
->
y
<
-
1
.
0
f
?
-
1
.
0
f
:
data
->
y
>
1
.
0
f
?
1
.
0
f
:
data
->
y
;
clamped_constant
[
2
]
=
data
->
z
<
-
1
.
0
f
?
-
1
.
0
f
:
data
->
z
>
1
.
0
f
?
1
.
0
f
:
data
->
z
;
clamped_constant
[
3
]
=
data
->
w
<
-
1
.
0
f
?
-
1
.
0
f
:
data
->
w
>
1
.
0
f
?
1
.
0
f
:
data
->
w
;
GL_EXTCALL
(
glUniform4fv
(
location
,
1
,
clamped_constant
));
}
...
...
@@ -650,7 +651,7 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
if
(
heap
->
entries
[
heap_idx
].
version
<=
version
)
return
;
idx
=
heap
->
entries
[
heap_idx
].
idx
;
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
&
constants
[
idx
*
4
]);
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
(
const
struct
wined3d_vec4
*
)
&
constants
[
idx
*
4
]);
stack
[
stack_idx
]
=
HEAP_NODE_TRAVERSE_LEFT
;
while
(
stack_idx
>=
0
)
...
...
@@ -665,7 +666,8 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
{
heap_idx
=
left_idx
;
idx
=
heap
->
entries
[
heap_idx
].
idx
;
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
&
constants
[
idx
*
4
]);
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
(
const
struct
wined3d_vec4
*
)
&
constants
[
idx
*
4
]);
stack
[
stack_idx
++
]
=
HEAP_NODE_TRAVERSE_RIGHT
;
stack
[
stack_idx
]
=
HEAP_NODE_TRAVERSE_LEFT
;
...
...
@@ -680,7 +682,8 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
{
heap_idx
=
right_idx
;
idx
=
heap
->
entries
[
heap_idx
].
idx
;
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
&
constants
[
idx
*
4
]);
apply_clamped_constant
(
gl_info
,
constant_locations
[
idx
],
(
const
struct
wined3d_vec4
*
)
&
constants
[
idx
*
4
]);
stack
[
stack_idx
++
]
=
HEAP_NODE_POP
;
stack
[
stack_idx
]
=
HEAP_NODE_TRAVERSE_LEFT
;
...
...
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