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
ad11f38d
Commit
ad11f38d
authored
Jan 27, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename the texture creation flags to WINED3D_TEXTURE_CREATE_*.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cf899ac2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
43 additions
and
41 deletions
+43
-41
device.c
dlls/d3d8/device.c
+5
-5
texture.c
dlls/d3d8/texture.c
+6
-6
device.c
dlls/d3d9/device.c
+7
-7
texture.c
dlls/d3d9/texture.c
+6
-6
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
surface.c
dlls/ddraw/surface.c
+4
-3
device.c
dlls/wined3d/device.c
+2
-2
surface.c
dlls/wined3d/surface.c
+4
-3
texture.c
dlls/wined3d/texture.c
+4
-4
wined3d.h
include/wine/wined3d.h
+4
-4
No files found.
dlls/d3d8/device.c
View file @
ad11f38d
...
...
@@ -995,7 +995,7 @@ static HRESULT WINAPI d3d8_device_CreateRenderTarget(IDirect3DDevice8 *iface, UI
*
surface
=
NULL
;
if
(
lockable
)
flags
|=
WINED3D_
SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
;
return
d3d8_device_create_surface
(
device
,
width
,
height
,
format
,
flags
,
surface
,
D3DUSAGE_RENDERTARGET
,
D3DPOOL_DEFAULT
,
multisample_type
,
0
);
...
...
@@ -1013,7 +1013,7 @@ static HRESULT WINAPI d3d8_device_CreateDepthStencilSurface(IDirect3DDevice8 *if
*
surface
=
NULL
;
/* TODO: Verify that Discard is false */
return
d3d8_device_create_surface
(
device
,
width
,
height
,
format
,
WINED3D_
SURFAC
E_MAPPABLE
,
return
d3d8_device_create_surface
(
device
,
width
,
height
,
format
,
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
surface
,
D3DUSAGE_DEPTHSTENCIL
,
D3DPOOL_DEFAULT
,
multisample_type
,
0
);
}
...
...
@@ -1028,7 +1028,7 @@ static HRESULT WINAPI d3d8_device_CreateImageSurface(IDirect3DDevice8 *iface, UI
*
surface
=
NULL
;
return
d3d8_device_create_surface
(
device
,
width
,
height
,
format
,
WINED3D_
SURFAC
E_MAPPABLE
,
return
d3d8_device_create_surface
(
device
,
width
,
height
,
format
,
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
surface
,
0
,
D3DPOOL_SYSTEMMEM
,
D3DMULTISAMPLE_NONE
,
0
);
}
...
...
@@ -3039,8 +3039,8 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
TRACE
(
"device_parent %p, container_parent %p, desc %p, texture %p.
\n
"
,
device_parent
,
container_parent
,
desc
,
texture
);
if
(
FAILED
(
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
desc
,
1
,
WINED3D_SURFACE_MAPPABLE
,
NULL
,
&
device
->
IDirect3DDevice8_iface
,
&
d3d8_null_wined3d_parent_ops
,
texture
)))
if
(
FAILED
(
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
desc
,
1
,
WINED3D_TEXTURE_CREATE_MAPPABLE
,
NULL
,
&
device
->
IDirect3DDevice8_iface
,
&
d3d8_null_wined3d_parent_ops
,
texture
)))
{
WARN
(
"Failed to create texture, hr %#x.
\n
"
,
hr
);
return
hr
;
...
...
dlls/d3d8/texture.c
View file @
ad11f38d
...
...
@@ -1150,7 +1150,7 @@ HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
struct
wined3d_resource_desc
desc
;
DWORD
surface_
flags
=
0
;
DWORD
flags
=
0
;
HRESULT
hr
;
texture
->
IDirect3DBaseTexture8_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DTexture8_Vtbl
;
...
...
@@ -1170,13 +1170,13 @@ HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device,
desc
.
size
=
0
;
if
(
pool
!=
D3DPOOL_DEFAULT
||
(
usage
&
D3DUSAGE_DYNAMIC
))
surface_flags
|=
WINED3D_SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_TEXTURE_CREAT
E_MAPPABLE
;
if
(
!
levels
)
levels
=
wined3d_log2i
(
max
(
width
,
height
))
+
1
;
wined3d_mutex_lock
();
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
surface_
flags
,
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
flags
,
NULL
,
texture
,
&
d3d8_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -1195,7 +1195,7 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *devic
UINT
edge_length
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
struct
wined3d_resource_desc
desc
;
DWORD
surface_
flags
=
0
;
DWORD
flags
=
0
;
HRESULT
hr
;
texture
->
IDirect3DBaseTexture8_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DCubeTexture8_Vtbl
;
...
...
@@ -1215,13 +1215,13 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *devic
desc
.
size
=
0
;
if
(
pool
!=
D3DPOOL_DEFAULT
||
(
usage
&
D3DUSAGE_DYNAMIC
))
surface_flags
|=
WINED3D_SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_TEXTURE_CREAT
E_MAPPABLE
;
if
(
!
levels
)
levels
=
wined3d_log2i
(
edge_length
)
+
1
;
wined3d_mutex_lock
();
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
surface_
flags
,
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
flags
,
NULL
,
texture
,
&
d3d8_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/device.c
View file @
ad11f38d
...
...
@@ -1182,7 +1182,7 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface,
}
if
(
lockable
)
flags
|=
WINED3D_
SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
;
return
d3d9_device_create_surface
(
device
,
width
,
height
,
format
,
flags
,
surface
,
D3DUSAGE_RENDERTARGET
,
D3DPOOL_DEFAULT
,
multisample_type
,
multisample_quality
,
NULL
);
...
...
@@ -1193,7 +1193,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex *
BOOL
discard
,
IDirect3DSurface9
**
surface
,
HANDLE
*
shared_handle
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
DWORD
flags
=
WINED3D_
SURFAC
E_MAPPABLE
;
DWORD
flags
=
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
;
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.
\n
"
"discard %#x, surface %p, shared_handle %p.
\n
"
,
...
...
@@ -1213,7 +1213,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex *
}
if
(
discard
)
flags
|=
WINED3D_
SURFAC
E_DISCARD
;
flags
|=
WINED3D_
TEXTURE_CREAT
E_DISCARD
;
return
d3d9_device_create_surface
(
device
,
width
,
height
,
format
,
flags
,
surface
,
D3DUSAGE_DEPTHSTENCIL
,
D3DPOOL_DEFAULT
,
multisample_type
,
multisample_quality
,
NULL
);
...
...
@@ -1465,7 +1465,7 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex
* regardless of the pool they're created in. Should we set dynamic usage
* here? */
return
d3d9_device_create_surface
(
device
,
width
,
height
,
format
,
WINED3D_
SURFAC
E_MAPPABLE
,
surface
,
0
,
pool
,
D3DMULTISAMPLE_NONE
,
0
,
user_mem
);
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
surface
,
0
,
pool
,
D3DMULTISAMPLE_NONE
,
0
,
user_mem
);
}
static
HRESULT
WINAPI
d3d9_device_SetRenderTarget
(
IDirect3DDevice9Ex
*
iface
,
DWORD
idx
,
IDirect3DSurface9
*
surface
)
...
...
@@ -3353,7 +3353,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex
BOOL
discard
,
IDirect3DSurface9
**
surface
,
HANDLE
*
shared_handle
,
DWORD
usage
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
DWORD
flags
=
WINED3D_
SURFAC
E_MAPPABLE
;
DWORD
flags
=
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
;
TRACE
(
"iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u, "
"discard %#x, surface %p, shared_handle %p, usage %#x.
\n
"
,
...
...
@@ -3370,7 +3370,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex
FIXME
(
"Resource sharing not implemented, *shared_handle %p.
\n
"
,
*
shared_handle
);
if
(
discard
)
flags
|=
WINED3D_
SURFAC
E_DISCARD
;
flags
|=
WINED3D_
TEXTURE_CREAT
E_DISCARD
;
return
d3d9_device_create_surface
(
device
,
width
,
height
,
format
,
flags
,
surface
,
D3DUSAGE_DEPTHSTENCIL
|
usage
,
D3DPOOL_DEFAULT
,
multisample_type
,
multisample_quality
,
NULL
);
...
...
@@ -3642,7 +3642,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
container_parent
=
&
device
->
IDirect3DDevice9Ex_iface
;
if
(
FAILED
(
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
desc
,
1
,
WINED3D_
SURFAC
E_MAPPABLE
,
NULL
,
container_parent
,
&
d3d9_null_wined3d_parent_ops
,
texture
)))
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
NULL
,
container_parent
,
&
d3d9_null_wined3d_parent_ops
,
texture
)))
{
WARN
(
"Failed to create texture, hr %#x.
\n
"
,
hr
);
return
hr
;
...
...
dlls/d3d9/texture.c
View file @
ad11f38d
...
...
@@ -1280,7 +1280,7 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
struct
wined3d_resource_desc
desc
;
DWORD
surface_
flags
=
0
;
DWORD
flags
=
0
;
HRESULT
hr
;
texture
->
IDirect3DBaseTexture9_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_2d_vtbl
;
...
...
@@ -1300,7 +1300,7 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
desc
.
size
=
0
;
if
(
pool
!=
D3DPOOL_DEFAULT
||
(
usage
&
D3DUSAGE_DYNAMIC
))
surface_flags
|=
WINED3D_SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_TEXTURE_CREAT
E_MAPPABLE
;
if
(
!
levels
)
{
...
...
@@ -1311,7 +1311,7 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
}
wined3d_mutex_lock
();
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
surface_
flags
,
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
flags
,
NULL
,
texture
,
&
d3d9_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -1330,7 +1330,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
UINT
edge_length
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
{
struct
wined3d_resource_desc
desc
;
DWORD
surface_
flags
=
0
;
DWORD
flags
=
0
;
HRESULT
hr
;
texture
->
IDirect3DBaseTexture9_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_cube_vtbl
;
...
...
@@ -1350,7 +1350,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
desc
.
size
=
0
;
if
(
pool
!=
D3DPOOL_DEFAULT
||
(
usage
&
D3DUSAGE_DYNAMIC
))
surface_flags
|=
WINED3D_SURFAC
E_MAPPABLE
;
flags
|=
WINED3D_TEXTURE_CREAT
E_MAPPABLE
;
if
(
!
levels
)
{
...
...
@@ -1361,7 +1361,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
}
wined3d_mutex_lock
();
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
surface_
flags
,
hr
=
wined3d_texture_create
(
device
->
wined3d_device
,
&
desc
,
levels
,
flags
,
NULL
,
texture
,
&
d3d9_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/ddraw/ddraw.c
View file @
ad11f38d
...
...
@@ -4816,7 +4816,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic
}
if
(
FAILED
(
hr
=
wined3d_texture_create
(
ddraw
->
wined3d_device
,
desc
,
1
,
WINED3D_
SURFAC
E_MAPPABLE
,
NULL
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
texture
)))
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
NULL
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
texture
)))
{
WARN
(
"Failed to create texture, hr %#x.
\n
"
,
hr
);
return
hr
;
...
...
dlls/ddraw/surface.c
View file @
ad11f38d
...
...
@@ -6074,9 +6074,9 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
* the surface isn't mapped, and that updates done this way will be
* visible on the screen. The game Nox is such an application,
* Commandos: Behind Enemy Lines is another. We set
* WINED3D_
SURFAC
E_PIN_SYSMEM because of this. */
* WINED3D_
TEXTURE_CREAT
E_PIN_SYSMEM because of this. */
if
(
FAILED
(
hr
=
wined3d_texture_create
(
ddraw
->
wined3d_device
,
&
wined3d_desc
,
levels
,
WINED3D_
SURFAC
E_PIN_SYSMEM
,
NULL
,
texture
,
&
ddraw_texture_wined3d_parent_ops
,
&
wined3d_texture
)))
WINED3D_
TEXTURE_CREAT
E_PIN_SYSMEM
,
NULL
,
texture
,
&
ddraw_texture_wined3d_parent_ops
,
&
wined3d_texture
)))
{
WARN
(
"Failed to create wined3d texture, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
texture
);
...
...
@@ -6188,7 +6188,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
desc
->
u5
.
dwBackBufferCount
=
0
;
if
(
FAILED
(
hr
=
wined3d_texture_create
(
ddraw
->
wined3d_device
,
&
wined3d_desc
,
1
,
WINED3D_SURFACE_PIN_SYSMEM
,
NULL
,
texture
,
&
ddraw_texture_wined3d_parent_ops
,
&
wined3d_texture
)))
WINED3D_TEXTURE_CREATE_PIN_SYSMEM
,
NULL
,
texture
,
&
ddraw_texture_wined3d_parent_ops
,
&
wined3d_texture
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
texture
);
hr
=
hr_ddraw_from_wined3d
(
hr
);
...
...
dlls/wined3d/device.c
View file @
ad11f38d
...
...
@@ -633,7 +633,7 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
desc
.
height
=
bm
.
bmHeight
;
desc
.
depth
=
1
;
desc
.
size
=
0
;
if
(
FAILED
(
hr
=
wined3d_texture_create
(
device
,
&
desc
,
1
,
WINED3D_
SURFAC
E_MAPPABLE
,
if
(
FAILED
(
hr
=
wined3d_texture_create
(
device
,
&
desc
,
1
,
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
NULL
,
NULL
,
&
wined3d_null_parent_ops
,
&
device
->
logo_texture
)))
{
ERR
(
"Wine logo requested, but failed to create texture, hr %#x.
\n
"
,
hr
);
...
...
@@ -4284,7 +4284,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
desc
.
depth
=
1
;
desc
.
size
=
0
;
hr
=
wined3d_texture_create
(
device
,
&
desc
,
1
,
WINED3D_
SURFAC
E_MAPPABLE
,
hr
=
wined3d_texture_create
(
device
,
&
desc
,
1
,
WINED3D_
TEXTURE_CREAT
E_MAPPABLE
,
&
data
,
NULL
,
&
wined3d_null_parent_ops
,
&
texture
);
wined3d_surface_unmap
(
cursor_image
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/surface.c
View file @
ad11f38d
...
...
@@ -2345,7 +2345,8 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_surface *so
desc
.
usage
=
0
;
desc
.
pool
=
WINED3D_POOL_SCRATCH
;
if
(
FAILED
(
wined3d_texture_create
(
source
->
resource
.
device
,
&
desc
,
1
,
WINED3D_SURFACE_MAPPABLE
|
WINED3D_SURFACE_DISCARD
,
NULL
,
NULL
,
&
wined3d_null_parent_ops
,
&
ret
)))
WINED3D_TEXTURE_CREATE_MAPPABLE
|
WINED3D_TEXTURE_CREATE_DISCARD
,
NULL
,
NULL
,
&
wined3d_null_parent_ops
,
&
ret
)))
{
ERR
(
"Failed to create a destination surface for conversion.
\n
"
);
return
NULL
;
...
...
@@ -5351,8 +5352,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
struct
wined3d_device
*
device
=
container
->
resource
.
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
gl_info
,
desc
->
format
);
BOOL
lockable
=
flags
&
WINED3D_TEXTURE_CREATE_MAPPABLE
;
UINT
multisample_quality
=
desc
->
multisample_quality
;
BOOL
lockable
=
flags
&
WINED3D_SURFACE_MAPPABLE
;
unsigned
int
resource_size
;
HRESULT
hr
;
...
...
@@ -5410,7 +5411,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
list_init
(
&
surface
->
overlays
);
/* Flags */
if
(
flags
&
WINED3D_
SURFAC
E_DISCARD
)
if
(
flags
&
WINED3D_
TEXTURE_CREAT
E_DISCARD
)
surface
->
flags
|=
SFLAG_DISCARD
;
if
(
lockable
||
desc
->
format
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
resource
.
access_flags
|=
WINED3D_RESOURCE_ACCESS_CPU
;
...
...
dlls/wined3d/texture.c
View file @
ad11f38d
...
...
@@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture);
WINE_DECLARE_DEBUG_CHANNEL
(
winediag
);
static
HRESULT
wined3d_texture_init
(
struct
wined3d_texture
*
texture
,
const
struct
wined3d_texture_ops
*
texture_ops
,
UINT
layer_count
,
UINT
level_count
,
const
struct
wined3d_resource_desc
*
desc
,
DWORD
surface_
flags
,
UINT
layer_count
,
UINT
level_count
,
const
struct
wined3d_resource_desc
*
desc
,
DWORD
flags
,
struct
wined3d_device
*
device
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
{
...
...
@@ -37,11 +37,11 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
TRACE
(
"texture %p, texture_ops %p, layer_count %u, level_count %u, resource_type %s, format %s, "
"multisample_type %#x, multisample_quality %#x, usage %s, pool %s, width %u, height %u, depth %u, "
"
surface_
flags %#x, device %p, parent %p, parent_ops %p, resource_ops %p.
\n
"
,
"flags %#x, device %p, parent %p, parent_ops %p, resource_ops %p.
\n
"
,
texture
,
texture_ops
,
layer_count
,
level_count
,
debug_d3dresourcetype
(
desc
->
resource_type
),
debug_d3dformat
(
desc
->
format
),
desc
->
multisample_type
,
desc
->
multisample_quality
,
debug_d3dusage
(
desc
->
usage
),
debug_d3dpool
(
desc
->
pool
),
desc
->
width
,
desc
->
height
,
desc
->
depth
,
surface_
flags
,
device
,
parent
,
parent_ops
,
resource_ops
);
flags
,
device
,
parent
,
parent_ops
,
resource_ops
);
if
(
FAILED
(
hr
=
resource_init
(
&
texture
->
resource
,
device
,
desc
->
resource_type
,
format
,
desc
->
multisample_type
,
desc
->
multisample_quality
,
desc
->
usage
,
desc
->
pool
,
...
...
@@ -76,7 +76,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
texture
->
filter_type
=
(
desc
->
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
?
WINED3D_TEXF_LINEAR
:
WINED3D_TEXF_NONE
;
texture
->
lod
=
0
;
texture
->
flags
=
WINED3D_TEXTURE_POW2_MAT_IDENT
|
WINED3D_TEXTURE_NORMALIZED_COORDS
;
if
(
surface_flags
&
WINED3D_SURFAC
E_PIN_SYSMEM
)
if
(
flags
&
WINED3D_TEXTURE_CREAT
E_PIN_SYSMEM
)
texture
->
flags
|=
WINED3D_TEXTURE_PIN_SYSMEM
;
return
WINED3D_OK
;
...
...
include/wine/wined3d.h
View file @
ad11f38d
...
...
@@ -1472,9 +1472,9 @@ enum wined3d_display_rotation
#define WINED3D_PALETTE_ALLOW_256 0x00000002
#define WINED3D_PALETTE_ALPHA 0x00000004
#define WINED3D_
SURFACE_MAPPABLE
0x00000001
#define WINED3D_
SURFACE_DISCARD
0x00000002
#define WINED3D_
SURFACE_PIN_SYSMEM
0x00000004
#define WINED3D_
TEXTURE_CREATE_MAPPABLE
0x00000001
#define WINED3D_
TEXTURE_CREATE_DISCARD
0x00000002
#define WINED3D_
TEXTURE_CREATE_PIN_SYSMEM
0x00000004
#define WINED3D_APPEND_ALIGNED_ELEMENT 0xffffffff
...
...
@@ -2529,7 +2529,7 @@ HRESULT __cdecl wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigne
struct
wined3d_texture
*
src_texture
,
unsigned
int
src_idx
,
const
RECT
*
src_rect_in
,
DWORD
flags
,
const
WINEDDBLTFX
*
fx
,
enum
wined3d_texture_filter_type
filter
);
HRESULT
__cdecl
wined3d_texture_create
(
struct
wined3d_device
*
device
,
const
struct
wined3d_resource_desc
*
desc
,
UINT
level_count
,
DWORD
surface_
flags
,
const
struct
wined3d_sub_resource_data
*
data
,
void
*
parent
,
UINT
level_count
,
DWORD
flags
,
const
struct
wined3d_sub_resource_data
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
);
ULONG
__cdecl
wined3d_texture_decref
(
struct
wined3d_texture
*
texture
);
void
__cdecl
wined3d_texture_generate_mipmaps
(
struct
wined3d_texture
*
texture
);
...
...
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