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
ed2860f7
Commit
ed2860f7
authored
Oct 06, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Split the clip_parameters[2] array.
parent
7f6ae94c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+11
-10
No files found.
dlls/wined3d/arb_program_shader.c
View file @
ed2860f7
...
...
@@ -158,7 +158,8 @@ struct arb_vs_compile_args
struct
{
WORD
bools
;
char
clip_control
[
2
];
char
clip_texcoord
;
char
clipplane_mask
;
}
boolclip
;
DWORD
boolclip_compare
;
};
...
...
@@ -2926,14 +2927,14 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh
shader_addline
(
buffer
,
"DP4 result.clip[%u].x, TMP_OUT, state.clip[%u].plane;
\n
"
,
i
,
i
);
}
}
else
if
(
args
->
boolclip
.
clip_
control
[
0
]
)
else
if
(
args
->
boolclip
.
clip_
texcoord
)
{
unsigned
int
cur_clip
=
0
;
char
component
[
4
]
=
{
'x'
,
'y'
,
'z'
,
'w'
};
for
(
i
=
0
;
i
<
GL_LIMITS
(
clipplanes
);
i
++
)
{
if
(
args
->
boolclip
.
clip
_control
[
1
]
&
(
1
<<
i
))
if
(
args
->
boolclip
.
clip
plane_mask
&
(
1
<<
i
))
{
shader_addline
(
buffer
,
"DP4 TA.%c, TMP_OUT, state.clip[%u].plane;
\n
"
,
component
[
cur_clip
++
],
i
);
...
...
@@ -2955,7 +2956,7 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh
break
;
}
shader_addline
(
buffer
,
"MOV result.texcoord[%u], TA;
\n
"
,
args
->
boolclip
.
clip_
control
[
0
]
-
1
);
args
->
boolclip
.
clip_
texcoord
-
1
);
}
/* Z coord [0;1]->[-1;1] mapping, see comment in transform_projection in state.c
...
...
@@ -4192,25 +4193,25 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
struct
arb_pshader_private
*
shader_priv
=
ps
->
baseShader
.
backend_data
;
args
->
ps_signature
=
shader_priv
->
input_signature_idx
;
args
->
boolclip
.
clip_
control
[
0
]
=
shader_priv
->
clipplane_emulation
+
1
;
args
->
boolclip
.
clip_
texcoord
=
shader_priv
->
clipplane_emulation
+
1
;
}
else
{
args
->
ps_signature
=
~
0
;
if
(
!
dev
->
vs_clipping
)
{
args
->
boolclip
.
clip_
control
[
0
]
=
ffp_clip_emul
(
stateblock
)
?
GL_LIMITS
(
texture_stages
)
:
0
;
args
->
boolclip
.
clip_
texcoord
=
ffp_clip_emul
(
stateblock
)
?
GL_LIMITS
(
texture_stages
)
:
0
;
}
/* Otherwise: Setting boolclip_compare set clip_
control[0]
to 0 */
/* Otherwise: Setting boolclip_compare set clip_
texcoord
to 0 */
}
if
(
args
->
boolclip
.
clip_
control
[
0
]
)
if
(
args
->
boolclip
.
clip_
texcoord
)
{
if
(
stateblock
->
renderState
[
WINED3DRS_CLIPPING
])
{
args
->
boolclip
.
clip
_control
[
1
]
=
stateblock
->
renderState
[
WINED3DRS_CLIPPLANEENABLE
];
args
->
boolclip
.
clip
plane_mask
=
stateblock
->
renderState
[
WINED3DRS_CLIPPLANEENABLE
];
}
/* clip
_control[1]
was set to 0 by setting boolclip_compare to 0 */
/* clip
plane_mask
was set to 0 by setting boolclip_compare to 0 */
}
/* This forces all local boolean constants to 1 to make them stateblock independent */
...
...
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