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
e53a2773
Commit
e53a2773
authored
Jan 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DPOOL typedef.
parent
6a5a098b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
139 additions
and
138 deletions
+139
-138
device.c
dlls/d3d10core/device.c
+2
-2
texture.c
dlls/d3d10core/texture.c
+2
-2
buffer.c
dlls/d3d8/buffer.c
+2
-2
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-1
device.c
dlls/d3d8/device.c
+7
-6
surface.c
dlls/d3d8/surface.c
+1
-1
volume.c
dlls/d3d8/volume.c
+1
-1
buffer.c
dlls/d3d9/buffer.c
+2
-2
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-1
device.c
dlls/d3d9/device.c
+5
-5
surface.c
dlls/d3d9/surface.c
+1
-1
volume.c
dlls/d3d9/volume.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+3
-3
device.c
dlls/ddraw/device.c
+2
-2
surface.c
dlls/ddraw/surface.c
+7
-7
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+1
-1
device.c
dlls/dxgi/device.c
+1
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+3
-3
buffer.c
dlls/wined3d/buffer.c
+7
-7
device.c
dlls/wined3d/device.c
+6
-7
directx.c
dlls/wined3d/directx.c
+2
-2
resource.c
dlls/wined3d/resource.c
+8
-8
surface.c
dlls/wined3d/surface.c
+25
-25
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
texture.c
dlls/wined3d/texture.c
+10
-10
utils.c
dlls/wined3d/utils.c
+8
-8
volume.c
dlls/wined3d/volume.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+7
-7
wined3d.h
include/wine/wined3d.h
+20
-19
No files found.
dlls/d3d10core/device.c
View file @
e53a2773
...
...
@@ -1364,7 +1364,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
{
struct
d3d10_device
*
device
=
device_from_wined3d_device_parent
(
device_parent
);
struct
d3d10_texture2d
*
texture
;
...
...
@@ -1492,7 +1492,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
HRESULT
hr
;
...
...
dlls/d3d10core/texture.c
View file @
e53a2773
...
...
@@ -237,7 +237,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
hr
=
wined3d_surface_create
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
0
,
desc
->
Usage
,
WINED3DPOOL_DEFAULT
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
0
,
desc
->
Usage
,
WINED3D
_
POOL_DEFAULT
,
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
,
desc
->
SampleDesc
.
Quality
,
SURFACE_OPENGL
,
0
,
texture
,
&
d3d10_texture2d_wined3d_parent_ops
,
&
texture
->
wined3d_surface
);
...
...
@@ -448,7 +448,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic
FIXME
(
"Implement DXGI<->wined3d usage conversion.
\n
"
);
hr
=
wined3d_texture_create_3d
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
desc
->
Depth
,
desc
->
MipLevels
,
desc
->
Usage
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
WINED3DPOOL_DEFAULT
,
desc
->
MipLevels
,
desc
->
Usage
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
WINED3D
_
POOL_DEFAULT
,
texture
,
&
d3d10_texture3d_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/buffer.c
View file @
e53a2773
...
...
@@ -294,7 +294,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
wined3d_mutex_lock
();
hr
=
wined3d_buffer_create_vb
(
device
->
wined3d_device
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d8_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
(
enum
wined3d_pool
)
pool
,
buffer
,
&
d3d8_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
@@ -588,7 +588,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl
wined3d_mutex_lock
();
hr
=
wined3d_buffer_create_ib
(
device
->
wined3d_device
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d8_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
(
enum
wined3d_pool
)
pool
,
buffer
,
&
d3d8_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/d3d8_private.h
View file @
e53a2773
...
...
@@ -210,7 +210,7 @@ struct IDirect3DVolume8Impl
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
/* ------------------- */
/* IDirect3DSwapChain8 */
...
...
dlls/d3d8/device.c
View file @
e53a2773
...
...
@@ -532,7 +532,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
struct
wined3d_resource_desc
desc
;
wined3d_resource_get_desc
(
resource
,
&
desc
);
if
(
desc
.
pool
==
WINED3DPOOL_DEFAULT
)
if
(
desc
.
pool
==
WINED3D
_
POOL_DEFAULT
)
{
IDirect3DSurface8
*
surface
;
...
...
@@ -937,8 +937,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.
\n
"
,
iface
,
pSourceSurface
,
pSourceRects
,
cRects
,
pDestinationSurface
,
pDestPoints
);
/* Check that the source texture is in WINED3D
POOL_SYSTEM
MEM and the
* destination texture is in WINED3DPOOL_DEFAULT. */
/* Check that the source texture is in WINED3D
_POOL_SYSTEM_
MEM and the
* destination texture is in WINED3D
_
POOL_DEFAULT. */
wined3d_mutex_lock
();
wined3d_resource
=
wined3d_surface_get_resource
(
Source
->
wined3d_surface
);
...
...
@@ -2812,7 +2812,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
{
IDirect3DDevice8Impl
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DSurface8Impl
*
d3d_surface
;
...
...
@@ -2824,7 +2824,8 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
device_parent
,
container_parent
,
width
,
height
,
format
,
usage
,
pool
,
level
,
face
,
surface
);
if
(
pool
==
WINED3DPOOL_DEFAULT
&&
!
(
usage
&
WINED3DUSAGE_DYNAMIC
))
lockable
=
FALSE
;
if
(
pool
==
WINED3D_POOL_DEFAULT
&&
!
(
usage
&
WINED3DUSAGE_DYNAMIC
))
lockable
=
FALSE
;
hr
=
IDirect3DDevice8Impl_CreateSurface
(
device
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
lockable
,
FALSE
/* Discard */
,
level
,
...
...
@@ -2912,7 +2913,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
IDirect3DDevice8Impl
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DVolume8Impl
*
object
;
...
...
dlls/d3d8/surface.c
View file @
e53a2773
...
...
@@ -338,7 +338,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
wined3d_mutex_lock
();
hr
=
wined3d_surface_create
(
device
->
wined3d_device
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
level
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
multisample_type
,
multisample_quality
,
level
,
usage
&
WINED3DUSAGE_MASK
,
(
enum
wined3d_pool
)
pool
,
multisample_type
,
multisample_quality
,
SURFACE_OPENGL
,
flags
,
surface
,
&
d3d8_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d8/volume.c
View file @
e53a2773
...
...
@@ -276,7 +276,7 @@ static const struct wined3d_parent_ops d3d8_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
{
HRESULT
hr
;
...
...
dlls/d3d9/buffer.c
View file @
e53a2773
...
...
@@ -296,7 +296,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
wined3d_mutex_lock
();
hr
=
wined3d_buffer_create_vb
(
device
->
wined3d_device
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
(
enum
wined3d_pool
)
pool
,
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
@@ -590,7 +590,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl
wined3d_mutex_lock
();
hr
=
wined3d_buffer_create_ib
(
device
->
wined3d_device
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d9_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
(
enum
wined3d_pool
)
pool
,
buffer
,
&
d3d9_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/d3d9_private.h
View file @
e53a2773
...
...
@@ -192,7 +192,7 @@ typedef struct IDirect3DVolume9Impl
}
IDirect3DVolume9Impl
;
HRESULT
volume_init
(
IDirect3DVolume9Impl
*
volume
,
IDirect3DDevice9Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
/* ------------------- */
/* IDirect3DSwapChain9 */
...
...
dlls/d3d9/device.c
View file @
e53a2773
...
...
@@ -520,7 +520,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
struct
wined3d_resource_desc
desc
;
wined3d_resource_get_desc
(
resource
,
&
desc
);
if
(
desc
.
pool
==
WINED3DPOOL_DEFAULT
)
if
(
desc
.
pool
==
WINED3D
_
POOL_DEFAULT
)
{
IDirect3DSurface9
*
surface
;
...
...
@@ -1079,7 +1079,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ColorFill(IDirect3DDevice9Ex *iface,
/* This method is only allowed with surfaces that are render targets, or
* offscreen plain surfaces in D3DPOOL_DEFAULT. */
if
(
!
(
desc
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
desc
.
pool
!=
WINED3DPOOL_DEFAULT
)
if
(
!
(
desc
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
desc
.
pool
!=
WINED3D
_
POOL_DEFAULT
)
{
wined3d_mutex_unlock
();
WARN
(
"Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface
\n
"
);
...
...
@@ -3102,7 +3102,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
{
struct
IDirect3DDevice9Impl
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DSurface9Impl
*
d3d_surface
;
...
...
@@ -3113,7 +3113,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
"
\t
pool %#x, level %u, face %u, surface %p.
\n
"
,
device_parent
,
container_parent
,
width
,
height
,
format
,
usage
,
pool
,
level
,
face
,
surface
);
if
(
pool
==
WINED3DPOOL_DEFAULT
&&
!
(
usage
&
D3DUSAGE_DYNAMIC
))
if
(
pool
==
WINED3D
_
POOL_DEFAULT
&&
!
(
usage
&
D3DUSAGE_DYNAMIC
))
lockable
=
FALSE
;
hr
=
IDirect3DDevice9Impl_CreateSurface
(
device
,
width
,
height
,
...
...
@@ -3203,7 +3203,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
struct
IDirect3DDevice9Impl
*
device
=
device_from_device_parent
(
device_parent
);
IDirect3DVolume9Impl
*
object
;
...
...
dlls/d3d9/surface.c
View file @
e53a2773
...
...
@@ -431,7 +431,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic
wined3d_mutex_lock
();
hr
=
wined3d_surface_create
(
device
->
wined3d_device
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
level
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
multisample_type
,
multisample_quality
,
level
,
usage
&
WINED3DUSAGE_MASK
,
(
enum
wined3d_pool
)
pool
,
multisample_type
,
multisample_quality
,
SURFACE_OPENGL
,
flags
,
surface
,
&
d3d9_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/volume.c
View file @
e53a2773
...
...
@@ -274,7 +274,7 @@ static const struct wined3d_parent_ops d3d9_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
IDirect3DVolume9Impl
*
volume
,
IDirect3DDevice9Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
)
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
{
HRESULT
hr
;
...
...
dlls/ddraw/ddraw.c
View file @
e53a2773
...
...
@@ -5392,7 +5392,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
)
{
struct
IDirectDrawImpl
*
ddraw
=
ddraw_from_device_parent
(
device_parent
);
IDirectDrawSurfaceImpl
*
surf
=
NULL
;
...
...
@@ -5496,7 +5496,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
flags
|=
WINED3D_SURFACE_MAPPABLE
;
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
width
,
height
,
format
,
0
,
WINED3DUSAGE_RENDERTARGET
,
WINED3DPOOL_DEFAULT
,
multisample_type
,
multisample_quality
,
WINED3DUSAGE_RENDERTARGET
,
WINED3D
_
POOL_DEFAULT
,
multisample_type
,
multisample_quality
,
DefaultSurfaceType
,
flags
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
surface
);
if
(
SUCCEEDED
(
hr
))
ddraw
->
wined3d_frontbuffer
=
*
surface
;
...
...
@@ -5514,7 +5514,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
WINED3DPOOL
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, depth %u, "
"format %#x, pool %#x, usage %#x, volume %p.
\n
"
,
...
...
dlls/ddraw/device.c
View file @
e53a2773
...
...
@@ -4372,7 +4372,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
TRACE
(
"Growing index buffer to %u bytes
\n
"
,
size
);
hr
=
wined3d_buffer_create_ib
(
This
->
wined3d_device
,
size
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
WINED3DPOOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
);
WINED3D
_
POOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) IWineD3DDevice::CreateIndexBuffer failed with hr = %08x
\n
"
,
This
,
hr
);
...
...
@@ -7055,7 +7055,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
/* Create an index buffer, it's needed for indexed drawing */
hr
=
wined3d_buffer_create_ib
(
ddraw
->
wined3d_device
,
0x40000
/* Length. Don't know how long it should be */
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
WINED3DPOOL_DEFAULT
,
NULL
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
WINED3D
_
POOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
device
->
indexbuffer
);
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/surface.c
View file @
e53a2773
...
...
@@ -5432,7 +5432,7 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface)
{
const
DDSURFACEDESC2
*
desc
=
&
surface
->
surface_desc
;
enum
wined3d_format_id
format
;
WINED3DPOOL
pool
;
enum
wined3d_pool
pool
;
UINT
levels
;
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
...
...
@@ -5440,12 +5440,12 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface)
else
levels
=
1
;
/* DDSCAPS_SYSTEMMEMORY textures are in WINED3D
POOL_SYSTEM
MEM.
/* DDSCAPS_SYSTEMMEMORY textures are in WINED3D
_POOL_SYSTEM_
MEM.
* Should I forward the MANAGED cap to the managed pool? */
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_SYSTEMMEMORY
)
pool
=
WINED3D
POOL_SYSTEM
MEM
;
pool
=
WINED3D
_POOL_SYSTEM_
MEM
;
else
pool
=
WINED3DPOOL_DEFAULT
;
pool
=
WINED3D
_
POOL_DEFAULT
;
format
=
PixelFormat_DD2WineD3D
(
&
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
);
if
(
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP
)
...
...
@@ -5459,7 +5459,7 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface)
HRESULT
ddraw_surface_init
(
IDirectDrawSurfaceImpl
*
surface
,
IDirectDrawImpl
*
ddraw
,
DDSURFACEDESC2
*
desc
,
UINT
mip_level
,
UINT
version
)
{
WINED3DPOOL
pool
=
WINED3D
POOL_DEFAULT
;
enum
wined3d_pool
pool
=
WINED3D_
POOL_DEFAULT
;
DWORD
flags
=
WINED3D_SURFACE_MAPPABLE
;
enum
wined3d_format_id
format
;
DWORD
usage
=
0
;
...
...
@@ -5505,11 +5505,11 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_SYSTEMMEMORY
)
{
pool
=
WINED3D
POOL_SYSTEM
MEM
;
pool
=
WINED3D
_POOL_SYSTEM_
MEM
;
}
else
if
(
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_TEXTUREMANAGE
)
{
pool
=
WINED3DPOOL_MANAGED
;
pool
=
WINED3D
_
POOL_MANAGED
;
/* Managed textures have the system memory flag set. */
desc
->
ddsCaps
.
dwCaps
|=
DDSCAPS_SYSTEMMEMORY
;
}
...
...
dlls/ddraw/vertexbuffer.c
View file @
e53a2773
...
...
@@ -571,7 +571,7 @@ HRESULT d3d_vertex_buffer_create(IDirect3DVertexBufferImpl **vertex_buf, IDirect
hr
=
wined3d_buffer_create_vb
(
ddraw
->
wined3d_device
,
get_flexible_vertex_size
(
desc
->
dwFVF
)
*
desc
->
dwNumVertices
,
usage
,
desc
->
dwCaps
&
D3DVBCAPS_SYSTEMMEMORY
?
WINED3D
POOL_SYSTEMMEM
:
WINED3D
POOL_DEFAULT
,
usage
,
desc
->
dwCaps
&
D3DVBCAPS_SYSTEMMEMORY
?
WINED3D
_POOL_SYSTEM_MEM
:
WINED3D_
POOL_DEFAULT
,
buffer
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
if
(
FAILED
(
hr
))
{
...
...
dlls/dxgi/device.c
View file @
e53a2773
...
...
@@ -190,7 +190,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
IUnknown
*
parent
;
hr
=
device_parent
->
ops
->
create_surface
(
device_parent
,
NULL
,
desc
->
Width
,
desc
->
Height
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
usage
,
WINED3DPOOL_DEFAULT
,
0
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
usage
,
WINED3D
_
POOL_DEFAULT
,
0
,
WINED3D_CUBEMAP_FACE_POSITIVE_X
,
&
wined3d_surface
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/arb_program_shader.c
View file @
e53a2773
...
...
@@ -7256,8 +7256,8 @@ static void arbfp_blit_unset(const struct wined3d_gl_info *gl_info)
}
static
BOOL
arbfp_blit_supported
(
const
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_blit_op
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
const
RECT
*
src_rect
,
DWORD
src_usage
,
enum
wined3d_pool
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
{
enum
complex_fixup
src_fixup
;
...
...
@@ -7270,7 +7270,7 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, enum win
return
FALSE
;
}
if
(
src_pool
==
WINED3D
POOL_SYSTEMMEM
||
dst_pool
==
WINED3DPOOL_SYSTEM
MEM
)
if
(
src_pool
==
WINED3D
_POOL_SYSTEM_MEM
||
dst_pool
==
WINED3D_POOL_SYSTEM_
MEM
)
return
FALSE
;
src_fixup
=
get_complex_fixup
(
src_format
->
color_fixup
);
...
...
dlls/wined3d/buffer.c
View file @
e53a2773
...
...
@@ -1182,7 +1182,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
};
static
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_device
*
device
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
GLenum
bind_hint
,
const
char
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -1222,7 +1222,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
{
TRACE
(
"Not creating a vbo because GL_ARB_vertex_buffer is not supported
\n
"
);
}
else
if
(
buffer
->
resource
.
pool
==
WINED3D
POOL_SYSTEM
MEM
)
else
if
(
buffer
->
resource
.
pool
==
WINED3D
_POOL_SYSTEM_
MEM
)
{
TRACE
(
"Not creating a vbo because the vertex buffer is in system memory
\n
"
);
}
...
...
@@ -1284,7 +1284,7 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, struct wined3
FIXME
(
"Ignoring access flags (pool)
\n
"
);
hr
=
buffer_init
(
object
,
device
,
desc
->
byte_width
,
desc
->
usage
,
WINED3DFMT_UNKNOWN
,
WINED3DPOOL_MANAGED
,
GL_ARRAY_BUFFER_ARB
,
data
,
parent
,
parent_ops
);
WINED3D
_
POOL_MANAGED
,
GL_ARRAY_BUFFER_ARB
,
data
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize buffer, hr %#x.
\n
"
,
hr
);
...
...
@@ -1300,7 +1300,7 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, struct wined3
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_buffer_create_vb
(
struct
wined3d_device
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
HRESULT
CDECL
wined3d_buffer_create_vb
(
struct
wined3d_device
*
device
,
UINT
size
,
DWORD
usage
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
)
{
struct
wined3d_buffer
*
object
;
...
...
@@ -1309,11 +1309,11 @@ HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size,
TRACE
(
"device %p, size %u, usage %#x, pool %#x, parent %p, parent_ops %p, buffer %p.
\n
"
,
device
,
size
,
usage
,
pool
,
parent
,
parent_ops
,
buffer
);
if
(
pool
==
WINED3DPOOL_SCRATCH
)
if
(
pool
==
WINED3D
_
POOL_SCRATCH
)
{
/* The d3d9 tests shows that this is not allowed. It doesn't make much
* sense anyway, SCRATCH buffers wouldn't be usable anywhere. */
WARN
(
"Vertex buffer in WINED3DPOOL_SCRATCH requested, returning WINED3DERR_INVALIDCALL.
\n
"
);
WARN
(
"Vertex buffer in WINED3D
_
POOL_SCRATCH requested, returning WINED3DERR_INVALIDCALL.
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -1341,7 +1341,7 @@ HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size,
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_buffer_create_ib
(
struct
wined3d_device
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
HRESULT
CDECL
wined3d_buffer_create_ib
(
struct
wined3d_device
*
device
,
UINT
size
,
DWORD
usage
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
)
{
struct
wined3d_buffer
*
object
;
...
...
dlls/wined3d/device.c
View file @
e53a2773
...
...
@@ -951,7 +951,7 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
}
hr
=
wined3d_surface_create
(
device
,
bm
.
bmWidth
,
bm
.
bmHeight
,
WINED3DFMT_B5G6R5_UNORM
,
0
,
0
,
WINED3DPOOL_DEFAULT
,
WINED3D_MULTISAMPLE_NONE
,
0
,
SURFACE_OPENGL
,
WINED3D_SURFACE_MAPPABLE
,
WINED3D
_
POOL_DEFAULT
,
WINED3D_MULTISAMPLE_NONE
,
0
,
SURFACE_OPENGL
,
WINED3D_SURFACE_MAPPABLE
,
NULL
,
&
wined3d_null_parent_ops
,
&
device
->
logo_surface
);
if
(
FAILED
(
hr
))
{
...
...
@@ -3721,8 +3721,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
return
WINED3D_OK
;
}
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH */
if
(
texture
&&
texture
->
resource
.
pool
==
WINED3DPOOL_SCRATCH
)
if
(
texture
&&
texture
->
resource
.
pool
==
WINED3D_POOL_SCRATCH
)
{
WARN
(
"Rejecting attempt to set scratch texture.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
...
...
@@ -4621,7 +4620,7 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
device
,
src_surface
,
wine_dbgstr_rect
(
src_rect
),
dst_surface
,
wine_dbgstr_point
(
dst_point
));
if
(
src_surface
->
resource
.
pool
!=
WINED3D
POOL_SYSTEMMEM
||
dst_surface
->
resource
.
pool
!=
WINED3D
POOL_DEFAULT
)
if
(
src_surface
->
resource
.
pool
!=
WINED3D
_POOL_SYSTEM_MEM
||
dst_surface
->
resource
.
pool
!=
WINED3D_
POOL_DEFAULT
)
{
WARN
(
"source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL
\n
"
,
src_surface
,
dst_surface
);
...
...
@@ -4775,9 +4774,9 @@ HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device,
device
,
surface
,
wine_dbgstr_rect
(
rect
),
color
->
r
,
color
->
g
,
color
->
b
,
color
->
a
);
if
(
surface
->
resource
.
pool
!=
WINED3D
POOL_DEFAULT
&&
surface
->
resource
.
pool
!=
WINED3DPOOL_SYSTEM
MEM
)
if
(
surface
->
resource
.
pool
!=
WINED3D
_POOL_DEFAULT
&&
surface
->
resource
.
pool
!=
WINED3D_POOL_SYSTEM_
MEM
)
{
FIXME
(
"call to colorfill with non WINED3DPOOL_DEFAULT or WINED3DPOOL_SYSTEMMEM surface
\n
"
);
WARN
(
"Color-fill not allowed on %s surfaces.
\n
"
,
debug_d3dpool
(
surface
->
resource
.
pool
)
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -5187,7 +5186,7 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
{
TRACE
(
"Checking resource %p for eviction.
\n
"
,
resource
);
if
(
resource
->
pool
==
WINED3DPOOL_MANAGED
)
if
(
resource
->
pool
==
WINED3D
_
POOL_MANAGED
)
{
TRACE
(
"Evicting %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
...
...
dlls/wined3d/directx.c
View file @
e53a2773
...
...
@@ -3762,8 +3762,8 @@ static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter,
/* If opengl can't process the format natively, the blitter may be able to convert it */
if
(
adapter
->
blitter
->
blit_supported
(
&
adapter
->
gl_info
,
WINED3D_BLIT_OP_COLOR_BLIT
,
NULL
,
WINED3DPOOL_DEFAULT
,
0
,
check_format
,
NULL
,
WINED3DPOOL_DEFAULT
,
0
,
adapter_format
))
NULL
,
WINED3D
_
POOL_DEFAULT
,
0
,
check_format
,
NULL
,
WINED3D
_
POOL_DEFAULT
,
0
,
adapter_format
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
...
...
dlls/wined3d/resource.c
View file @
e53a2773
...
...
@@ -41,20 +41,20 @@ struct private_data
DWORD
size
;
};
static
DWORD
resource_access_from_pool
(
WINED3DPOOL
pool
)
static
DWORD
resource_access_from_pool
(
enum
wined3d_pool
pool
)
{
switch
(
pool
)
{
case
WINED3DPOOL_DEFAULT
:
case
WINED3D
_
POOL_DEFAULT
:
return
WINED3D_RESOURCE_ACCESS_GPU
;
case
WINED3DPOOL_MANAGED
:
case
WINED3D
_
POOL_MANAGED
:
return
WINED3D_RESOURCE_ACCESS_GPU
|
WINED3D_RESOURCE_ACCESS_CPU
;
case
WINED3D
POOL_SYSTEM
MEM
:
case
WINED3D
_POOL_SYSTEM_
MEM
:
return
WINED3D_RESOURCE_ACCESS_CPU
;
case
WINED3DPOOL_SCRATCH
:
case
WINED3D
_
POOL_SCRATCH
:
return
WINED3D_RESOURCE_ACCESS_SCRATCH
;
default:
...
...
@@ -79,7 +79,7 @@ static void resource_check_usage(DWORD usage)
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
DWORD
usage
,
enum
wined3d_pool
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
{
...
...
@@ -123,7 +123,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
/* Check that we have enough video ram left */
if
(
pool
==
WINED3DPOOL_DEFAULT
)
if
(
pool
==
WINED3D
_
POOL_DEFAULT
)
{
if
(
size
>
wined3d_device_get_available_texture_mem
(
device
))
{
...
...
@@ -147,7 +147,7 @@ void resource_cleanup(struct wined3d_resource *resource)
TRACE
(
"Cleaning up resource %p.
\n
"
,
resource
);
if
(
resource
->
pool
==
WINED3DPOOL_DEFAULT
)
if
(
resource
->
pool
==
WINED3D
_
POOL_DEFAULT
)
{
TRACE
(
"Decrementing device memory pool by %u.
\n
"
,
resource
->
size
);
adapter_adjust_memory
(
resource
->
device
->
adapter
,
0
-
resource
->
size
);
...
...
dlls/wined3d/surface.c
View file @
e53a2773
This diff is collapsed.
Click to expand it.
dlls/wined3d/swapchain.c
View file @
e53a2773
...
...
@@ -459,7 +459,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
memset
(
&
cursor
,
0
,
sizeof
(
cursor
));
cursor
.
resource
.
ref
=
1
;
cursor
.
resource
.
device
=
swapchain
->
device
;
cursor
.
resource
.
pool
=
WINED3DPOOL_SCRATCH
;
cursor
.
resource
.
pool
=
WINED3D
_
POOL_SCRATCH
;
cursor
.
resource
.
format
=
wined3d_get_format
(
gl_info
,
WINED3DFMT_B8G8R8A8_UNORM
);
cursor
.
resource
.
type
=
WINED3D_RTYPE_SURFACE
;
cursor
.
texture_name
=
swapchain
->
device
->
cursorTexture
;
...
...
dlls/wined3d/texture.c
View file @
e53a2773
...
...
@@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture);
static
HRESULT
wined3d_texture_init
(
struct
wined3d_texture
*
texture
,
const
struct
wined3d_texture_ops
*
texture_ops
,
UINT
layer_count
,
UINT
level_count
,
enum
wined3d_resource_type
resource_type
,
struct
wined3d_device
*
device
,
DWORD
usage
,
const
struct
wined3d_format
*
format
,
WINED3DPOOL
pool
,
void
*
parent
,
DWORD
usage
,
const
struct
wined3d_format
*
format
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
{
HRESULT
hr
;
...
...
@@ -159,7 +159,7 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
glGenTextures
(
1
,
&
gl_tex
->
name
);
checkGLcall
(
"glGenTextures"
);
TRACE
(
"Generated texture %d.
\n
"
,
gl_tex
->
name
);
if
(
texture
->
resource
.
pool
==
WINED3DPOOL_DEFAULT
)
if
(
texture
->
resource
.
pool
==
WINED3D
_
POOL_DEFAULT
)
{
/* Tell OpenGL to try and keep this texture in video ram (well mostly). */
GLclampf
tmp
=
0
.
9
f
;
...
...
@@ -487,7 +487,7 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
/* The d3d9:texture test shows that SetLOD is ignored on non-managed
* textures. The call always returns 0, and GetLOD always returns 0. */
if
(
texture
->
resource
.
pool
!=
WINED3DPOOL_MANAGED
)
if
(
texture
->
resource
.
pool
!=
WINED3D
_
POOL_MANAGED
)
{
TRACE
(
"Ignoring SetLOD on %s texture, returning 0.
\n
"
,
debug_d3dpool
(
texture
->
resource
.
pool
));
return
0
;
...
...
@@ -758,7 +758,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
};
static
HRESULT
cubetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
edge_length
,
UINT
levels
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -776,7 +776,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
return
WINED3DERR_INVALIDCALL
;
}
if
(
!
gl_info
->
supported
[
ARB_TEXTURE_CUBE_MAP
]
&&
pool
!=
WINED3DPOOL_SCRATCH
)
if
(
!
gl_info
->
supported
[
ARB_TEXTURE_CUBE_MAP
]
&&
pool
!=
WINED3D
_
POOL_SCRATCH
)
{
WARN
(
"(%p) : Tried to create not supported cube texture.
\n
"
,
texture
);
return
WINED3DERR_INVALIDCALL
;
...
...
@@ -877,7 +877,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
}
static
HRESULT
texture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -1148,7 +1148,7 @@ static const struct wined3d_resource_ops texture3d_resource_ops =
static
HRESULT
volumetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
gl_info
,
format_id
);
...
...
@@ -1242,7 +1242,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U
}
HRESULT
CDECL
wined3d_texture_create_2d
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
struct
wined3d_texture
*
object
;
...
...
@@ -1278,7 +1278,7 @@ HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT widt
}
HRESULT
CDECL
wined3d_texture_create_3d
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
struct
wined3d_texture
*
object
;
...
...
@@ -1314,7 +1314,7 @@ HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT widt
}
HRESULT
CDECL
wined3d_texture_create_cube
(
struct
wined3d_device
*
device
,
UINT
edge_length
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
struct
wined3d_texture
*
object
;
...
...
dlls/wined3d/utils.c
View file @
e53a2773
...
...
@@ -2346,18 +2346,18 @@ const char *debug_d3dstate(DWORD state)
return
wine_dbg_sprintf
(
"UNKNOWN_STATE(%#x)"
,
state
);
}
const
char
*
debug_d3dpool
(
WINED3DPOOL
pool
)
const
char
*
debug_d3dpool
(
enum
wined3d_pool
pool
)
{
switch
(
pool
)
{
#define POOL_TO_STR(p) case p: return #p
POOL_TO_STR
(
WINED3DPOOL_DEFAULT
);
POOL_TO_STR
(
WINED3DPOOL_MANAGED
);
POOL_TO_STR
(
WINED3D
POOL_SYSTEM
MEM
);
POOL_TO_STR
(
WINED3DPOOL_SCRATCH
);
POOL_TO_STR
(
WINED3D
_
POOL_DEFAULT
);
POOL_TO_STR
(
WINED3D
_
POOL_MANAGED
);
POOL_TO_STR
(
WINED3D
_POOL_SYSTEM_
MEM
);
POOL_TO_STR
(
WINED3D
_
POOL_SCRATCH
);
#undef POOL_TO_STR
default:
FIXME
(
"Unrecognized
%u WINED3DPOOL!
\n
"
,
pool
);
FIXME
(
"Unrecognized
pool %#x.
\n
"
,
pool
);
return
"unrecognized"
;
}
}
...
...
@@ -3347,8 +3347,8 @@ void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected,
}
const
struct
blit_shader
*
wined3d_select_blitter
(
const
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_blit_op
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
const
RECT
*
src_rect
,
DWORD
src_usage
,
enum
wined3d_pool
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
{
static
const
struct
blit_shader
*
const
blitters
[]
=
{
...
...
dlls/wined3d/volume.c
View file @
e53a2773
...
...
@@ -266,7 +266,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
};
static
HRESULT
volume_init
(
struct
wined3d_volume
*
volume
,
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -300,7 +300,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
}
HRESULT
CDECL
wined3d_volume_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
)
{
struct
wined3d_volume
*
object
;
...
...
dlls/wined3d/wined3d_private.h
View file @
e53a2773
...
...
@@ -1209,8 +1209,8 @@ struct blit_shader
HRESULT
(
*
set_shader
)(
void
*
blit_priv
,
struct
wined3d_context
*
context
,
const
struct
wined3d_surface
*
surface
);
void
(
*
unset_shader
)(
const
struct
wined3d_gl_info
*
gl_info
);
BOOL
(
*
blit_supported
)(
const
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_blit_op
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format
*
dst_format
);
const
RECT
*
src_rect
,
DWORD
src_usage
,
enum
wined3d_pool
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
);
HRESULT
(
*
color_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color
*
color
);
HRESULT
(
*
depth_fill
)(
struct
wined3d_device
*
device
,
...
...
@@ -1222,8 +1222,8 @@ extern const struct blit_shader arbfp_blit DECLSPEC_HIDDEN;
extern
const
struct
blit_shader
cpu_blit
DECLSPEC_HIDDEN
;
const
struct
blit_shader
*
wined3d_select_blitter
(
const
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_blit_op
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
const
RECT
*
src_rect
,
DWORD
src_usage
,
enum
wined3d_pool
src_pool
,
const
struct
wined3d_format
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
DECLSPEC_HIDDEN
;
/* Temporary blit_shader helper functions */
...
...
@@ -1841,7 +1841,7 @@ struct wined3d_resource
enum
wined3d_multisample_type
multisample_type
;
UINT
multisample_quality
;
DWORD
usage
;
WINED3DPOOL
pool
;
enum
wined3d_pool
pool
;
DWORD
access_flags
;
UINT
width
;
UINT
height
;
...
...
@@ -1863,7 +1863,7 @@ DWORD resource_get_priority(const struct wined3d_resource *resource) DECLSPEC_HI
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
DWORD
usage
,
enum
wined3d_pool
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
DECLSPEC_HIDDEN
;
DWORD
resource_set_priority
(
struct
wined3d_resource
*
resource
,
DWORD
priority
)
DECLSPEC_HIDDEN
;
...
...
@@ -2501,7 +2501,7 @@ const char *debug_d3dstate(DWORD state) DECLSPEC_HIDDEN;
const
char
*
debug_d3dtexturefiltertype
(
enum
wined3d_texture_filter_type
filter_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturestate
(
enum
wined3d_texture_stage_state
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtstype
(
enum
wined3d_transform_state
tstype
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dpool
(
WINED3DPOOL
pool
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dpool
(
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
const
char
*
debug_fbostatus
(
GLenum
status
)
DECLSPEC_HIDDEN
;
const
char
*
debug_glerror
(
GLenum
error
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dbasis
(
enum
wined3d_basis_type
basis
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
e53a2773
...
...
@@ -680,14 +680,13 @@ enum wined3d_resource_type
WINED3D_RTYPE_BUFFER
=
6
,
};
typedef
enum
_WINED3DPOOL
enum
wined3d_pool
{
WINED3DPOOL_DEFAULT
=
0
,
WINED3DPOOL_MANAGED
=
1
,
WINED3DPOOL_SYSTEMMEM
=
2
,
WINED3DPOOL_SCRATCH
=
3
,
WINED3DPOOL_FORCE_DWORD
=
0x7fffffff
}
WINED3DPOOL
;
WINED3D_POOL_DEFAULT
=
0
,
WINED3D_POOL_MANAGED
=
1
,
WINED3D_POOL_SYSTEM_MEM
=
2
,
WINED3D_POOL_SCRATCH
=
3
,
};
typedef
enum
_WINED3DQUERYTYPE
{
...
...
@@ -1635,7 +1634,7 @@ struct wined3d_resource_desc
enum
wined3d_multisample_type
multisample_type
;
UINT
multisample_quality
;
DWORD
usage
;
WINED3DPOOL
pool
;
enum
wined3d_pool
pool
;
UINT
width
;
UINT
height
;
UINT
depth
;
...
...
@@ -1981,7 +1980,7 @@ struct wined3d_device_parent_ops
void
(
__cdecl
*
wined3d_device_created
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
*
device
);
void
(
__cdecl
*
mode_changed
)(
struct
wined3d_device_parent
*
device_parent
);
HRESULT
(
__cdecl
*
create_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
enum
wined3d_pool
pool
,
UINT
level
,
enum
wined3d_cubemap_face
face
,
struct
wined3d_surface
**
surface
);
HRESULT
(
__cdecl
*
create_rendertarget
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
enum
wined3d_multisample_type
multisample_type
,
...
...
@@ -1990,7 +1989,7 @@ struct wined3d_device_parent_ops
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
struct
wined3d_surface
**
surface
);
HRESULT
(
__cdecl
*
create_volume
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
DWORD
usage
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
);
HRESULT
(
__cdecl
*
create_swapchain
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain
**
swapchain
);
...
...
@@ -2037,10 +2036,12 @@ HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *
HRESULT
__cdecl
wined3d_buffer_create
(
struct
wined3d_device
*
device
,
struct
wined3d_buffer_desc
*
desc
,
const
void
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
);
HRESULT
__cdecl
wined3d_buffer_create_ib
(
struct
wined3d_device
*
device
,
UINT
length
,
DWORD
usage
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
);
HRESULT
__cdecl
wined3d_buffer_create_vb
(
struct
wined3d_device
*
device
,
UINT
length
,
DWORD
usage
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
);
HRESULT
__cdecl
wined3d_buffer_create_ib
(
struct
wined3d_device
*
device
,
UINT
length
,
DWORD
usage
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
);
HRESULT
__cdecl
wined3d_buffer_create_vb
(
struct
wined3d_device
*
device
,
UINT
length
,
DWORD
usage
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
);
ULONG
__cdecl
wined3d_buffer_decref
(
struct
wined3d_buffer
*
buffer
);
void
*
__cdecl
wined3d_buffer_get_parent
(
const
struct
wined3d_buffer
*
buffer
);
DWORD
__cdecl
wined3d_buffer_get_priority
(
const
struct
wined3d_buffer
*
buffer
);
...
...
@@ -2299,7 +2300,7 @@ HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const R
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
const
WINEDDBLTFX
*
blt_fx
,
enum
wined3d_texture_filter_type
filter
);
HRESULT
__cdecl
wined3d_surface_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
UINT
level
,
DWORD
usage
,
WINED3DPOOL
pool
,
enum
wined3d_format_id
format_id
,
UINT
level
,
DWORD
usage
,
enum
wined3d_pool
pool
,
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
WINED3DSURFTYPE
surface_type
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
);
ULONG
__cdecl
wined3d_surface_decref
(
struct
wined3d_surface
*
surface
);
...
...
@@ -2366,13 +2367,13 @@ HRESULT __cdecl wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain
HRESULT
__cdecl
wined3d_texture_add_dirty_region
(
struct
wined3d_texture
*
texture
,
UINT
layer
,
const
struct
wined3d_box
*
dirty_region
);
HRESULT
__cdecl
wined3d_texture_create_2d
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
);
HRESULT
__cdecl
wined3d_texture_create_3d
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
);
HRESULT
__cdecl
wined3d_texture_create_cube
(
struct
wined3d_device
*
device
,
UINT
edge_length
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
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
);
...
...
@@ -2402,7 +2403,7 @@ void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex
ULONG
__cdecl
wined3d_vertex_declaration_incref
(
struct
wined3d_vertex_declaration
*
declaration
);
HRESULT
__cdecl
wined3d_volume_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
);
ULONG
__cdecl
wined3d_volume_decref
(
struct
wined3d_volume
*
volume
);
struct
wined3d_volume
*
__cdecl
wined3d_volume_from_resource
(
struct
wined3d_resource
*
resource
);
...
...
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