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
9a9dfc76
Commit
9a9dfc76
authored
Oct 18, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make pixel shader input an array.
parent
672ed031
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
glsl_shader.c
dlls/wined3d/glsl_shader.c
+9
-10
No files found.
dlls/wined3d/glsl_shader.c
View file @
9a9dfc76
...
...
@@ -617,9 +617,8 @@ void shader_generate_glsl_declarations(
}
/* Declare input register temporaries */
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
packed_input
;
i
++
)
{
if
(
reg_maps
->
packed_input
[
i
])
shader_addline
(
buffer
,
"vec4 IN%lu;
\n
"
,
i
);
if
(
pshader
)
{
shader_addline
(
buffer
,
"vec4 IN[%lu];
\n
"
,
This
->
baseShader
.
limits
.
packed_input
);
}
/* Declare output register temporaries */
...
...
@@ -775,7 +774,7 @@ static void shader_glsl_get_register_name(
if
(
pshader
)
{
/* Pixel shaders >= 3.0 */
if
(
WINED3DSHADER_VERSION_MAJOR
(
This
->
baseShader
.
hex_version
)
>=
3
)
sprintf
(
tmpStr
,
"IN
%u
"
,
reg
);
sprintf
(
tmpStr
,
"IN
[%u]
"
,
reg
);
else
{
if
(
reg
==
0
)
strcpy
(
tmpStr
,
"gl_Color"
);
...
...
@@ -2514,28 +2513,28 @@ void pshader_glsl_input_pack(
case
WINED3DDECLUSAGE_COLOR
:
if
(
usage_idx
==
0
)
shader_addline
(
buffer
,
"IN
%u
%s = vec4(gl_Color)%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(gl_Color)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
else
if
(
usage_idx
==
1
)
shader_addline
(
buffer
,
"IN
%u
%s = vec4(gl_SecondaryColor)%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(gl_SecondaryColor)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
else
shader_addline
(
buffer
,
"IN
%u
%s = vec4(unsupported_color_input)%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(unsupported_color_input)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
break
;
case
WINED3DDECLUSAGE_TEXCOORD
:
shader_addline
(
buffer
,
"IN
%u
%s = vec4(gl_TexCoord[%u])%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(gl_TexCoord[%u])%s;
\n
"
,
i
,
reg_mask
,
usage_idx
,
reg_mask
);
break
;
case
WINED3DDECLUSAGE_FOG
:
shader_addline
(
buffer
,
"IN
%u
%s = vec4(gl_FogFragCoord)%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(gl_FogFragCoord)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
break
;
default:
shader_addline
(
buffer
,
"IN
%u
%s = vec4(unsupported_input)%s;
\n
"
,
shader_addline
(
buffer
,
"IN
[%u]
%s = vec4(unsupported_input)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
}
}
...
...
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