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
478a0aae
Commit
478a0aae
authored
Sep 23, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_state structure to is_invalid_op().
Instead of an entire device.
parent
e7e1ec62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+2
-1
state.c
dlls/wined3d/state.c
+2
-1
utils.c
dlls/wined3d/utils.c
+8
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/nvidia_texture_shader.c
View file @
478a0aae
...
...
@@ -144,7 +144,8 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX
/* 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
))
{
if
(
is_invalid_op
(
&
This
->
stateBlock
->
state
,
stage
,
op
,
arg1
,
arg2
,
arg3
))
{
arg1
=
WINED3DTA_CURRENT
;
op
=
WINED3DTOP_SELECTARG1
;
}
...
...
dlls/wined3d/state.c
View file @
478a0aae
...
...
@@ -2109,7 +2109,8 @@ 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
,
Stage
,
op
,
arg1
,
arg2
,
arg3
))
{
if
(
is_invalid_op
(
&
This
->
stateBlock
->
state
,
Stage
,
op
,
arg1
,
arg2
,
arg3
))
{
arg1
=
WINED3DTA_CURRENT
;
op
=
WINED3DTOP_SELECTARG1
;
}
...
...
dlls/wined3d/utils.c
View file @
478a0aae
...
...
@@ -2366,9 +2366,11 @@ GLenum CompareFunc(DWORD func) {
}
}
BOOL
is_invalid_op
(
IWineD3DDeviceImpl
*
This
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
{
BOOL
is_invalid_op
(
const
struct
wined3d_state
*
state
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
{
if
(
op
==
WINED3DTOP_DISABLE
)
return
FALSE
;
if
(
This
->
stateBlock
->
state
.
textures
[
stage
])
return
FALSE
;
if
(
state
->
textures
[
stage
])
return
FALSE
;
if
((
arg1
&
WINED3DTA_SELECTMASK
)
==
WINED3DTA_TEXTURE
&&
op
!=
WINED3DTOP_SELECTARG2
)
return
TRUE
;
...
...
@@ -2785,7 +2787,8 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting
carg2
=
(
args
[
cop
]
&
ARG2
)
?
stateblock
->
state
.
texture_states
[
i
][
WINED3DTSS_COLORARG2
]
:
ARG_UNUSED
;
carg0
=
(
args
[
cop
]
&
ARG0
)
?
stateblock
->
state
.
texture_states
[
i
][
WINED3DTSS_COLORARG0
]
:
ARG_UNUSED
;
if
(
is_invalid_op
(
device
,
i
,
cop
,
carg1
,
carg2
,
carg0
))
{
if
(
is_invalid_op
(
&
stateblock
->
state
,
i
,
cop
,
carg1
,
carg2
,
carg0
))
{
carg0
=
ARG_UNUSED
;
carg2
=
ARG_UNUSED
;
carg1
=
WINED3DTA_CURRENT
;
...
...
@@ -2846,7 +2849,8 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting
}
}
if
(
is_invalid_op
(
device
,
i
,
aop
,
aarg1
,
aarg2
,
aarg0
))
{
if
(
is_invalid_op
(
&
stateblock
->
state
,
i
,
aop
,
aarg1
,
aarg2
,
aarg0
))
{
aarg0
=
ARG_UNUSED
;
aarg2
=
ARG_UNUSED
;
aarg1
=
WINED3DTA_CURRENT
;
...
...
dlls/wined3d/wined3d_private.h
View file @
478a0aae
...
...
@@ -2639,8 +2639,8 @@ const char *debug_surflocation(DWORD flag) DECLSPEC_HIDDEN;
/* Routines for GL <-> D3D values */
GLenum
StencilOp
(
DWORD
op
)
DECLSPEC_HIDDEN
;
GLenum
CompareFunc
(
DWORD
func
)
DECLSPEC_HIDDEN
;
BOOL
is_invalid_op
(
IWineD3DDeviceImpl
*
This
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
DECLSPEC_HIDDEN
;
BOOL
is_invalid_op
(
const
struct
wined3d_state
*
state
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
)
DECLSPEC_HIDDEN
;
void
set_tex_op_nvrc
(
IWineD3DDevice
*
iface
,
BOOL
is_alpha
,
int
stage
,
WINED3DTEXTUREOP
op
,
DWORD
arg1
,
DWORD
arg2
,
DWORD
arg3
,
INT
texture_idx
,
DWORD
dst
)
DECLSPEC_HIDDEN
;
void
set_texture_matrix
(
const
float
*
smat
,
DWORD
flags
,
BOOL
calculatedCoords
,
...
...
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