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
6a5a098b
Commit
6a5a098b
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 WINED3DRESOURCETYPE typedef.
parent
992dbc10
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
80 additions
and
82 deletions
+80
-82
device.c
dlls/d3d8/device.c
+1
-1
directx.c
dlls/d3d8/directx.c
+4
-4
device.c
dlls/d3d9/device.c
+1
-1
directx.c
dlls/d3d9/directx.c
+4
-4
ddraw.c
dlls/ddraw/ddraw.c
+3
-3
device.c
dlls/ddraw/device.c
+3
-3
buffer.c
dlls/wined3d/buffer.c
+1
-1
context.c
dlls/wined3d/context.c
+4
-4
device.c
dlls/wined3d/device.c
+15
-15
directx.c
dlls/wined3d/directx.c
+7
-7
palette.c
dlls/wined3d/palette.c
+1
-1
resource.c
dlls/wined3d/resource.c
+4
-4
surface.c
dlls/wined3d/surface.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
texture.c
dlls/wined3d/texture.c
+4
-4
utils.c
dlls/wined3d/utils.c
+9
-9
volume.c
dlls/wined3d/volume.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-5
wined3d.h
include/wine/wined3d.h
+11
-13
No files found.
dlls/d3d8/device.c
View file @
6a5a098b
...
@@ -536,7 +536,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
...
@@ -536,7 +536,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
{
{
IDirect3DSurface8
*
surface
;
IDirect3DSurface8
*
surface
;
if
(
desc
.
resource_type
!=
WINED3DRTYPE_SURFACE
)
if
(
desc
.
resource_type
!=
WINED3D
_
RTYPE_SURFACE
)
{
{
WARN
(
"Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
resource
);
WARN
(
"Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
resource
);
return
D3DERR_DEVICELOST
;
return
D3DERR_DEVICELOST
;
...
...
dlls/d3d8/directx.c
View file @
6a5a098b
...
@@ -224,8 +224,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
...
@@ -224,8 +224,8 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
D3DFORMAT
CheckFormat
)
D3DFORMAT
CheckFormat
)
{
{
IDirect3D8Impl
*
This
=
impl_from_IDirect3D8
(
iface
);
IDirect3D8Impl
*
This
=
impl_from_IDirect3D8
(
iface
);
enum
wined3d_resource_type
wined3d_rtype
;
HRESULT
hr
;
HRESULT
hr
;
WINED3DRESOURCETYPE
WineD3DRType
;
TRACE
(
"iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.
\n
"
,
TRACE
(
"iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.
\n
"
,
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
);
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
);
...
@@ -233,17 +233,17 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
...
@@ -233,17 +233,17 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT A
switch
(
RType
)
{
switch
(
RType
)
{
case
D3DRTYPE_VERTEXBUFFER
:
case
D3DRTYPE_VERTEXBUFFER
:
case
D3DRTYPE_INDEXBUFFER
:
case
D3DRTYPE_INDEXBUFFER
:
WineD3DRType
=
WINED3D
RTYPE_BUFFER
;
wined3d_rtype
=
WINED3D_
RTYPE_BUFFER
;
break
;
break
;
default:
default:
WineD3DRT
ype
=
RType
;
wined3d_rt
ype
=
RType
;
break
;
break
;
}
}
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_check_device_format
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
hr
=
wined3d_check_device_format
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
Usage
,
WineD3DRT
ype
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
Usage
,
wined3d_rt
ype
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
...
dlls/d3d9/device.c
View file @
6a5a098b
...
@@ -524,7 +524,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
...
@@ -524,7 +524,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
{
{
IDirect3DSurface9
*
surface
;
IDirect3DSurface9
*
surface
;
if
(
desc
.
resource_type
!=
WINED3DRTYPE_SURFACE
)
if
(
desc
.
resource_type
!=
WINED3D
_
RTYPE_SURFACE
)
{
{
WARN
(
"Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
resource
);
WARN
(
"Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
resource
);
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
...
...
dlls/d3d9/directx.c
View file @
6a5a098b
...
@@ -232,8 +232,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
...
@@ -232,8 +232,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
D3DFORMAT
CheckFormat
)
D3DFORMAT
CheckFormat
)
{
{
IDirect3D9Impl
*
This
=
impl_from_IDirect3D9Ex
(
iface
);
IDirect3D9Impl
*
This
=
impl_from_IDirect3D9Ex
(
iface
);
enum
wined3d_resource_type
wined3d_rtype
;
HRESULT
hr
;
HRESULT
hr
;
WINED3DRESOURCETYPE
WineD3DRType
;
TRACE
(
"iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.
\n
"
,
TRACE
(
"iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.
\n
"
,
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
);
iface
,
Adapter
,
DeviceType
,
AdapterFormat
,
Usage
,
RType
,
CheckFormat
);
...
@@ -241,17 +241,17 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
...
@@ -241,17 +241,17 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT
switch
(
RType
)
{
switch
(
RType
)
{
case
D3DRTYPE_VERTEXBUFFER
:
case
D3DRTYPE_VERTEXBUFFER
:
case
D3DRTYPE_INDEXBUFFER
:
case
D3DRTYPE_INDEXBUFFER
:
WineD3DRType
=
WINED3D
RTYPE_BUFFER
;
wined3d_rtype
=
WINED3D_
RTYPE_BUFFER
;
break
;
break
;
default:
default:
WineD3DRT
ype
=
RType
;
wined3d_rt
ype
=
RType
;
break
;
break
;
}
}
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_check_device_format
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
hr
=
wined3d_check_device_format
(
This
->
WineD3D
,
Adapter
,
DeviceType
,
wined3dformat_from_d3dformat
(
AdapterFormat
),
Usage
,
WineD3DRT
ype
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
Usage
,
wined3d_rt
ype
,
wined3dformat_from_d3dformat
(
CheckFormat
),
SURFACE_OPENGL
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
...
dlls/ddraw/ddraw.c
View file @
6a5a098b
...
@@ -1541,7 +1541,7 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
...
@@ -1541,7 +1541,7 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
++
i
)
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
++
i
)
{
{
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
DefaultSurfaceType
);
mode
.
format_id
,
0
,
WINED3D
_
RTYPE_SURFACE
,
formats
[
i
],
DefaultSurfaceType
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
if
(
count
<
outsize
)
if
(
count
<
outsize
)
...
@@ -4685,7 +4685,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
...
@@ -4685,7 +4685,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
*
formats
));
++
i
)
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
*
formats
));
++
i
)
{
{
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
SURFACE_OPENGL
);
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3D
_
RTYPE_SURFACE
,
formats
[
i
],
SURFACE_OPENGL
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DDPIXELFORMAT
pformat
;
DDPIXELFORMAT
pformat
;
...
@@ -4710,7 +4710,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
...
@@ -4710,7 +4710,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
* pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
* pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
* newer enumerate both versions, so we do the same(bug 22434) */
* newer enumerate both versions, so we do the same(bug 22434) */
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
hr
=
wined3d_check_device_format
(
This
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3DRTYPE_SURFACE
,
WINED3DFMT_X8D24_UNORM
,
SURFACE_OPENGL
);
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3D
_
RTYPE_SURFACE
,
WINED3DFMT_X8D24_UNORM
,
SURFACE_OPENGL
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DDPIXELFORMAT
x8d24
=
DDPIXELFORMAT
x8d24
=
...
...
dlls/ddraw/device.c
View file @
6a5a098b
...
@@ -1162,7 +1162,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
...
@@ -1162,7 +1162,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
mode
.
format_id
,
0
,
WINED3D
_
RTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
if
(
hr
==
D3D_OK
)
{
{
DDPIXELFORMAT
pformat
;
DDPIXELFORMAT
pformat
;
...
@@ -1186,7 +1186,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
...
@@ -1186,7 +1186,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
{
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3DRTYPE_TEXTURE
,
BumpFormatList
[
i
],
SURFACE_OPENGL
);
WINED3D
_
RTYPE_TEXTURE
,
BumpFormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
if
(
hr
==
D3D_OK
)
{
{
DDPIXELFORMAT
pformat
;
DDPIXELFORMAT
pformat
;
...
@@ -1299,7 +1299,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
...
@@ -1299,7 +1299,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
0
,
WINED3D_DEVICE_TYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wined3d
,
0
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
mode
.
format_id
,
0
,
WINED3D
_
RTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
if
(
hr
==
D3D_OK
)
{
{
DDSURFACEDESC
sdesc
;
DDSURFACEDESC
sdesc
;
...
...
dlls/wined3d/buffer.c
View file @
6a5a098b
...
@@ -1196,7 +1196,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
...
@@ -1196,7 +1196,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
hr
=
resource_init
(
&
buffer
->
resource
,
device
,
WINED3DRTYPE_BUFFER
,
format
,
hr
=
resource_init
(
&
buffer
->
resource
,
device
,
WINED3D
_
RTYPE_BUFFER
,
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
usage
,
pool
,
size
,
1
,
1
,
size
,
WINED3D_MULTISAMPLE_NONE
,
0
,
usage
,
pool
,
size
,
1
,
1
,
size
,
parent
,
parent_ops
,
&
buffer_resource_ops
);
parent
,
parent_ops
,
&
buffer_resource_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/context.c
View file @
6a5a098b
...
@@ -653,13 +653,13 @@ static void context_queue_fbo_entry_destruction(struct wined3d_context *context,
...
@@ -653,13 +653,13 @@ static void context_queue_fbo_entry_destruction(struct wined3d_context *context,
}
}
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
WINED3DRESOURCETYPE
type
)
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
{
{
if
(
!
device
->
d3d_initialized
)
return
;
if
(
!
device
->
d3d_initialized
)
return
;
switch
(
type
)
switch
(
type
)
{
{
case
WINED3DRTYPE_SURFACE
:
case
WINED3D
_
RTYPE_SURFACE
:
context_enum_surface_fbo_entries
(
device
,
surface_from_resource
(
resource
),
context_enum_surface_fbo_entries
(
device
,
surface_from_resource
(
resource
),
context_queue_fbo_entry_destruction
);
context_queue_fbo_entry_destruction
);
break
;
break
;
...
@@ -675,11 +675,11 @@ static void context_detach_fbo_entry(struct wined3d_context *context, struct fbo
...
@@ -675,11 +675,11 @@ static void context_detach_fbo_entry(struct wined3d_context *context, struct fbo
}
}
void
context_resource_unloaded
(
const
struct
wined3d_device
*
device
,
void
context_resource_unloaded
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
WINED3DRESOURCETYPE
type
)
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
{
{
switch
(
type
)
switch
(
type
)
{
{
case
WINED3DRTYPE_SURFACE
:
case
WINED3D
_
RTYPE_SURFACE
:
context_enum_surface_fbo_entries
(
device
,
surface_from_resource
(
resource
),
context_enum_surface_fbo_entries
(
device
,
surface_from_resource
(
resource
),
context_detach_fbo_entry
);
context_detach_fbo_entry
);
break
;
break
;
...
...
dlls/wined3d/device.c
View file @
6a5a098b
...
@@ -876,7 +876,7 @@ ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
...
@@ -876,7 +876,7 @@ ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
LIST_FOR_EACH_ENTRY
(
resource
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
LIST_FOR_EACH_ENTRY
(
resource
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
{
FIXME
(
"Leftover resource %p with type %s (%#x).
\n
"
,
FIXME
(
"Leftover resource %p with type %s (%#x).
\n
"
,
resource
,
debug_d3dresourcetype
(
resource
->
resourceType
),
resource
->
resourceT
ype
);
resource
,
debug_d3dresourcetype
(
resource
->
type
),
resource
->
t
ype
);
}
}
}
}
...
@@ -4338,8 +4338,8 @@ static HRESULT device_update_volume(struct wined3d_device *device,
...
@@ -4338,8 +4338,8 @@ static HRESULT device_update_volume(struct wined3d_device *device,
HRESULT
CDECL
wined3d_device_update_texture
(
struct
wined3d_device
*
device
,
HRESULT
CDECL
wined3d_device_update_texture
(
struct
wined3d_device
*
device
,
struct
wined3d_texture
*
src_texture
,
struct
wined3d_texture
*
dst_texture
)
struct
wined3d_texture
*
src_texture
,
struct
wined3d_texture
*
dst_texture
)
{
{
enum
wined3d_resource_type
type
;
unsigned
int
level_count
,
i
;
unsigned
int
level_count
,
i
;
WINED3DRESOURCETYPE
type
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"device %p, src_texture %p, dst_texture %p.
\n
"
,
device
,
src_texture
,
dst_texture
);
TRACE
(
"device %p, src_texture %p, dst_texture %p.
\n
"
,
device
,
src_texture
,
dst_texture
);
...
@@ -4358,8 +4358,8 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
...
@@ -4358,8 +4358,8 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
}
}
/* Verify that the source and destination textures are the same type. */
/* Verify that the source and destination textures are the same type. */
type
=
src_texture
->
resource
.
resourceT
ype
;
type
=
src_texture
->
resource
.
t
ype
;
if
(
dst_texture
->
resource
.
resourceT
ype
!=
type
)
if
(
dst_texture
->
resource
.
t
ype
!=
type
)
{
{
WARN
(
"Source and destination have different types, returning WINED3DERR_INVALIDCALL.
\n
"
);
WARN
(
"Source and destination have different types, returning WINED3DERR_INVALIDCALL.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
...
@@ -4379,7 +4379,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
...
@@ -4379,7 +4379,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
/* Update every surface level of the texture. */
/* Update every surface level of the texture. */
switch
(
type
)
switch
(
type
)
{
{
case
WINED3DRTYPE_TEXTURE
:
case
WINED3D
_
RTYPE_TEXTURE
:
{
{
struct
wined3d_surface
*
src_surface
;
struct
wined3d_surface
*
src_surface
;
struct
wined3d_surface
*
dst_surface
;
struct
wined3d_surface
*
dst_surface
;
...
@@ -4398,7 +4398,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
...
@@ -4398,7 +4398,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
break
;
break
;
}
}
case
WINED3D
RTYPE_CUBE
TEXTURE
:
case
WINED3D
_RTYPE_CUBE_
TEXTURE
:
{
{
struct
wined3d_surface
*
src_surface
;
struct
wined3d_surface
*
src_surface
;
struct
wined3d_surface
*
dst_surface
;
struct
wined3d_surface
*
dst_surface
;
...
@@ -4417,7 +4417,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
...
@@ -4417,7 +4417,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
break
;
break
;
}
}
case
WINED3D
RTYPE_VOLUME
TEXTURE
:
case
WINED3D
_RTYPE_VOLUME_
TEXTURE
:
{
{
for
(
i
=
0
;
i
<
level_count
;
++
i
)
for
(
i
=
0
;
i
<
level_count
;
++
i
)
{
{
...
@@ -4799,7 +4799,7 @@ void CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
...
@@ -4799,7 +4799,7 @@ void CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
RECT
rect
;
RECT
rect
;
resource
=
rendertarget_view
->
resource
;
resource
=
rendertarget_view
->
resource
;
if
(
resource
->
resourceType
!=
WINED3D
RTYPE_SURFACE
)
if
(
resource
->
type
!=
WINED3D_
RTYPE_SURFACE
)
{
{
FIXME
(
"Only supported on surface resources
\n
"
);
FIXME
(
"Only supported on surface resources
\n
"
);
return
;
return
;
...
@@ -5698,7 +5698,7 @@ static void device_resource_remove(struct wined3d_device *device, struct wined3d
...
@@ -5698,7 +5698,7 @@ static void device_resource_remove(struct wined3d_device *device, struct wined3d
void
device_resource_released
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
void
device_resource_released
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
{
{
WINED3DRESOURCETYPE
type
=
resource
->
resourceT
ype
;
enum
wined3d_resource_type
type
=
resource
->
t
ype
;
unsigned
int
i
;
unsigned
int
i
;
TRACE
(
"device %p, resource %p, type %s.
\n
"
,
device
,
resource
,
debug_d3dresourcetype
(
type
));
TRACE
(
"device %p, resource %p, type %s.
\n
"
,
device
,
resource
,
debug_d3dresourcetype
(
type
));
...
@@ -5707,7 +5707,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
...
@@ -5707,7 +5707,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
switch
(
type
)
switch
(
type
)
{
{
case
WINED3DRTYPE_SURFACE
:
case
WINED3D
_
RTYPE_SURFACE
:
{
{
struct
wined3d_surface
*
surface
=
surface_from_resource
(
resource
);
struct
wined3d_surface
*
surface
=
surface_from_resource
(
resource
);
...
@@ -5730,9 +5730,9 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
...
@@ -5730,9 +5730,9 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
}
}
break
;
break
;
case
WINED3DRTYPE_TEXTURE
:
case
WINED3D
_
RTYPE_TEXTURE
:
case
WINED3D
RTYPE_CUBE
TEXTURE
:
case
WINED3D
_RTYPE_CUBE_
TEXTURE
:
case
WINED3D
RTYPE_VOLUME
TEXTURE
:
case
WINED3D
_RTYPE_VOLUME_
TEXTURE
:
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
{
{
struct
wined3d_texture
*
texture
=
wined3d_texture_from_resource
(
resource
);
struct
wined3d_texture
*
texture
=
wined3d_texture_from_resource
(
resource
);
...
@@ -5754,7 +5754,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
...
@@ -5754,7 +5754,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
}
}
break
;
break
;
case
WINED3DRTYPE_BUFFER
:
case
WINED3D
_
RTYPE_BUFFER
:
{
{
struct
wined3d_buffer
*
buffer
=
buffer_from_resource
(
resource
);
struct
wined3d_buffer
*
buffer
=
buffer_from_resource
(
resource
);
...
@@ -5816,7 +5816,7 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de
...
@@ -5816,7 +5816,7 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de
LIST_FOR_EACH_ENTRY
(
resource
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
LIST_FOR_EACH_ENTRY
(
resource
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
{
if
(
resource
->
resourceType
==
WINED3D
RTYPE_SURFACE
)
if
(
resource
->
type
==
WINED3D_
RTYPE_SURFACE
)
{
{
struct
wined3d_surface
*
s
=
surface_from_resource
(
resource
);
struct
wined3d_surface
*
s
=
surface_from_resource
(
resource
);
...
...
dlls/wined3d/directx.c
View file @
6a5a098b
...
@@ -3794,7 +3794,7 @@ static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter,
...
@@ -3794,7 +3794,7 @@ static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter,
HRESULT
CDECL
wined3d_check_device_format
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
HRESULT
CDECL
wined3d_check_device_format
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
adapter_format_id
,
DWORD
usage
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
adapter_format_id
,
DWORD
usage
,
WINED3DRESOURCETYPE
resource_type
,
enum
wined3d_format_id
check_format_id
,
WINED3DSURFTYPE
surface_type
)
enum
wined3d_resource_type
resource_type
,
enum
wined3d_format_id
check_format_id
,
WINED3DSURFTYPE
surface_type
)
{
{
const
struct
wined3d_adapter
*
adapter
=
&
wined3d
->
adapters
[
adapter_idx
];
const
struct
wined3d_adapter
*
adapter
=
&
wined3d
->
adapters
[
adapter_idx
];
const
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
...
@@ -3813,7 +3813,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
...
@@ -3813,7 +3813,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
switch
(
resource_type
)
switch
(
resource_type
)
{
{
case
WINED3D
RTYPE_CUBE
TEXTURE
:
case
WINED3D
_RTYPE_CUBE_
TEXTURE
:
/* Cubetexture allows:
/* Cubetexture allows:
* - WINED3DUSAGE_AUTOGENMIPMAP
* - WINED3DUSAGE_AUTOGENMIPMAP
* - WINED3DUSAGE_DEPTHSTENCIL
* - WINED3DUSAGE_DEPTHSTENCIL
...
@@ -3930,7 +3930,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
...
@@ -3930,7 +3930,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
}
}
break
;
break
;
case
WINED3DRTYPE_SURFACE
:
case
WINED3D
_
RTYPE_SURFACE
:
/* Surface allows:
/* Surface allows:
* - WINED3DUSAGE_DEPTHSTENCIL
* - WINED3DUSAGE_DEPTHSTENCIL
* - WINED3DUSAGE_NONSECURE (d3d9ex)
* - WINED3DUSAGE_NONSECURE (d3d9ex)
...
@@ -3973,7 +3973,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
...
@@ -3973,7 +3973,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
}
}
break
;
break
;
case
WINED3DRTYPE_TEXTURE
:
case
WINED3D
_
RTYPE_TEXTURE
:
/* Texture allows:
/* Texture allows:
* - WINED3DUSAGE_AUTOGENMIPMAP
* - WINED3DUSAGE_AUTOGENMIPMAP
* - WINED3DUSAGE_DEPTHSTENCIL
* - WINED3DUSAGE_DEPTHSTENCIL
...
@@ -4111,8 +4111,8 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
...
@@ -4111,8 +4111,8 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
}
}
break
;
break
;
case
WINED3D
RTYPE_VOLUME
TEXTURE
:
case
WINED3D
_RTYPE_VOLUME_
TEXTURE
:
case
WINED3DRTYPE_VOLUME
:
case
WINED3D
_
RTYPE_VOLUME
:
/* Volume is to VolumeTexture what Surface is to Texture, but its
/* Volume is to VolumeTexture what Surface is to Texture, but its
* usage caps are not documented. Most driver seem to offer
* usage caps are not documented. Most driver seem to offer
* (nearly) the same on Volume and VolumeTexture, so do that too.
* (nearly) the same on Volume and VolumeTexture, so do that too.
...
@@ -4385,7 +4385,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
...
@@ -4385,7 +4385,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
/* Use CheckDeviceFormat to see if the backbuffer_format is usable with the given display_format */
/* Use CheckDeviceFormat to see if the backbuffer_format is usable with the given display_format */
hr
=
wined3d_check_device_format
(
wined3d
,
adapter_idx
,
device_type
,
display_format
,
hr
=
wined3d_check_device_format
(
wined3d
,
adapter_idx
,
device_type
,
display_format
,
WINED3DUSAGE_RENDERTARGET
,
WINED3DRTYPE_SURFACE
,
backbuffer_format
,
SURFACE_OPENGL
);
WINED3DUSAGE_RENDERTARGET
,
WINED3D
_
RTYPE_SURFACE
,
backbuffer_format
,
SURFACE_OPENGL
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
TRACE_
(
d3d_caps
)(
"Unsupported display/backbuffer format combination %s / %s.
\n
"
,
TRACE_
(
d3d_caps
)(
"Unsupported display/backbuffer format combination %s / %s.
\n
"
,
debug_d3dformat
(
display_format
),
debug_d3dformat
(
backbuffer_format
));
debug_d3dformat
(
display_format
),
debug_d3dformat
(
backbuffer_format
));
...
...
dlls/wined3d/palette.c
View file @
6a5a098b
...
@@ -133,7 +133,7 @@ HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette,
...
@@ -133,7 +133,7 @@ HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette,
/* If the palette is attached to the render target, update all render targets */
/* If the palette is attached to the render target, update all render targets */
LIST_FOR_EACH_ENTRY
(
resource
,
&
palette
->
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
LIST_FOR_EACH_ENTRY
(
resource
,
&
palette
->
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
{
if
(
resource
->
resourceType
==
WINED3D
RTYPE_SURFACE
)
if
(
resource
->
type
==
WINED3D_
RTYPE_SURFACE
)
{
{
struct
wined3d_surface
*
surface
=
surface_from_resource
(
resource
);
struct
wined3d_surface
*
surface
=
surface_from_resource
(
resource
);
if
(
surface
->
palette
==
palette
)
if
(
surface
->
palette
==
palette
)
...
...
dlls/wined3d/resource.c
View file @
6a5a098b
...
@@ -77,7 +77,7 @@ static void resource_check_usage(DWORD usage)
...
@@ -77,7 +77,7 @@ static void resource_check_usage(DWORD usage)
}
}
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
WINED3DRESOURCETYPE
resource_
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
...
@@ -85,7 +85,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -85,7 +85,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
{
{
resource
->
ref
=
1
;
resource
->
ref
=
1
;
resource
->
device
=
device
;
resource
->
device
=
device
;
resource
->
resourceType
=
resource_
type
;
resource
->
type
=
type
;
resource
->
format
=
format
;
resource
->
format
=
format
;
resource
->
multisample_type
=
multisample_type
;
resource
->
multisample_type
=
multisample_type
;
resource
->
multisample_quality
=
multisample_quality
;
resource
->
multisample_quality
=
multisample_quality
;
...
@@ -172,7 +172,7 @@ void resource_cleanup(struct wined3d_resource *resource)
...
@@ -172,7 +172,7 @@ void resource_cleanup(struct wined3d_resource *resource)
void
resource_unload
(
struct
wined3d_resource
*
resource
)
void
resource_unload
(
struct
wined3d_resource
*
resource
)
{
{
context_resource_unloaded
(
resource
->
device
,
context_resource_unloaded
(
resource
->
device
,
resource
,
resource
->
resourceT
ype
);
resource
,
resource
->
t
ype
);
}
}
static
struct
private_data
*
resource_find_private_data
(
const
struct
wined3d_resource
*
resource
,
REFGUID
tag
)
static
struct
private_data
*
resource_find_private_data
(
const
struct
wined3d_resource
*
resource
,
REFGUID
tag
)
...
@@ -318,7 +318,7 @@ void * CDECL wined3d_resource_get_parent(const struct wined3d_resource *resource
...
@@ -318,7 +318,7 @@ void * CDECL wined3d_resource_get_parent(const struct wined3d_resource *resource
void
CDECL
wined3d_resource_get_desc
(
const
struct
wined3d_resource
*
resource
,
struct
wined3d_resource_desc
*
desc
)
void
CDECL
wined3d_resource_get_desc
(
const
struct
wined3d_resource
*
resource
,
struct
wined3d_resource_desc
*
desc
)
{
{
desc
->
resource_type
=
resource
->
resourceT
ype
;
desc
->
resource_type
=
resource
->
t
ype
;
desc
->
format
=
resource
->
format
->
id
;
desc
->
format
=
resource
->
format
->
id
;
desc
->
multisample_type
=
resource
->
multisample_type
;
desc
->
multisample_type
=
resource
->
multisample_type
;
desc
->
multisample_quality
=
resource
->
multisample_quality
;
desc
->
multisample_quality
=
resource
->
multisample_quality
;
...
...
dlls/wined3d/surface.c
View file @
6a5a098b
...
@@ -7257,7 +7257,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
...
@@ -7257,7 +7257,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
hr
=
resource_init
(
&
surface
->
resource
,
device
,
WINED3DRTYPE_SURFACE
,
format
,
hr
=
resource_init
(
&
surface
->
resource
,
device
,
WINED3D
_
RTYPE_SURFACE
,
format
,
multisample_type
,
multisample_quality
,
usage
,
pool
,
width
,
height
,
1
,
multisample_type
,
multisample_quality
,
usage
,
pool
,
width
,
height
,
1
,
resource_size
,
parent
,
parent_ops
,
&
surface_resource_ops
);
resource_size
,
parent
,
parent_ops
,
&
surface_resource_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/swapchain.c
View file @
6a5a098b
...
@@ -461,7 +461,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
...
@@ -461,7 +461,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
cursor
.
resource
.
device
=
swapchain
->
device
;
cursor
.
resource
.
device
=
swapchain
->
device
;
cursor
.
resource
.
pool
=
WINED3DPOOL_SCRATCH
;
cursor
.
resource
.
pool
=
WINED3DPOOL_SCRATCH
;
cursor
.
resource
.
format
=
wined3d_get_format
(
gl_info
,
WINED3DFMT_B8G8R8A8_UNORM
);
cursor
.
resource
.
format
=
wined3d_get_format
(
gl_info
,
WINED3DFMT_B8G8R8A8_UNORM
);
cursor
.
resource
.
resourceType
=
WINED3D
RTYPE_SURFACE
;
cursor
.
resource
.
type
=
WINED3D_
RTYPE_SURFACE
;
cursor
.
texture_name
=
swapchain
->
device
->
cursorTexture
;
cursor
.
texture_name
=
swapchain
->
device
->
cursorTexture
;
cursor
.
texture_target
=
GL_TEXTURE_2D
;
cursor
.
texture_target
=
GL_TEXTURE_2D
;
cursor
.
texture_level
=
0
;
cursor
.
texture_level
=
0
;
...
...
dlls/wined3d/texture.c
View file @
6a5a098b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_texture
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_texture
);
static
HRESULT
wined3d_texture_init
(
struct
wined3d_texture
*
texture
,
const
struct
wined3d_texture_ops
*
texture_ops
,
static
HRESULT
wined3d_texture_init
(
struct
wined3d_texture
*
texture
,
const
struct
wined3d_texture_ops
*
texture_ops
,
UINT
layer_count
,
UINT
level_count
,
WINED3DRESOURCETYPE
resource_type
,
struct
wined3d_device
*
device
,
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
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
{
{
...
@@ -806,7 +806,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
...
@@ -806,7 +806,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
}
}
hr
=
wined3d_texture_init
(
texture
,
&
texture2d_ops
,
6
,
levels
,
hr
=
wined3d_texture_init
(
texture
,
&
texture2d_ops
,
6
,
levels
,
WINED3D
RTYPE_CUBE
TEXTURE
,
device
,
usage
,
format
,
pool
,
WINED3D
_RTYPE_CUBE_
TEXTURE
,
device
,
usage
,
format
,
pool
,
parent
,
parent_ops
,
&
texture2d_resource_ops
);
parent
,
parent_ops
,
&
texture2d_resource_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
...
@@ -943,7 +943,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he
...
@@ -943,7 +943,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he
}
}
hr
=
wined3d_texture_init
(
texture
,
&
texture2d_ops
,
1
,
levels
,
hr
=
wined3d_texture_init
(
texture
,
&
texture2d_ops
,
1
,
levels
,
WINED3DRTYPE_TEXTURE
,
device
,
usage
,
format
,
pool
,
WINED3D
_
RTYPE_TEXTURE
,
device
,
usage
,
format
,
pool
,
parent
,
parent_ops
,
&
texture2d_resource_ops
);
parent
,
parent_ops
,
&
texture2d_resource_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
...
@@ -1194,7 +1194,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U
...
@@ -1194,7 +1194,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U
}
}
hr
=
wined3d_texture_init
(
texture
,
&
texture3d_ops
,
1
,
levels
,
hr
=
wined3d_texture_init
(
texture
,
&
texture3d_ops
,
1
,
levels
,
WINED3D
RTYPE_VOLUME
TEXTURE
,
device
,
usage
,
format
,
pool
,
WINED3D
_RTYPE_VOLUME_
TEXTURE
,
device
,
usage
,
format
,
pool
,
parent
,
parent_ops
,
&
texture3d_resource_ops
);
parent
,
parent_ops
,
&
texture3d_resource_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
...
...
dlls/wined3d/utils.c
View file @
6a5a098b
...
@@ -1975,20 +1975,20 @@ const char* debug_d3ddeclusage(BYTE usage) {
...
@@ -1975,20 +1975,20 @@ const char* debug_d3ddeclusage(BYTE usage) {
}
}
}
}
const
char
*
debug_d3dresourcetype
(
WINED3DRESOURCETYPE
res
)
const
char
*
debug_d3dresourcetype
(
enum
wined3d_resource_type
resource_type
)
{
{
switch
(
res
)
switch
(
res
ource_type
)
{
{
#define RES_TO_STR(res) case res: return #res
#define RES_TO_STR(res) case res: return #res
RES_TO_STR
(
WINED3DRTYPE_SURFACE
);
RES_TO_STR
(
WINED3D
_
RTYPE_SURFACE
);
RES_TO_STR
(
WINED3DRTYPE_VOLUME
);
RES_TO_STR
(
WINED3D
_
RTYPE_VOLUME
);
RES_TO_STR
(
WINED3DRTYPE_TEXTURE
);
RES_TO_STR
(
WINED3D
_
RTYPE_TEXTURE
);
RES_TO_STR
(
WINED3D
RTYPE_VOLUME
TEXTURE
);
RES_TO_STR
(
WINED3D
_RTYPE_VOLUME_
TEXTURE
);
RES_TO_STR
(
WINED3D
RTYPE_CUBE
TEXTURE
);
RES_TO_STR
(
WINED3D
_RTYPE_CUBE_
TEXTURE
);
RES_TO_STR
(
WINED3DRTYPE_BUFFER
);
RES_TO_STR
(
WINED3D
_
RTYPE_BUFFER
);
#undef RES_TO_STR
#undef RES_TO_STR
default:
default:
FIXME
(
"Unrecognized
%u WINED3DRESOURCETYPE!
\n
"
,
res
);
FIXME
(
"Unrecognized
resource type %#x.
\n
"
,
resource_type
);
return
"unrecognized"
;
return
"unrecognized"
;
}
}
}
}
...
...
dlls/wined3d/volume.c
View file @
6a5a098b
...
@@ -279,7 +279,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
...
@@ -279,7 +279,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
hr
=
resource_init
(
&
volume
->
resource
,
device
,
WINED3DRTYPE_VOLUME
,
format
,
hr
=
resource_init
(
&
volume
->
resource
,
device
,
WINED3D
_
RTYPE_VOLUME
,
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
usage
,
pool
,
width
,
height
,
depth
,
WINED3D_MULTISAMPLE_NONE
,
0
,
usage
,
pool
,
width
,
height
,
depth
,
width
*
height
*
depth
*
format
->
byte_count
,
parent
,
parent_ops
,
width
*
height
*
depth
*
format
->
byte_count
,
parent
,
parent_ops
,
&
volume_resource_ops
);
&
volume_resource_ops
);
...
...
dlls/wined3d/wined3d_private.h
View file @
6a5a098b
...
@@ -1257,9 +1257,9 @@ DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN;
...
@@ -1257,9 +1257,9 @@ DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN;
void
context_invalidate_state
(
struct
wined3d_context
*
context
,
DWORD
state_id
)
DECLSPEC_HIDDEN
;
void
context_invalidate_state
(
struct
wined3d_context
*
context
,
DWORD
state_id
)
DECLSPEC_HIDDEN
;
void
context_release
(
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_release
(
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
void
context_resource_released
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
WINED3DRESOURCETYPE
type
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
DECLSPEC_HIDDEN
;
void
context_resource_unloaded
(
const
struct
wined3d_device
*
device
,
void
context_resource_unloaded
(
const
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
WINED3DRESOURCETYPE
type
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
resource
,
enum
wined3d_resource_type
type
)
DECLSPEC_HIDDEN
;
BOOL
context_set_current
(
struct
wined3d_context
*
ctx
)
DECLSPEC_HIDDEN
;
BOOL
context_set_current
(
struct
wined3d_context
*
ctx
)
DECLSPEC_HIDDEN
;
void
context_set_draw_buffer
(
struct
wined3d_context
*
context
,
GLenum
buffer
)
DECLSPEC_HIDDEN
;
void
context_set_draw_buffer
(
struct
wined3d_context
*
context
,
GLenum
buffer
)
DECLSPEC_HIDDEN
;
void
context_set_tls_idx
(
DWORD
idx
)
DECLSPEC_HIDDEN
;
void
context_set_tls_idx
(
DWORD
idx
)
DECLSPEC_HIDDEN
;
...
@@ -1836,7 +1836,7 @@ struct wined3d_resource
...
@@ -1836,7 +1836,7 @@ struct wined3d_resource
{
{
LONG
ref
;
LONG
ref
;
struct
wined3d_device
*
device
;
struct
wined3d_device
*
device
;
WINED3DRESOURCETYPE
resourceT
ype
;
enum
wined3d_resource_type
t
ype
;
const
struct
wined3d_format
*
format
;
const
struct
wined3d_format
*
format
;
enum
wined3d_multisample_type
multisample_type
;
enum
wined3d_multisample_type
multisample_type
;
UINT
multisample_quality
;
UINT
multisample_quality
;
...
@@ -1861,7 +1861,7 @@ struct wined3d_resource
...
@@ -1861,7 +1861,7 @@ struct wined3d_resource
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
DWORD
resource_get_priority
(
const
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
DWORD
resource_get_priority
(
const
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
WINED3DRESOURCETYPE
resource_
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
...
@@ -2489,7 +2489,7 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPE
...
@@ -2489,7 +2489,7 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPE
/* Trace routines */
/* Trace routines */
const
char
*
debug_d3dformat
(
enum
wined3d_format_id
format_id
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dformat
(
enum
wined3d_format_id
format_id
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddevicetype
(
enum
wined3d_device_type
device_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddevicetype
(
enum
wined3d_device_type
device_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dresourcetype
(
WINED3DRESOURCETYPE
res
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dresourcetype
(
enum
wined3d_resource_type
resource_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dusage
(
DWORD
usage
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dusage
(
DWORD
usage
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dusagequery
(
DWORD
usagequery
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dusagequery
(
DWORD
usagequery
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
6a5a098b
...
@@ -670,17 +670,15 @@ enum wined3d_texture_filter_type
...
@@ -670,17 +670,15 @@ enum wined3d_texture_filter_type
WINED3D_TEXF_GAUSSIAN_QUAD
=
7
,
WINED3D_TEXF_GAUSSIAN_QUAD
=
7
,
};
};
typedef
enum
_WINED3DRESOURCETYPE
enum
wined3d_resource_type
{
{
WINED3DRTYPE_SURFACE
=
1
,
WINED3D_RTYPE_SURFACE
=
1
,
WINED3DRTYPE_VOLUME
=
2
,
WINED3D_RTYPE_VOLUME
=
2
,
WINED3DRTYPE_TEXTURE
=
3
,
WINED3D_RTYPE_TEXTURE
=
3
,
WINED3DRTYPE_VOLUMETEXTURE
=
4
,
WINED3D_RTYPE_VOLUME_TEXTURE
=
4
,
WINED3DRTYPE_CUBETEXTURE
=
5
,
WINED3D_RTYPE_CUBE_TEXTURE
=
5
,
WINED3DRTYPE_BUFFER
=
6
,
WINED3D_RTYPE_BUFFER
=
6
,
WINED3DRTYPE_FORCE_DWORD
=
0x7fffffff
};
}
WINED3DRESOURCETYPE
;
#define WINED3DRTYPECOUNT WINED3DRTYPE_BUFFER
typedef
enum
_WINED3DPOOL
typedef
enum
_WINED3DPOOL
{
{
...
@@ -1632,7 +1630,7 @@ struct wined3d_swapchain_desc
...
@@ -1632,7 +1630,7 @@ struct wined3d_swapchain_desc
struct
wined3d_resource_desc
struct
wined3d_resource_desc
{
{
WINED3DRESOURCETYPE
resource_type
;
enum
wined3d_resource_type
resource_type
;
enum
wined3d_format_id
format
;
enum
wined3d_format_id
format
;
enum
wined3d_multisample_type
multisample_type
;
enum
wined3d_multisample_type
multisample_type
;
UINT
multisample_quality
;
UINT
multisample_quality
;
...
@@ -2008,7 +2006,7 @@ HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
...
@@ -2008,7 +2006,7 @@ HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
enum
wined3d_format_id
render_target_format_id
,
enum
wined3d_format_id
depth_stencil_format_id
);
enum
wined3d_format_id
render_target_format_id
,
enum
wined3d_format_id
depth_stencil_format_id
);
HRESULT
__cdecl
wined3d_check_device_format
(
const
struct
wined3d
*
wined3d
,
UINT
adaper_idx
,
HRESULT
__cdecl
wined3d_check_device_format
(
const
struct
wined3d
*
wined3d
,
UINT
adaper_idx
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
adapter_format_id
,
DWORD
usage
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
adapter_format_id
,
DWORD
usage
,
WINED3DRESOURCETYPE
resource_type
,
enum
wined3d_format_id
check_format_id
,
enum
wined3d_resource_type
resource_type
,
enum
wined3d_format_id
check_format_id
,
WINED3DSURFTYPE
surface_type
);
WINED3DSURFTYPE
surface_type
);
HRESULT
__cdecl
wined3d_check_device_format_conversion
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
HRESULT
__cdecl
wined3d_check_device_format_conversion
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
source_format_id
,
enum
wined3d_device_type
device_type
,
enum
wined3d_format_id
source_format_id
,
...
...
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