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
a7e46699
Commit
a7e46699
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 pixel shader samplers from IWineD3DDeviceImpl_FindTexUnitMap().
parent
10ffa291
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
device.c
dlls/wined3d/device.c
+17
-21
No files found.
dlls/wined3d/device.c
View file @
a7e46699
...
...
@@ -3266,8 +3266,22 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) {
}
}
static
void
device_map_psamplers
(
IWineD3DDeviceImpl
*
This
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_SAMPLERS
;
++
i
)
{
if
(
This
->
texUnitMap
[
i
]
!=
i
)
{
device_map_stage
(
This
,
i
,
i
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
i
));
if
(
i
<
MAX_TEXTURES
)
{
markTextureStagesDirty
(
This
,
i
);
}
}
}
}
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
{
DWORD
i
;
BOOL
ps
=
use_ps
(
This
)
;
/* This code can assume that GL_NV_register_combiners are supported, otherwise
* it is never called.
*
...
...
@@ -3276,27 +3290,9 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) {
* that would be really messy and require shader recompilation
* -> When the mapping of a stage is changed, sampler and ALL texture stage states have
* to be reset. Because of that try to work with a 1:1 mapping as much as possible
* -> Whith a 1:1 mapping oneToOneTexUnitMap is set to avoid checking MAX_SAMPLERS array
* entries to make pixel shaders cheaper. MAX_SAMPLERS will be 128 in dx10
*/
if
(
This
->
stateBlock
->
pixelShader
)
{
if
(
This
->
oneToOneTexUnitMap
)
{
TRACE
(
"Not touching 1:1 map
\n
"
);
return
;
}
TRACE
(
"Restoring 1:1 texture unit mapping
\n
"
);
/* Restore a 1:1 mapping */
for
(
i
=
0
;
i
<
MAX_SAMPLERS
;
i
++
)
{
if
(
This
->
texUnitMap
[
i
]
!=
i
)
{
device_map_stage
(
This
,
i
,
i
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
i
));
if
(
i
<
MAX_TEXTURES
)
{
markTextureStagesDirty
(
This
,
i
);
}
}
}
This
->
oneToOneTexUnitMap
=
TRUE
;
return
;
if
(
ps
)
{
device_map_psamplers
(
This
);
}
else
{
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