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
f13bb406
Commit
f13bb406
authored
Nov 15, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not call PreLoad in surface_download_data.
parent
c835703f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
surface.c
dlls/wined3d/surface.c
+26
-1
surface_base.c
dlls/wined3d/surface_base.c
+5
-0
surface_gdi.c
dlls/wined3d/surface_gdi.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
wined3d_interface.h
include/wine/wined3d_interface.h
+2
-0
No files found.
dlls/wined3d/surface.c
View file @
f13bb406
...
...
@@ -57,7 +57,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
checkGLcall
(
"glActiveTextureARB"
);
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
resource
.
wineD3DDevice
,
STATE_SAMPLER
(
0
));
IWineD3DSurface_
PreLoad
((
IWineD3DSurface
*
)
This
);
IWineD3DSurface_
BindTexture
((
IWineD3DSurface
*
)
This
);
if
(
This
->
resource
.
format
==
WINED3DFMT_DXT1
||
This
->
resource
.
format
==
WINED3DFMT_DXT2
||
This
->
resource
.
format
==
WINED3DFMT_DXT3
||
...
...
@@ -2186,6 +2186,30 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO
return
WINED3D_OK
;
}
static
void
WINAPI
IWineD3DSurfaceImpl_BindTexture
(
IWineD3DSurface
*
iface
)
{
/* TODO: check for locks */
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DBaseTexture
*
baseTexture
=
NULL
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p)Checking to see if the container is a base texture
\n
"
,
This
);
if
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
baseTexture
)
==
WINED3D_OK
)
{
TRACE
(
"Passing to container
\n
"
);
IWineD3DBaseTexture_BindTexture
(
baseTexture
);
IWineD3DBaseTexture_Release
(
baseTexture
);
}
else
{
TRACE
(
"(%p) : Binding surface
\n
"
,
This
);
if
(
!
device
->
isInDraw
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
}
ENTER_GL
();
glBindTexture
(
This
->
glDescription
.
target
,
This
->
glDescription
.
textureName
);
LEAVE_GL
();
}
return
;
}
#include <errno.h>
#include <stdio.h>
HRESULT
WINAPI
IWineD3DSurfaceImpl_SaveSnapshot
(
IWineD3DSurface
*
iface
,
const
char
*
filename
)
{
...
...
@@ -3845,6 +3869,7 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
/* Internal use: */
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineD3DSurfaceImpl_LoadTexture
,
IWineD3DSurfaceImpl_BindTexture
,
IWineD3DSurfaceImpl_SaveSnapshot
,
IWineD3DBaseSurfaceImpl_SetContainer
,
IWineD3DSurfaceImpl_SetGlTextureDesc
,
...
...
dlls/wined3d/surface_base.c
View file @
f13bb406
...
...
@@ -1628,3 +1628,8 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DL
return
WINED3D_OK
;
}
void
WINAPI
IWineD3DBaseSurfaceImpl_BindTexture
(
IWineD3DSurface
*
iface
)
{
ERR
(
"Should not be called on base texture
\n
"
);
return
;
}
dlls/wined3d/surface_gdi.c
View file @
f13bb406
...
...
@@ -805,6 +805,7 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
/* Internal use: */
IWineGDISurfaceImpl_AddDirtyRect
,
IWineGDISurfaceImpl_LoadTexture
,
IWineD3DBaseSurfaceImpl_BindTexture
,
IWineGDISurfaceImpl_SaveSnapshot
,
IWineD3DBaseSurfaceImpl_SetContainer
,
IWineGDISurfaceImpl_SetGlTextureDesc
,
...
...
dlls/wined3d/wined3d_private.h
View file @
f13bb406
...
...
@@ -1159,6 +1159,7 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface);
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_Blt
(
IWineD3DSurface
*
iface
,
RECT
*
DestRect
,
IWineD3DSurface
*
SrcSurface
,
RECT
*
SrcRect
,
DWORD
Flags
,
WINEDDBLTFX
*
DDBltFx
,
WINED3DTEXTUREFILTERTYPE
Filter
);
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_BltFast
(
IWineD3DSurface
*
iface
,
DWORD
dstx
,
DWORD
dsty
,
IWineD3DSurface
*
Source
,
RECT
*
rsrc
,
DWORD
trans
);
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_LockRect
(
IWineD3DSurface
*
iface
,
WINED3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
);
void
WINAPI
IWineD3DBaseSurfaceImpl_BindTexture
(
IWineD3DSurface
*
iface
);
const
void
*
WINAPI
IWineD3DSurfaceImpl_GetData
(
IWineD3DSurface
*
iface
);
...
...
include/wine/wined3d_interface.h
View file @
f13bb406
...
...
@@ -1134,6 +1134,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
/* Internally used methods */
STDMETHOD
(
AddDirtyRect
)(
THIS_
CONST
RECT
*
pRect
)
PURE
;
STDMETHOD
(
LoadTexture
)(
THIS
,
BOOL
srgb_mode
)
PURE
;
STDMETHOD_
(
void
,
BindTexture
)(
THIS
)
PURE
;
STDMETHOD
(
SaveSnapshot
)(
THIS_
const
char
*
filename
)
PURE
;
STDMETHOD
(
SetContainer
)(
THIS_
IWineD3DBase
*
container
)
PURE
;
STDMETHOD_
(
void
,
SetGlTextureDesc
)(
THIS_
UINT
textureName
,
int
target
)
PURE
;
...
...
@@ -1191,6 +1192,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
/*** IWineD3DSurface (Internal, no d3d mapping) methods ***/
#define IWineD3DSurface_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a)
#define IWineD3DSurface_LoadTexture(p,a) (p)->lpVtbl->LoadTexture(p,a)
#define IWineD3DSurface_BindTexture(p) (p)->lpVtbl->BindTexture(p)
#define IWineD3DSurface_SaveSnapshot(p,a) (p)->lpVtbl->SaveSnapshot(p,a)
#define IWineD3DSurface_SetContainer(p,a) (p)->lpVtbl->SetContainer(p,a)
#define IWineD3DSurface_SetGlTextureDesc(p,a,b) (p)->lpVtbl->SetGlTextureDesc(p,a,b)
...
...
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