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
3220ba45
Commit
3220ba45
authored
Jun 25, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Map vertex sampler numbers to the correct internal array indices for…
wined3d: Map vertex sampler numbers to the correct internal array indices for GetTexture and SetTexture.
parent
f89c2d96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
device.c
dlls/wined3d/device.c
+15
-11
No files found.
dlls/wined3d/device.c
View file @
3220ba45
...
...
@@ -4037,19 +4037,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTextureStageState(IWineD3DDevice *if
* Get / Set Texture
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetTexture
(
IWineD3DDevice
*
iface
,
DWORD
Stage
,
IWineD3DBaseTexture
*
pTexture
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DBaseTexture
*
oldTexture
;
IWineD3DBaseTexture
*
oldTexture
;
oldTexture
=
This
->
updateStateBlock
->
textures
[
Stage
];
TRACE
(
"(%p) : Stage(%d), Texture (%p)
\n
"
,
This
,
Stage
,
pTexture
);
TRACE
(
"(%p) : Stage %#x, Texture %p
\n
"
,
This
,
Stage
,
pTexture
);
#if 0 /* TODO: check so vertex textures */
if (Stage >= D3DVERTEXTEXTURESAMPLER && Stage <= D3DVERTEXTEXTURESAMPLER3){
This->updateStateBlock->vertexTextures[Stage - D3DVERTEXTEXTURESAMPLER] = pTexture;
return WINED3D_OK;
if
(
Stage
>=
WINED3DVERTEXTEXTURESAMPLER0
&&
Stage
<=
WINED3DVERTEXTEXTURESAMPLER3
)
{
Stage
-=
(
WINED3DVERTEXTEXTURESAMPLER0
-
MAX_FRAGMENT_SAMPLERS
);
}
#endif
oldTexture
=
This
->
updateStateBlock
->
textures
[
Stage
];
if
(
pTexture
!=
NULL
)
{
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH;
...
...
@@ -4119,7 +4116,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
* Shouldn't happen as long as apps bind a texture only to one stage
*/
TRACE
(
"Searcing for other sampler / stage id where the texture is bound to
\n
"
);
for
(
i
=
0
;
i
<
GL_LIMITS
(
sampler_stages
)
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
i
++
)
{
if
(
This
->
updateStateBlock
->
textures
[
i
]
==
oldTexture
)
{
old
->
baseTexture
.
sampler
=
i
;
break
;
...
...
@@ -4135,12 +4132,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetTexture
(
IWineD3DDevice
*
iface
,
DWORD
Stage
,
IWineD3DBaseTexture
**
ppTexture
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p) : (%d /* Stage */,%p /* ppTexture */)
\n
"
,
This
,
Stage
,
ppTexture
);
TRACE
(
"(%p) : Stage %#x, ppTexture %p
\n
"
,
This
,
Stage
,
ppTexture
);
if
(
Stage
>=
WINED3DVERTEXTEXTURESAMPLER0
&&
Stage
<=
WINED3DVERTEXTEXTURESAMPLER3
)
{
Stage
-=
(
WINED3DVERTEXTEXTURESAMPLER0
-
MAX_FRAGMENT_SAMPLERS
);
}
*
ppTexture
=
This
->
stateBlock
->
textures
[
Stage
];
if
(
*
ppTexture
)
IWineD3DBaseTexture_AddRef
(
*
ppTexture
);
TRACE
(
"(%p) : Returning %p
\n
"
,
This
,
*
ppTexture
);
return
WINED3D_OK
;
}
...
...
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