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
0924f969
Commit
0924f969
authored
Jul 12, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Jul 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Texture stages that reference NULL textures should just pass
through the result of the previous stage.
parent
70902595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
utils.c
dlls/wined3d/utils.c
+25
-0
No files found.
dlls/wined3d/utils.c
View file @
0924f969
...
@@ -653,6 +653,17 @@ typedef struct {
...
@@ -653,6 +653,17 @@ typedef struct {
GLenum
component_usage
[
3
];
GLenum
component_usage
[
3
];
}
tex_op_args
;
}
tex_op_args
;
static
BOOL
is_invalid_op
(
IWineD3DDeviceImpl
*
This
,
int
stage
,
D3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
{
if
(
op
==
D3DTOP_DISABLE
)
return
FALSE
;
if
(
This
->
stateBlock
->
textures
[
stage
])
return
FALSE
;
if
(
arg1
==
D3DTA_TEXTURE
&&
op
!=
D3DTOP_SELECTARG2
)
return
TRUE
;
if
(
arg2
==
D3DTA_TEXTURE
&&
op
!=
D3DTOP_SELECTARG1
)
return
TRUE
;
if
(
arg3
==
D3DTA_TEXTURE
&&
(
op
==
D3DTOP_MULTIPLYADD
||
op
==
D3DTOP_LERP
))
return
TRUE
;
return
FALSE
;
}
void
set_tex_op_nvrc
(
IWineD3DDevice
*
iface
,
BOOL
is_alpha
,
int
stage
,
D3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
,
INT
texture_idx
)
{
void
set_tex_op_nvrc
(
IWineD3DDevice
*
iface
,
BOOL
is_alpha
,
int
stage
,
D3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
,
INT
texture_idx
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
tex_op_args
tex_op_args
=
{{
0
},
{
0
},
{
0
}};
tex_op_args
tex_op_args
=
{{
0
},
{
0
},
{
0
}};
...
@@ -662,6 +673,13 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
...
@@ -662,6 +673,13 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
TRACE
(
"stage %d, is_alpha %d, op %s, arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d
\n
"
,
TRACE
(
"stage %d, is_alpha %d, op %s, arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d
\n
"
,
stage
,
is_alpha
,
debug_d3dtop
(
op
),
arg1
,
arg2
,
arg3
,
texture_idx
);
stage
,
is_alpha
,
debug_d3dtop
(
op
),
arg1
,
arg2
,
arg3
,
texture_idx
);
/* 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
,
stage
,
op
,
arg1
,
arg2
,
arg3
))
{
arg1
=
D3DTA_CURRENT
;
op
=
D3DTOP_SELECTARG1
;
}
get_src_and_opr_nvrc
(
stage
,
arg1
,
is_alpha
,
&
tex_op_args
.
input
[
0
],
get_src_and_opr_nvrc
(
stage
,
arg1
,
is_alpha
,
&
tex_op_args
.
input
[
0
],
&
tex_op_args
.
mapping
[
0
],
&
tex_op_args
.
component_usage
[
0
],
texture_idx
);
&
tex_op_args
.
mapping
[
0
],
&
tex_op_args
.
component_usage
[
0
],
texture_idx
);
get_src_and_opr_nvrc
(
stage
,
arg2
,
is_alpha
,
&
tex_op_args
.
input
[
1
],
get_src_and_opr_nvrc
(
stage
,
arg2
,
is_alpha
,
&
tex_op_args
.
input
[
1
],
...
@@ -1053,6 +1071,13 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op,
...
@@ -1053,6 +1071,13 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op,
scal_target
=
useext
(
GL_RGB_SCALE
);
scal_target
=
useext
(
GL_RGB_SCALE
);
}
}
/* 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
,
Stage
,
op
,
arg1
,
arg2
,
arg3
))
{
arg1
=
D3DTA_CURRENT
;
op
=
D3DTOP_SELECTARG1
;
}
/* From MSDN (WINED3DTSS_ALPHAARG1) :
/* From MSDN (WINED3DTSS_ALPHAARG1) :
The default argument is D3DTA_TEXTURE. If no texture is set for this stage,
The default argument is D3DTA_TEXTURE. If no texture is set for this stage,
then the default argument is D3DTA_DIFFUSE.
then the default argument is D3DTA_DIFFUSE.
...
...
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