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
66d453ce
Commit
66d453ce
authored
Dec 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't declare more varyings than required by the shader model.
parent
4c6a4097
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
66d453ce
...
...
@@ -1129,16 +1129,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
*/
if
(
pshader
&&
reg_maps
->
shader_version
.
major
>=
3
)
{
UINT
in_count
=
min
(
vec4_varyings
(
reg_maps
->
shader_version
.
major
,
gl_info
),
shader
->
limits
.
packed_input
);
if
(
use_vs
(
state
))
{
shader_addline
(
buffer
,
"varying vec4 IN[%u];
\n
"
,
vec4_varyings
(
reg_maps
->
shader_version
.
major
,
gl_info
));
}
else
{
shader_addline
(
buffer
,
"varying vec4 IN[%u];
\n
"
,
in_count
);
else
/* TODO: Write a replacement shader for the fixed function vertex pipeline, so this isn't needed.
* For fixed function vertex processing + 3.0 pixel shader we need a separate function in the
* pixel shader that reads the fixed function color into the packed input registers.
*/
shader_addline
(
buffer
,
"vec4 IN[%u];
\n
"
,
vec4_varyings
(
reg_maps
->
shader_version
.
major
,
gl_info
));
}
* pixel shader that reads the fixed function color into the packed input registers. */
shader_addline
(
buffer
,
"vec4 IN[%u];
\n
"
,
in_count
);
}
/* Declare output register temporaries */
...
...
@@ -3916,8 +3915,9 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
}
else
{
UINT
in_count
=
min
(
vec4_varyings
(
ps_major
,
gl_info
),
ps
->
limits
.
packed_input
);
/* This one is tricky: a 3.0 pixel shader reads from a 3.0 vertex shader */
shader_addline
(
buffer
,
"varying vec4 IN[%u];
\n
"
,
vec4_varyings
(
3
,
gl_info
)
);
shader_addline
(
buffer
,
"varying vec4 IN[%u];
\n
"
,
in_count
);
shader_addline
(
buffer
,
"void order_ps_input(in vec4 OUT[%u]) {
\n
"
,
MAX_REG_OUTPUT
);
/* First, sort out position and point size. Those are not passed to the pixel shader */
...
...
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