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
67b7a573
Commit
67b7a573
authored
Sep 23, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_state structure to set_tex_op().
parent
d0f7edd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
state.c
dlls/wined3d/state.c
+7
-9
No files found.
dlls/wined3d/state.c
View file @
67b7a573
...
...
@@ -2057,10 +2057,9 @@ static void get_src_and_opr(DWORD arg, BOOL is_alpha, GLenum* source, GLenum* op
}
/* Setup the texture operations texture stage states */
static
void
set_tex_op
(
const
struct
wined3d_
context
*
context
,
IWineD3DDevice
*
ifac
e
,
static
void
set_tex_op
(
const
struct
wined3d_
gl_info
*
gl_info
,
const
struct
wined3d_state
*
stat
e
,
BOOL
isAlpha
,
int
Stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLenum
src1
,
src2
,
src3
;
GLenum
opr1
,
opr2
,
opr3
;
GLenum
comb_target
;
...
...
@@ -2069,7 +2068,6 @@ static void set_tex_op(const struct wined3d_context *context, IWineD3DDevice *if
GLenum
scal_target
;
GLenum
opr
=
0
,
invopr
,
src3_target
,
opr3_target
;
BOOL
Handled
=
FALSE
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"Alpha?(%d), Stage:%d Op(%s), a1(%d), a2(%d), a3(%d)
\n
"
,
isAlpha
,
Stage
,
debug_d3dtop
(
op
),
arg1
,
arg2
,
arg3
);
...
...
@@ -2109,13 +2107,13 @@ static void set_tex_op(const struct wined3d_context *context, IWineD3DDevice *if
/* If a texture stage references an invalid texture unit the stage just
* passes through the result from the previous stage */
if
(
is_invalid_op
(
&
This
->
stateBlock
->
state
,
Stage
,
op
,
arg1
,
arg2
,
arg3
))
if
(
is_invalid_op
(
state
,
Stage
,
op
,
arg1
,
arg2
,
arg3
))
{
arg1
=
WINED3DTA_CURRENT
;
op
=
WINED3DTOP_SELECTARG1
;
}
if
(
isAlpha
&&
!
This
->
stateBlock
->
state
.
textures
[
Stage
]
&&
arg1
==
WINED3DTA_TEXTURE
)
if
(
isAlpha
&&
!
state
->
textures
[
Stage
]
&&
arg1
==
WINED3DTA_TEXTURE
)
{
get_src_and_opr
(
WINED3DTA_DIFFUSE
,
isAlpha
,
&
src1
,
&
opr1
);
}
else
{
...
...
@@ -3058,9 +3056,9 @@ static void set_tex_op(const struct wined3d_context *context, IWineD3DDevice *if
DWORD
op2
;
if
(
isAlpha
)
op2
=
This
->
stateBlock
->
state
.
texture_states
[
Stage
][
WINED3DTSS_COLOROP
];
op2
=
state
->
texture_states
[
Stage
][
WINED3DTSS_COLOROP
];
else
op2
=
This
->
stateBlock
->
state
.
texture_states
[
Stage
][
WINED3DTSS_ALPHAOP
];
op2
=
state
->
texture_states
[
Stage
][
WINED3DTSS_ALPHAOP
];
/* Note: If COMBINE4 in effect can't go back to combine! */
switch
(
op2
)
{
...
...
@@ -3155,7 +3153,7 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct
if
(
tex_used
)
texture_activate_dimensions
(
stage
,
stateblock
,
context
);
}
set_tex_op
(
context
,
(
IWineD3DDevice
*
)
stateblock
->
devic
e
,
FALSE
,
stage
,
set_tex_op
(
gl_info
,
&
stateblock
->
stat
e
,
FALSE
,
stage
,
stateblock
->
state
.
texture_states
[
stage
][
WINED3DTSS_COLOROP
],
stateblock
->
state
.
texture_states
[
stage
][
WINED3DTSS_COLORARG1
],
stateblock
->
state
.
texture_states
[
stage
][
WINED3DTSS_COLORARG2
],
...
...
@@ -3259,7 +3257,7 @@ void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d
}
else
{
set_tex_op
(
context
,
(
IWineD3DDevice
*
)
stateblock
->
devic
e
,
TRUE
,
stage
,
op
,
arg1
,
arg2
,
arg0
);
set_tex_op
(
gl_info
,
&
stateblock
->
stat
e
,
TRUE
,
stage
,
op
,
arg1
,
arg2
,
arg0
);
}
}
...
...
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