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
8f20b882
Commit
8f20b882
authored
Aug 26, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle texture transforms in the TEXTURETRANSFORMFLAGS state.
This is a nop by itself, but it makes it easier for fragment pipelines to read WINED3DTSS_TEXTURETRANSFORMFLAGS.
parent
8dcc6b66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
state.c
dlls/wined3d/state.c
+20
-20
No files found.
dlls/wined3d/state.c
View file @
8f20b882
...
...
@@ -3105,7 +3105,7 @@ void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext
}
static
void
transform_texture
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
DWORD
texUnit
=
state
-
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
)
;
DWORD
texUnit
=
(
state
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
WINED3D_HIGHEST_TEXTURE_STATE
;
DWORD
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
texUnit
];
BOOL
generated
;
int
coordIdx
;
...
...
@@ -3375,7 +3375,7 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
/* Update the texture matrix */
if
(
!
isStateDirty
(
context
,
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
+
stage
)))
{
transform_texture
(
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE0
+
stage
),
stateblock
,
context
);
transform_texture
(
STATE_T
EXTURESTAGE
(
stage
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
stateblock
,
context
);
}
if
(
!
isStateDirty
(
context
,
STATE_VDECL
)
&&
context
->
namedArraysLoaded
)
{
...
...
@@ -3448,7 +3448,7 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
if
(
texIsPow2
||
context
->
lastWasPow2Texture
[
sampler
])
{
context
->
lastWasPow2Texture
[
sampler
]
=
texIsPow2
;
transform_texture
(
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE0
+
stateblock
->
wineD3DDevice
->
texUnitMap
[
sampler
]
),
stateblock
,
context
);
transform_texture
(
STATE_T
EXTURESTAGE
(
stateblock
->
wineD3DDevice
->
texUnitMap
[
sampler
],
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
stateblock
,
context
);
}
}
}
...
...
@@ -4624,7 +4624,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
int
i
;
for
(
i
=
0
;
i
<
MAX_TEXTURES
;
i
++
)
{
if
(
!
isStateDirty
(
context
,
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
+
i
)))
{
transform_texture
(
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE0
+
i
),
stateblock
,
context
);
transform_texture
(
STATE_T
EXTURESTAGE
(
i
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
stateblock
,
context
);
}
}
}
...
...
@@ -5053,14 +5053,14 @@ const struct StateEntryTemplate ffp_vertexstate_template[] = {
/* Transform states follow */
{
STATE_TRANSFORM
(
WINED3DTS_VIEW
),
{
STATE_TRANSFORM
(
WINED3DTS_VIEW
),
transform_view
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_PROJECTION
),
{
STATE_TRANSFORM
(
WINED3DTS_PROJECTION
),
transform_projection
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE0
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE1
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE1
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE2
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE2
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE3
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE3
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE4
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE4
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE5
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE5
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE6
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE6
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE7
),
{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE7
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE0
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE1
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE2
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE3
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE4
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE5
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE6
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_TEXTURE7
),
{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
0
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
0
)),
transform_world
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
1
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
1
)),
transform_world
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
2
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
2
)),
transform_world
},
0
},
...
...
@@ -5317,14 +5317,14 @@ const struct StateEntryTemplate ffp_vertexstate_template[] = {
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
253
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
253
)),
transform_world
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
254
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
254
)),
transform_world
},
0
},
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
255
)),
{
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
255
)),
transform_world
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE0
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE1
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE2
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE3
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE4
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE5
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE6
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
RANSFORM
(
WINED3DTS_TEXTURE7
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
0
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
1
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
2
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
3
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
4
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
5
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
6
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_T
EXTURESTAGE
(
7
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
transform_texture
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_TEXCOORDINDEX
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_TEXCOORDINDEX
),
tex_coordindex
},
0
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3DTSS_TEXCOORDINDEX
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3DTSS_TEXCOORDINDEX
),
tex_coordindex
},
0
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3DTSS_TEXCOORDINDEX
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3DTSS_TEXCOORDINDEX
),
tex_coordindex
},
0
},
...
...
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