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
973496d5
Commit
973496d5
authored
Jul 01, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jul 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Cleanup shader_glsl_load_psamplers().
parent
6421d45f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-6
No files found.
dlls/wined3d/glsl_shader.c
View file @
973496d5
...
...
@@ -85,15 +85,17 @@ static void shader_glsl_load_psamplers(
int
i
;
char
sampler_name
[
20
];
for
(
i
=
0
;
i
<
GL_LIMITS
(
fragment_samplers
)
;
++
i
)
{
if
(
stateBlock
->
textures
[
i
]
!=
NULL
)
{
snprintf
(
sampler_name
,
sizeof
(
sampler_name
),
"Psampler%d"
,
i
);
name_loc
=
GL_EXTCALL
(
glGetUniformLocationARB
(
programId
,
sampler_name
));
i
f
(
name_loc
!=
-
1
)
{
int
mapped_unit
=
stateBlock
->
wineD3DDevice
->
texUnitMap
[
i
];
for
(
i
=
0
;
i
<
MAX_FRAGMENT_SAMPLERS
;
++
i
)
{
snprintf
(
sampler_name
,
sizeof
(
sampler_name
),
"Psampler%d"
,
i
);
name_loc
=
GL_EXTCALL
(
glGetUniformLocationARB
(
programId
,
sampler_name
)
);
if
(
name_loc
!=
-
1
)
{
i
nt
mapped_unit
=
stateBlock
->
wineD3DDevice
->
texUnitMap
[
i
];
if
(
mapped_unit
!=
-
1
&&
mapped_unit
<
GL_LIMITS
(
fragment_samplers
))
{
TRACE
(
"Loading %s for texture %d
\n
"
,
sampler_name
,
mapped_unit
);
GL_EXTCALL
(
glUniform1iARB
(
name_loc
,
mapped_unit
));
checkGLcall
(
"glUniform1iARB"
);
}
else
{
ERR
(
"Trying to load sampler %s on unsupported unit %d
\n
"
,
sampler_name
,
mapped_unit
);
}
}
}
...
...
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