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
b1579b37
Commit
b1579b37
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: Keep track of what fixed function texture stages are in use.
parent
b928cadd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
device.c
dlls/wined3d/device.c
+11
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
b1579b37
...
...
@@ -3201,6 +3201,14 @@ static void device_map_stage(IWineD3DDeviceImpl *This, int stage, int unit) {
}
}
static
void
device_update_fixed_function_usage_map
(
IWineD3DDeviceImpl
*
This
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_TEXTURES
;
++
i
)
{
This
->
fixed_function_usage_map
[
i
]
=
This
->
stateBlock
->
textures
[
i
]
?
TRUE
:
FALSE
;
}
}
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
{
DWORD
i
,
tex
;
/* This code can assume that GL_NV_register_combiners are supported, otherwise
...
...
@@ -3233,12 +3241,13 @@ 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
->
stateBlock
->
textures
[
i
]
==
NULL
)
tex
++
;
if
(
!
This
->
fixed_function_usage_map
[
i
])
++
tex
;
}
if
(
GL_LIMITS
(
textures
)
+
tex
<
This
->
stateBlock
->
lowest_disabled_stage
)
{
...
...
@@ -3252,7 +3261,7 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) {
WARN
(
"Non 1:1 mapping UNTESTED!
\n
"
);
for
(
i
=
0
;
i
<
This
->
stateBlock
->
lowest_disabled_stage
;
i
++
)
{
/* Skip NULL textures */
if
(
!
This
->
stateBlock
->
textures
[
i
])
{
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
);
...
...
dlls/wined3d/wined3d_private.h
View file @
b1579b37
...
...
@@ -724,6 +724,7 @@ struct IWineD3DDeviceImpl
/* With register combiners we can skip junk texture stages */
DWORD
texUnitMap
[
MAX_SAMPLERS
];
DWORD
rev_tex_unit_map
[
MAX_SAMPLERS
];
BOOL
fixed_function_usage_map
[
MAX_TEXTURES
];
BOOL
oneToOneTexUnitMap
;
/* Stream source management */
...
...
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