Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b9d5c180
Commit
b9d5c180
authored
Jun 12, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Call IWineD3DDeviceImpl_FindTexUnitMap() when activating the context.
parent
8311ff32
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
20 deletions
+5
-20
context.c
dlls/wined3d/context.c
+3
-0
device.c
dlls/wined3d/device.c
+1
-20
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/context.c
View file @
b9d5c180
...
@@ -801,6 +801,9 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
...
@@ -801,6 +801,9 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
glEnable
(
GL_TEXTURE_SHADER_NV
);
glEnable
(
GL_TEXTURE_SHADER_NV
);
checkGLcall
(
"glEnable(GL_TEXTURE_SHADER_NV)"
);
checkGLcall
(
"glEnable(GL_TEXTURE_SHADER_NV)"
);
}
}
if
(
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
IWineD3DDeviceImpl_FindTexUnitMap
(
This
);
}
for
(
i
=
0
;
i
<
context
->
numDirtyEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
context
->
numDirtyEntries
;
i
++
)
{
dirtyState
=
context
->
dirtyArray
[
i
];
dirtyState
=
context
->
dirtyArray
[
i
];
idx
=
dirtyState
>>
5
;
idx
=
dirtyState
>>
5
;
...
...
dlls/wined3d/device.c
View file @
b9d5c180
...
@@ -3212,7 +3212,7 @@ static inline void markTextureStagesDirty(IWineD3DDeviceImpl *This, DWORD stage)
...
@@ -3212,7 +3212,7 @@ static inline void markTextureStagesDirty(IWineD3DDeviceImpl *This, DWORD stage)
}
}
}
}
static
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
{
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
{
DWORD
i
,
tex
;
DWORD
i
,
tex
;
/* This code can assume that GL_NV_register_combiners are supported, otherwise
/* This code can assume that GL_NV_register_combiners are supported, otherwise
* it is never called.
* it is never called.
...
@@ -3307,11 +3307,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, I
...
@@ -3307,11 +3307,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, I
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_PIXELSHADER
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_PIXELSHADER
);
/* Rebuild the texture unit mapping if nvrc's are supported */
if
(
GL_SUPPORT
(
NV_REGISTER_COMBINERS
))
{
IWineD3DDeviceImpl_FindTexUnitMap
(
This
);
}
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
@@ -3999,13 +3994,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
...
@@ -3999,13 +3994,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_TEXTURESTAGE
(
Stage
,
Type
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_TEXTURESTAGE
(
Stage
,
Type
));
/* Rebuild the stage -> gl texture unit mapping if register combiners are supported
* If there is a pixel shader there will be a 1:1 mapping, no need to touch it. SetPixelShader
* will call FindTexUnitMap too.
*/
if
(
GL_SUPPORT
(
NV_REGISTER_COMBINERS
)
&&
!
This
->
stateBlock
->
pixelShader
)
{
IWineD3DDeviceImpl_FindTexUnitMap
(
This
);
}
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
@@ -4113,13 +4101,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
...
@@ -4113,13 +4101,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
Stage
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_SAMPLER
(
Stage
));
/* Verify the texture unit mapping(and rebuild it if needed) if we use nvrcs and no
* pixel shader is used
*/
if
(
GL_SUPPORT
(
NV_REGISTER_COMBINERS
)
&&
!
This
->
stateBlock
->
pixelShader
)
{
IWineD3DDeviceImpl_FindTexUnitMap
(
This
);
}
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
b9d5c180
...
@@ -745,6 +745,7 @@ struct IWineD3DDeviceImpl
...
@@ -745,6 +745,7 @@ struct IWineD3DDeviceImpl
extern
const
IWineD3DDeviceVtbl
IWineD3DDevice_Vtbl
;
extern
const
IWineD3DDeviceVtbl
IWineD3DDevice_Vtbl
;
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
);
void
IWineD3DDeviceImpl_MarkStateDirty
(
IWineD3DDeviceImpl
*
This
,
DWORD
state
);
void
IWineD3DDeviceImpl_MarkStateDirty
(
IWineD3DDeviceImpl
*
This
,
DWORD
state
);
static
inline
BOOL
isStateDirty
(
WineD3DContext
*
context
,
DWORD
state
)
{
static
inline
BOOL
isStateDirty
(
WineD3DContext
*
context
,
DWORD
state
)
{
DWORD
idx
=
state
>>
5
;
DWORD
idx
=
state
>>
5
;
...
...
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