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
2d4bce87
Commit
2d4bce87
authored
Mar 16, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DTextureImpl.
parent
f1ec3820
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
29 deletions
+21
-29
device.c
dlls/wined3d/device.c
+2
-2
texture.c
dlls/wined3d/texture.c
+17
-17
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-10
No files found.
dlls/wined3d/device.c
View file @
2d4bce87
...
...
@@ -1104,7 +1104,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3DBaseTexture
**
texture
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DTextureImpl
*
object
;
IWineD3D
Base
TextureImpl
*
object
;
HRESULT
hr
;
TRACE
(
"(%p) : Width %d, Height %d, Levels %d, Usage %#x
\n
"
,
This
,
Width
,
Height
,
Levels
,
Usage
);
...
...
@@ -4472,7 +4472,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
}
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH */
if
(
texture
&&
((
IWineD3DTextureImpl
*
)
texture
)
->
resource
.
pool
==
WINED3DPOOL_SCRATCH
)
if
(
texture
&&
((
IWineD3D
Base
TextureImpl
*
)
texture
)
->
resource
.
pool
==
WINED3DPOOL_SCRATCH
)
{
WARN
(
"Rejecting attempt to set scratch texture.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/texture.c
View file @
2d4bce87
...
...
@@ -191,7 +191,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
texture_unload
,
};
static
void
texture_cleanup
(
IWineD3DTextureImpl
*
This
)
static
void
texture_cleanup
(
IWineD3D
Base
TextureImpl
*
This
)
{
unsigned
int
i
;
...
...
@@ -221,7 +221,7 @@ static void texture_cleanup(IWineD3DTextureImpl *This)
static
HRESULT
WINAPI
IWineD3DTextureImpl_QueryInterface
(
IWineD3DBaseTexture
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IWineD3D
TextureImpl
*
This
=
(
IWineD3D
TextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBase
TextureImpl
*
)
iface
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
...
...
@@ -238,7 +238,7 @@ static HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DBaseTexture *if
static
ULONG
WINAPI
IWineD3DTextureImpl_AddRef
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3D
TextureImpl
*
This
=
(
IWineD3D
TextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBase
TextureImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
return
InterlockedIncrement
(
&
This
->
resource
.
ref
);
}
...
...
@@ -246,7 +246,7 @@ static ULONG WINAPI IWineD3DTextureImpl_AddRef(IWineD3DBaseTexture *iface)
/* Do not call while under the GL lock. */
static
ULONG
WINAPI
IWineD3DTextureImpl_Release
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3D
TextureImpl
*
This
=
(
IWineD3D
TextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBase
TextureImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
...
...
@@ -262,28 +262,28 @@ static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DBaseTexture *iface)
static
HRESULT
WINAPI
IWineD3DTextureImpl_SetPrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetPrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
return
resource_get_private_data
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
,
guid
,
data
,
data_size
);
return
resource_get_private_data
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
,
guid
,
data
,
data_size
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_FreePrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
refguid
)
{
return
resource_free_private_data
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
,
refguid
);
return
resource_free_private_data
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DTextureImpl_SetPriority
(
IWineD3DBaseTexture
*
iface
,
DWORD
priority
)
{
return
resource_set_priority
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
,
priority
);
return
resource_set_priority
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
,
priority
);
}
static
DWORD
WINAPI
IWineD3DTextureImpl_GetPriority
(
IWineD3DBaseTexture
*
iface
)
{
return
resource_get_priority
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
);
return
resource_get_priority
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
);
}
/* Do not call while under the GL lock. */
...
...
@@ -294,14 +294,14 @@ static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DTextureImpl_GetType
(
IWineD3DBaseTexture
*
iface
)
{
return
resource_get_type
(
&
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
);
return
resource_get_type
(
&
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
);
}
static
void
*
WINAPI
IWineD3DTextureImpl_GetParent
(
IWineD3DBaseTexture
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
return
((
IWineD3DTextureImpl
*
)
iface
)
->
resource
.
parent
;
return
((
IWineD3D
Base
TextureImpl
*
)
iface
)
->
resource
.
parent
;
}
static
DWORD
WINAPI
IWineD3DTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
)
...
...
@@ -337,10 +337,10 @@ static void WINAPI IWineD3DTextureImpl_GenerateMipSubLevels(IWineD3DBaseTexture
static
BOOL
WINAPI
IWineD3DTextureImpl_IsCondNP2
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3D
TextureImpl
*
This
=
(
IWineD3D
TextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBase
TextureImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
cond_np2
;
return
This
->
baseTexture
.
cond_np2
;
}
static
struct
wined3d_resource
*
WINAPI
IWineD3DTextureImpl_GetSubResource
(
IWineD3DBaseTexture
*
iface
,
...
...
@@ -400,7 +400,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DTexture_Vtbl =
IWineD3DTextureImpl_AddDirtyRegion
,
};
HRESULT
texture_init
(
IWineD3DTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
HRESULT
texture_init
(
IWineD3D
Base
TextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -488,7 +488,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
texture
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
f
;
texture
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
f
;
texture
->
baseTexture
.
target
=
GL_TEXTURE_2D
;
texture
->
cond_np2
=
TRUE
;
texture
->
baseTexture
.
cond_np2
=
TRUE
;
texture
->
baseTexture
.
minMipLookup
=
minMipLookup_noFilter
;
}
else
if
(
gl_info
->
supported
[
ARB_TEXTURE_RECTANGLE
]
&&
(
width
!=
pow2_width
||
height
!=
pow2_height
)
...
...
@@ -502,7 +502,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
texture
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
f
;
texture
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
f
;
texture
->
baseTexture
.
target
=
GL_TEXTURE_RECTANGLE_ARB
;
texture
->
cond_np2
=
TRUE
;
texture
->
baseTexture
.
cond_np2
=
TRUE
;
if
(
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
{
...
...
@@ -530,7 +530,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
texture
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
f
;
texture
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
f
;
texture
->
baseTexture
.
target
=
GL_TEXTURE_2D
;
texture
->
cond_np2
=
FALSE
;
texture
->
baseTexture
.
cond_np2
=
FALSE
;
}
TRACE
(
"xf(%f) yf(%f)
\n
"
,
texture
->
baseTexture
.
pow2Matrix
[
0
],
texture
->
baseTexture
.
pow2Matrix
[
5
]);
...
...
dlls/wined3d/wined3d_private.h
View file @
2d4bce87
...
...
@@ -1904,6 +1904,7 @@ typedef struct IWineD3DBaseTextureClass
DWORD
sampler
;
BOOL
is_srgb
;
BOOL
pow2Matrix_identity
;
BOOL
cond_np2
;
const
struct
min_lookup
*
minMipLookup
;
const
GLenum
*
magLookup
;
GLenum
target
;
...
...
@@ -1953,16 +1954,7 @@ void basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty) DECLSPE
DWORD
basetexture_set_lod
(
IWineD3DBaseTextureImpl
*
texture
,
DWORD
lod
)
DECLSPEC_HIDDEN
;
void
basetexture_unload
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
typedef
struct
IWineD3DTextureImpl
{
const
IWineD3DBaseTextureVtbl
*
lpVtbl
;
struct
wined3d_resource
resource
;
IWineD3DBaseTextureClass
baseTexture
;
BOOL
cond_np2
;
}
IWineD3DTextureImpl
;
HRESULT
texture_init
(
IWineD3DTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
HRESULT
texture_init
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
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