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
20e63160
Commit
20e63160
authored
Apr 03, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Initialize some ARB shader output parameters.
parent
70a6495a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+21
-6
No files found.
dlls/wined3d/arb_program_shader.c
View file @
20e63160
...
...
@@ -1987,12 +1987,27 @@ static void shader_arb_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFF
/* We need a constant to fixup the final position */
shader_addline
(
buffer
,
"PARAM posFixup = program.env[%d];
\n
"
,
ARB_SHADER_PRIVCONST_POS
);
if
((
GLINFO_LOCATION
).
set_texcoord_w
)
{
int
i
;
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
if
(
This
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
0
&&
This
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
WINED3DSP_WRITEMASK_ALL
)
{
shader_addline
(
buffer
,
"MOV result.texcoord[%u].w, -helper_const.y;
\n
"
,
i
);
/* Initialize output parameters. GL_ARB_vertex_program does not require special initialization values
* for output parameters. D3D in theory does not do that either, but some applications depend on a
* proper initialization of the secondary color, and programs using the fixed function pipeline without
* a replacement shader depend on the texcoord.w beeing set properly.
*
* GL_NV_vertex_program defines that all output values are initialized to {0.0, 0.0, 0.0, 1.0}. This
* assetion is in effect even when using GL_ARB_vertex_program without any NV specific additions. So
* skip this if NV_vertex_program is supported. Otherwise, initialize the secondary color. For the tex-
* coords, we have a flag in the opengl caps. Many cards do not require the texcoord beeing set, and
* this can eat a number of instructions, so skip it unless this cap is set as well
*/
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
))
{
shader_addline
(
buffer
,
"MOV result.color.secondary, -helper_const.wwwy;
\n
"
);
if
((
GLINFO_LOCATION
).
set_texcoord_w
)
{
int
i
;
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
if
(
This
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
0
&&
This
->
baseShader
.
reg_maps
.
texcoord_mask
[
i
]
!=
WINED3DSP_WRITEMASK_ALL
)
{
shader_addline
(
buffer
,
"MOV result.texcoord[%u].w, -helper_const.y;
\n
"
,
i
);
}
}
}
}
...
...
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