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
8365b281
Commit
8365b281
authored
Dec 19, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Catch nop sampler changes.
parent
666b5077
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
device.c
dlls/wined3d/device.c
+12
-1
stateblock.c
dlls/wined3d/stateblock.c
+2
-1
No files found.
dlls/wined3d/device.c
View file @
8365b281
...
@@ -3368,6 +3368,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderState(IWineD3DDevice *iface, W
...
@@ -3368,6 +3368,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderState(IWineD3DDevice *iface, W
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetSamplerState
(
IWineD3DDevice
*
iface
,
DWORD
Sampler
,
WINED3DSAMPLERSTATETYPE
Type
,
DWORD
Value
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetSamplerState
(
IWineD3DDevice
*
iface
,
DWORD
Sampler
,
WINED3DSAMPLERSTATETYPE
Type
,
DWORD
Value
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
DWORD
oldValue
=
This
->
stateBlock
->
samplerState
[
Sampler
][
Type
];
/**
/**
* SetSampler is designed to allow for more than the standard up to 8 textures
* SetSampler is designed to allow for more than the standard up to 8 textures
* and Geforce has stopped supporting more than 6 standard textures in openGL.
* and Geforce has stopped supporting more than 6 standard textures in openGL.
...
@@ -3401,6 +3403,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface,
...
@@ -3401,6 +3403,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface,
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
if
(
oldValue
==
Value
)
{
TRACE
(
"Application is setting the old value over, nothing to do
\n
"
);
return
WINED3D_OK
;
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
Sampler
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
Sampler
));
return
WINED3D_OK
;
return
WINED3D_OK
;
...
@@ -4487,7 +4494,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
...
@@ -4487,7 +4494,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
This
->
stateBlock
->
textureDimensions
[
Stage
]
=
IWineD3DBaseTexture_GetTextureDimensions
(
pTexture
);
This
->
stateBlock
->
textureDimensions
[
Stage
]
=
IWineD3DBaseTexture_GetTextureDimensions
(
pTexture
);
}
}
oldTexture
=
This
->
updateStateBlock
->
textures
[
Stage
];
TRACE
(
"GL_LIMITS %d
\n
"
,
GL_LIMITS
(
sampler_stages
));
TRACE
(
"GL_LIMITS %d
\n
"
,
GL_LIMITS
(
sampler_stages
));
TRACE
(
"(%p) : oldtexture(%p)
\n
"
,
This
,
oldTexture
);
TRACE
(
"(%p) : oldtexture(%p)
\n
"
,
This
,
oldTexture
);
...
@@ -4502,6 +4508,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
...
@@ -4502,6 +4508,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
if
(
oldTexture
==
pTexture
)
{
TRACE
(
"App is setting the same texture again, nothing to do
\n
"
);
return
WINED3D_OK
;
}
/** NOTE: MSDN says that setTexture increases the reference count,
/** NOTE: MSDN says that setTexture increases the reference count,
* and the the application nust set the texture back to null (or have a leaky application),
* and the the application nust set the texture back to null (or have a leaky application),
* This means we should pass the refcount up to the parent
* This means we should pass the refcount up to the parent
...
...
dlls/wined3d/stateblock.c
View file @
8365b281
...
@@ -756,7 +756,8 @@ should really perform a delta so that only the changes get updated*/
...
@@ -756,7 +756,8 @@ should really perform a delta so that only the changes get updated*/
((
IWineD3DDeviceImpl
*
)
pDevice
)
->
stateBlock
->
changed
.
samplerState
[
j
][
i
]
=
TRUE
;
((
IWineD3DDeviceImpl
*
)
pDevice
)
->
stateBlock
->
changed
.
samplerState
[
j
][
i
]
=
TRUE
;
}
}
}
}
/* SetTexture catches nop changes, so the above call does not assure that the sampler is updated */
IWineD3DDeviceImpl_MarkStateDirty
((
IWineD3DDeviceImpl
*
)
pDevice
,
STATE_SAMPLER
(
j
));
}
}
}
else
if
(
This
->
blockType
==
WINED3DSBT_PIXELSTATE
)
{
}
else
if
(
This
->
blockType
==
WINED3DSBT_PIXELSTATE
)
{
...
...
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