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
2aa891c1
Commit
2aa891c1
authored
Jun 22, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Split of the mapping of fixed function samplers from IWineD3DDeviceImpl_FindTexUnitMap().
parent
b1579b37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
39 deletions
+46
-39
device.c
dlls/wined3d/device.c
+46
-39
No files found.
dlls/wined3d/device.c
View file @
2aa891c1
...
...
@@ -3209,8 +3209,52 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) {
}
}
static
void
device_map_fixed_function_samplers
(
IWineD3DDeviceImpl
*
This
)
{
int
i
,
tex
;
device_update_fixed_function_usage_map
(
This
);
/* No pixel shader, and we do not have enough texture units available. Try to skip NULL textures
* First, see if we can succeed at all
*/
tex
=
0
;
for
(
i
=
0
;
i
<
This
->
stateBlock
->
lowest_disabled_stage
;
++
i
)
{
if
(
!
This
->
fixed_function_usage_map
[
i
])
++
tex
;
}
if
(
GL_LIMITS
(
textures
)
+
tex
<
This
->
stateBlock
->
lowest_disabled_stage
)
{
FIXME
(
"Too many bound textures to support the combiner settings
\n
"
);
return
;
}
/* Now work out the mapping */
tex
=
0
;
This
->
oneToOneTexUnitMap
=
FALSE
;
WARN
(
"Non 1:1 mapping UNTESTED!
\n
"
);
for
(
i
=
0
;
i
<
This
->
stateBlock
->
lowest_disabled_stage
;
++
i
)
{
/* Skip NULL textures */
if
(
!
This
->
fixed_function_usage_map
[
i
])
{
/* Map to -1, so the check below doesn't fail if a non-NULL
* texture is set on this stage */
TRACE
(
"Mapping texture stage %d to -1
\n
"
,
i
);
device_map_stage
(
This
,
i
,
-
1
);
continue
;
}
TRACE
(
"Mapping texture stage %d to unit %d
\n
"
,
i
,
tex
);
if
(
This
->
texUnitMap
[
i
]
!=
tex
)
{
device_map_stage
(
This
,
i
,
tex
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
i
));
markTextureStagesDirty
(
This
,
i
);
}
++
tex
;
}
}
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
{
DWORD
i
,
tex
;
DWORD
i
;
/* This code can assume that GL_NV_register_combiners are supported, otherwise
* it is never called.
*
...
...
@@ -3241,44 +3285,7 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) {
This
->
oneToOneTexUnitMap
=
TRUE
;
return
;
}
else
{
device_update_fixed_function_usage_map
(
This
);
/* No pixel shader, and we do not have enough texture units available. Try to skip NULL textures
* First, see if we can succeed at all
*/
tex
=
0
;
for
(
i
=
0
;
i
<
This
->
stateBlock
->
lowest_disabled_stage
;
i
++
)
{
if
(
!
This
->
fixed_function_usage_map
[
i
])
++
tex
;
}
if
(
GL_LIMITS
(
textures
)
+
tex
<
This
->
stateBlock
->
lowest_disabled_stage
)
{
FIXME
(
"Too many bound textures to support the combiner settings
\n
"
);
return
;
}
/* Now work out the mapping */
tex
=
0
;
This
->
oneToOneTexUnitMap
=
FALSE
;
WARN
(
"Non 1:1 mapping UNTESTED!
\n
"
);
for
(
i
=
0
;
i
<
This
->
stateBlock
->
lowest_disabled_stage
;
i
++
)
{
/* Skip NULL textures */
if
(
!
This
->
fixed_function_usage_map
[
i
])
{
/* Map to -1, so the check below doesn't fail if a non-NULL
* texture is set on this stage */
TRACE
(
"Mapping texture stage %d to -1
\n
"
,
i
);
device_map_stage
(
This
,
i
,
-
1
);
continue
;
}
TRACE
(
"Mapping texture stage %d to unit %d
\n
"
,
i
,
tex
);
if
(
This
->
texUnitMap
[
i
]
!=
tex
)
{
device_map_stage
(
This
,
i
,
tex
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
i
));
markTextureStagesDirty
(
This
,
i
);
}
++
tex
;
}
device_map_fixed_function_samplers
(
This
);
}
}
...
...
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