Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6a1a18e7
Commit
6a1a18e7
authored
Aug 04, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement d3d10_device_CopyResource().
parent
80bca9bc
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
21 deletions
+114
-21
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+2
-0
device.c
dlls/d3d10core/device.c
+8
-1
texture.c
dlls/d3d10core/texture.c
+8
-0
utils.c
dlls/d3d10core/utils.c
+22
-0
view.c
dlls/d3d10core/view.c
+0
-20
device.c
dlls/wined3d/device.c
+71
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d.h
include/wine/wined3d.h
+2
-0
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
6a1a18e7
...
@@ -60,6 +60,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
...
@@ -60,6 +60,7 @@ const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d10core
(
UINT
bind_flags
,
enum
D3D10_USAGE
usage
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d10core
(
UINT
bind_flags
,
enum
D3D10_USAGE
usage
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
wined3d_resource_from_resource
(
ID3D10Resource
*
resource
)
DECLSPEC_HIDDEN
;
static
inline
void
read_dword
(
const
char
**
ptr
,
DWORD
*
d
)
static
inline
void
read_dword
(
const
char
**
ptr
,
DWORD
*
d
)
{
{
...
@@ -86,6 +87,7 @@ struct d3d10_texture2d
...
@@ -86,6 +87,7 @@ struct d3d10_texture2d
HRESULT
d3d10_texture2d_init
(
struct
d3d10_texture2d
*
texture
,
struct
d3d10_device
*
device
,
HRESULT
d3d10_texture2d_init
(
struct
d3d10_texture2d
*
texture
,
struct
d3d10_device
*
device
,
const
D3D10_TEXTURE2D_DESC
*
desc
)
DECLSPEC_HIDDEN
;
const
D3D10_TEXTURE2D_DESC
*
desc
)
DECLSPEC_HIDDEN
;
struct
d3d10_texture2d
*
unsafe_impl_from_ID3D10Texture2D
(
ID3D10Texture2D
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10Texture3D */
/* ID3D10Texture3D */
struct
d3d10_texture3d
struct
d3d10_texture3d
...
...
dlls/d3d10core/device.c
View file @
6a1a18e7
...
@@ -514,7 +514,14 @@ static void STDMETHODCALLTYPE d3d10_device_CopySubresourceRegion(ID3D10Device1 *
...
@@ -514,7 +514,14 @@ static void STDMETHODCALLTYPE d3d10_device_CopySubresourceRegion(ID3D10Device1 *
static
void
STDMETHODCALLTYPE
d3d10_device_CopyResource
(
ID3D10Device1
*
iface
,
static
void
STDMETHODCALLTYPE
d3d10_device_CopyResource
(
ID3D10Device1
*
iface
,
ID3D10Resource
*
dst_resource
,
ID3D10Resource
*
src_resource
)
ID3D10Resource
*
dst_resource
,
ID3D10Resource
*
src_resource
)
{
{
FIXME
(
"iface %p, dst_resource %p, src_resource %p stub!
\n
"
,
iface
,
dst_resource
,
src_resource
);
struct
wined3d_resource
*
wined3d_dst_resource
,
*
wined3d_src_resource
;
struct
d3d10_device
*
device
=
impl_from_ID3D10Device
(
iface
);
TRACE
(
"iface %p, dst_resource %p, src_resource %p.
\n
"
,
iface
,
dst_resource
,
src_resource
);
wined3d_dst_resource
=
wined3d_resource_from_resource
(
dst_resource
);
wined3d_src_resource
=
wined3d_resource_from_resource
(
src_resource
);
wined3d_device_copy_resource
(
device
->
wined3d_device
,
wined3d_dst_resource
,
wined3d_src_resource
);
}
}
static
void
STDMETHODCALLTYPE
d3d10_device_UpdateSubresource
(
ID3D10Device1
*
iface
,
static
void
STDMETHODCALLTYPE
d3d10_device_UpdateSubresource
(
ID3D10Device1
*
iface
,
...
...
dlls/d3d10core/texture.c
View file @
6a1a18e7
...
@@ -236,6 +236,14 @@ static const struct ID3D10Texture2DVtbl d3d10_texture2d_vtbl =
...
@@ -236,6 +236,14 @@ static const struct ID3D10Texture2DVtbl d3d10_texture2d_vtbl =
d3d10_texture2d_GetDesc
,
d3d10_texture2d_GetDesc
,
};
};
struct
d3d10_texture2d
*
unsafe_impl_from_ID3D10Texture2D
(
ID3D10Texture2D
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d10_texture2d_vtbl
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_texture2d
,
ID3D10Texture2D_iface
);
}
static
const
struct
wined3d_parent_ops
d3d10_texture2d_wined3d_parent_ops
=
static
const
struct
wined3d_parent_ops
d3d10_texture2d_wined3d_parent_ops
=
{
{
d3d10_texture2d_wined3d_object_released
,
d3d10_texture2d_wined3d_object_released
,
...
...
dlls/d3d10core/utils.c
View file @
6a1a18e7
...
@@ -367,6 +367,28 @@ DWORD wined3d_usage_from_d3d10core(UINT bind_flags, enum D3D10_USAGE usage)
...
@@ -367,6 +367,28 @@ DWORD wined3d_usage_from_d3d10core(UINT bind_flags, enum D3D10_USAGE usage)
return
wined3d_usage
;
return
wined3d_usage
;
}
}
struct
wined3d_resource
*
wined3d_resource_from_resource
(
ID3D10Resource
*
resource
)
{
D3D10_RESOURCE_DIMENSION
dimension
;
ID3D10Resource_GetType
(
resource
,
&
dimension
);
switch
(
dimension
)
{
case
D3D10_RESOURCE_DIMENSION_BUFFER
:
return
wined3d_buffer_get_resource
(
unsafe_impl_from_ID3D10Buffer
(
(
ID3D10Buffer
*
)
resource
)
->
wined3d_buffer
);
case
D3D10_RESOURCE_DIMENSION_TEXTURE2D
:
return
wined3d_texture_get_resource
(
unsafe_impl_from_ID3D10Texture2D
(
(
ID3D10Texture2D
*
)
resource
)
->
wined3d_texture
);
default:
FIXME
(
"Unhandled resource dimension %#x.
\n
"
,
dimension
);
return
NULL
;
}
}
void
skip_dword_unknown
(
const
char
**
ptr
,
unsigned
int
count
)
void
skip_dword_unknown
(
const
char
**
ptr
,
unsigned
int
count
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
...
dlls/d3d10core/view.c
View file @
6a1a18e7
...
@@ -25,26 +25,6 @@
...
@@ -25,26 +25,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
static
struct
wined3d_resource
*
wined3d_resource_from_resource
(
ID3D10Resource
*
resource
)
{
D3D10_RESOURCE_DIMENSION
dimension
;
ID3D10Resource_GetType
(
resource
,
&
dimension
);
switch
(
dimension
)
{
case
D3D10_RESOURCE_DIMENSION_BUFFER
:
return
wined3d_buffer_get_resource
(((
struct
d3d10_buffer
*
)
resource
)
->
wined3d_buffer
);
case
D3D10_RESOURCE_DIMENSION_TEXTURE2D
:
return
wined3d_texture_get_resource
(((
struct
d3d10_texture2d
*
)
resource
)
->
wined3d_texture
);
default:
FIXME
(
"Unhandled resource dimension %#x.
\n
"
,
dimension
);
return
NULL
;
}
}
static
HRESULT
set_dsdesc_from_resource
(
D3D10_DEPTH_STENCIL_VIEW_DESC
*
desc
,
ID3D10Resource
*
resource
)
static
HRESULT
set_dsdesc_from_resource
(
D3D10_DEPTH_STENCIL_VIEW_DESC
*
desc
,
ID3D10Resource
*
resource
)
{
{
D3D10_RESOURCE_DIMENSION
dimension
;
D3D10_RESOURCE_DIMENSION
dimension
;
...
...
dlls/wined3d/device.c
View file @
6a1a18e7
...
@@ -3664,6 +3664,77 @@ HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device,
...
@@ -3664,6 +3664,77 @@ HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device,
return
surface_color_fill
(
surface
,
rect
,
color
);
return
surface_color_fill
(
surface
,
rect
,
color
);
}
}
void
CDECL
wined3d_device_copy_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
dst_resource
,
struct
wined3d_resource
*
src_resource
)
{
struct
wined3d_surface
*
dst_surface
,
*
src_surface
;
struct
wined3d_texture
*
dst_texture
,
*
src_texture
;
unsigned
int
i
,
count
;
HRESULT
hr
;
TRACE
(
"device %p, dst_resource %p, src_resource %p.
\n
"
,
device
,
dst_resource
,
src_resource
);
if
(
src_resource
==
dst_resource
)
{
WARN
(
"Source and destination are the same resource.
\n
"
);
return
;
}
if
(
src_resource
->
type
!=
dst_resource
->
type
)
{
WARN
(
"Resource types (%s / %s) don't match.
\n
"
,
debug_d3dresourcetype
(
dst_resource
->
type
),
debug_d3dresourcetype
(
src_resource
->
type
));
return
;
}
if
(
src_resource
->
width
!=
dst_resource
->
width
||
src_resource
->
height
!=
dst_resource
->
height
||
src_resource
->
depth
!=
dst_resource
->
depth
)
{
WARN
(
"Resource dimensions (%ux%ux%u / %ux%ux%u) don't match.
\n
"
,
dst_resource
->
width
,
dst_resource
->
height
,
dst_resource
->
depth
,
src_resource
->
width
,
src_resource
->
height
,
src_resource
->
depth
);
return
;
}
if
(
src_resource
->
format
->
id
!=
dst_resource
->
format
->
id
)
{
WARN
(
"Resource formats (%s / %s) don't match.
\n
"
,
debug_d3dformat
(
dst_resource
->
format
->
id
),
debug_d3dformat
(
src_resource
->
format
->
id
));
return
;
}
if
(
dst_resource
->
type
!=
WINED3D_RTYPE_TEXTURE
)
{
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
dst_resource
->
type
));
return
;
}
dst_texture
=
wined3d_texture_from_resource
(
dst_resource
);
src_texture
=
wined3d_texture_from_resource
(
src_resource
);
if
(
src_texture
->
layer_count
!=
dst_texture
->
layer_count
||
src_texture
->
level_count
!=
dst_texture
->
level_count
)
{
WARN
(
"Subresource layouts (%ux%u / %ux%u) don't match.
\n
"
,
dst_texture
->
layer_count
,
dst_texture
->
level_count
,
src_texture
->
layer_count
,
src_texture
->
level_count
);
return
;
}
count
=
dst_texture
->
layer_count
*
dst_texture
->
level_count
;
for
(
i
=
0
;
i
<
count
;
++
i
)
{
dst_surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
dst_texture
,
i
));
src_surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
src_texture
,
i
));
if
(
FAILED
(
hr
=
wined3d_surface_blt
(
dst_surface
,
NULL
,
src_surface
,
NULL
,
0
,
NULL
,
WINED3D_TEXF_POINT
)))
ERR
(
"Failed to blit, subresource %u, hr %#x.
\n
"
,
i
,
hr
);
}
}
void
CDECL
wined3d_device_clear_rendertarget_view
(
struct
wined3d_device
*
device
,
void
CDECL
wined3d_device_clear_rendertarget_view
(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
rendertarget_view
,
const
struct
wined3d_color
*
color
)
struct
wined3d_rendertarget_view
*
rendertarget_view
,
const
struct
wined3d_color
*
color
)
{
{
...
...
dlls/wined3d/wined3d.spec
View file @
6a1a18e7
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
@ cdecl wined3d_device_clear(ptr long ptr long ptr float long)
@ cdecl wined3d_device_clear(ptr long ptr long ptr float long)
@ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr)
@ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr)
@ cdecl wined3d_device_color_fill(ptr ptr ptr ptr)
@ cdecl wined3d_device_color_fill(ptr ptr ptr ptr)
@ cdecl wined3d_device_copy_resource(ptr ptr ptr)
@ cdecl wined3d_device_create(ptr long long ptr long long ptr ptr)
@ cdecl wined3d_device_create(ptr long long ptr long long ptr ptr)
@ cdecl wined3d_device_decref(ptr)
@ cdecl wined3d_device_decref(ptr)
@ cdecl wined3d_device_draw_indexed_primitive(ptr long long)
@ cdecl wined3d_device_draw_indexed_primitive(ptr long long)
...
...
include/wine/wined3d.h
View file @
6a1a18e7
...
@@ -2080,6 +2080,8 @@ void __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *devic
...
@@ -2080,6 +2080,8 @@ void __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *devic
struct
wined3d_rendertarget_view
*
rendertarget_view
,
const
struct
wined3d_color
*
color
);
struct
wined3d_rendertarget_view
*
rendertarget_view
,
const
struct
wined3d_color
*
color
);
HRESULT
__cdecl
wined3d_device_color_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
surface
,
HRESULT
__cdecl
wined3d_device_color_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
);
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
);
void
__cdecl
wined3d_device_copy_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
dst_resource
,
struct
wined3d_resource
*
src_resource
);
HRESULT
__cdecl
wined3d_device_create
(
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
HRESULT
__cdecl
wined3d_device_create
(
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_device_type
device_type
,
HWND
focus_window
,
DWORD
behaviour_flags
,
BYTE
surface_alignment
,
enum
wined3d_device_type
device_type
,
HWND
focus_window
,
DWORD
behaviour_flags
,
BYTE
surface_alignment
,
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
**
device
);
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
**
device
);
...
...
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