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
62a02a04
Commit
62a02a04
authored
Aug 18, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement d3d10_device_UpdateSubresource().
parent
ee9b1311
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
1 deletion
+105
-1
device.c
dlls/d3d10core/device.c
+21
-1
device.c
dlls/d3d10core/tests/device.c
+0
-0
device.c
dlls/wined3d/device.c
+80
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d.h
include/wine/wined3d.h
+3
-0
No files found.
dlls/d3d10core/device.c
View file @
62a02a04
...
...
@@ -737,8 +737,28 @@ static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device1 *ifac
ID3D10Resource
*
resource
,
UINT
subresource_idx
,
const
D3D10_BOX
*
box
,
const
void
*
data
,
UINT
row_pitch
,
UINT
depth_pitch
)
{
FIXME
(
"iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u stub!
\n
"
,
struct
d3d10_device
*
device
=
impl_from_ID3D10Device
(
iface
);
struct
wined3d_resource
*
wined3d_resource
;
struct
wined3d_box
wined3d_box
;
TRACE
(
"iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.
\n
"
,
iface
,
resource
,
subresource_idx
,
box
,
data
,
row_pitch
,
depth_pitch
);
if
(
box
)
{
wined3d_box
.
left
=
box
->
left
;
wined3d_box
.
top
=
box
->
top
;
wined3d_box
.
front
=
box
->
front
;
wined3d_box
.
right
=
box
->
right
;
wined3d_box
.
bottom
=
box
->
bottom
;
wined3d_box
.
back
=
box
->
back
;
}
wined3d_resource
=
wined3d_resource_from_resource
(
resource
);
wined3d_mutex_lock
();
wined3d_device_update_sub_resource
(
device
->
wined3d_device
,
wined3d_resource
,
subresource_idx
,
box
?
&
wined3d_box
:
NULL
,
data
,
row_pitch
,
depth_pitch
);
wined3d_mutex_unlock
();
}
static
void
STDMETHODCALLTYPE
d3d10_device_ClearRenderTargetView
(
ID3D10Device1
*
iface
,
...
...
dlls/d3d10core/tests/device.c
View file @
62a02a04
This diff is collapsed.
Click to expand it.
dlls/wined3d/device.c
View file @
62a02a04
...
...
@@ -3818,6 +3818,8 @@ float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
return
0
.
0
f
;
}
/* FIXME: Callers should probably use wined3d_device_update_sub_resource()
* instead. */
HRESULT
CDECL
wined3d_device_update_surface
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
POINT
*
dst_point
)
...
...
@@ -3981,6 +3983,84 @@ void CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *device
ERR
(
"Failed to blit, hr %#x.
\n
"
,
hr
);
}
void
CDECL
wined3d_device_update_sub_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_box
*
box
,
const
void
*
data
,
unsigned
int
row_pitch
,
unsigned
int
depth_pitch
)
{
struct
wined3d_resource
*
sub_resource
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_const_bo_address
addr
;
struct
wined3d_context
*
context
;
struct
wined3d_texture
*
texture
;
struct
wined3d_surface
*
surface
;
POINT
dst_point
;
RECT
src_rect
;
TRACE
(
"device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.
\n
"
,
device
,
resource
,
sub_resource_idx
,
box
,
data
,
row_pitch
,
depth_pitch
);
if
(
resource
->
type
!=
WINED3D_RTYPE_TEXTURE
)
{
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
resource
->
type
));
return
;
}
texture
=
wined3d_texture_from_resource
(
resource
);
if
(
!
(
sub_resource
=
wined3d_texture_get_sub_resource
(
texture
,
sub_resource_idx
)))
{
WARN
(
"Invalid sub_resource_idx %u.
\n
"
,
sub_resource_idx
);
return
;
}
surface
=
surface_from_resource
(
sub_resource
);
src_rect
.
left
=
0
;
src_rect
.
top
=
0
;
if
(
box
)
{
if
(
box
->
left
>=
box
->
right
||
box
->
right
>
sub_resource
->
width
||
box
->
top
>=
box
->
bottom
||
box
->
bottom
>
sub_resource
->
height
)
{
WARN
(
"Invalid box (%u, %u, %u)->(%u, %u, %u) specified.
\n
"
,
box
->
left
,
box
->
top
,
box
->
front
,
box
->
right
,
box
->
bottom
,
box
->
back
);
return
;
}
src_rect
.
right
=
box
->
right
-
box
->
left
;
src_rect
.
bottom
=
box
->
bottom
-
box
->
top
;
dst_point
.
x
=
box
->
left
;
dst_point
.
y
=
box
->
top
;
}
else
{
src_rect
.
right
=
sub_resource
->
width
;
src_rect
.
bottom
=
sub_resource
->
height
;
dst_point
.
x
=
0
;
dst_point
.
y
=
0
;
}
addr
.
buffer_object
=
0
;
addr
.
addr
=
data
;
context
=
context_acquire
(
resource
->
device
,
NULL
);
gl_info
=
context
->
gl_info
;
/* Only load the surface for partial updates. */
if
(
!
dst_point
.
x
&&
!
dst_point
.
y
&&
src_rect
.
right
==
sub_resource
->
width
&&
src_rect
.
bottom
==
sub_resource
->
height
)
wined3d_texture_prepare_texture
(
texture
,
context
,
FALSE
);
else
surface_load_location
(
surface
,
WINED3D_LOCATION_TEXTURE_RGB
);
wined3d_texture_bind_and_dirtify
(
texture
,
context
,
FALSE
);
wined3d_surface_upload_data
(
surface
,
gl_info
,
resource
->
format
,
&
src_rect
,
row_pitch
,
&
dst_point
,
FALSE
,
&
addr
);
context_release
(
context
);
surface_validate_location
(
surface
,
WINED3D_LOCATION_TEXTURE_RGB
);
surface_invalidate_location
(
surface
,
~
WINED3D_LOCATION_TEXTURE_RGB
);
}
HRESULT
CDECL
wined3d_device_clear_rendertarget_view
(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
view
,
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
)
{
...
...
dlls/wined3d/wined3d.spec
View file @
62a02a04
...
...
@@ -161,6 +161,7 @@
@ cdecl wined3d_device_show_cursor(ptr long)
@ cdecl wined3d_device_uninit_3d(ptr)
@ cdecl wined3d_device_uninit_gdi(ptr)
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long)
@ cdecl wined3d_device_update_surface(ptr ptr ptr ptr ptr)
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
...
...
include/wine/wined3d.h
View file @
62a02a04
...
...
@@ -2329,6 +2329,9 @@ void __cdecl wined3d_device_setup_fullscreen_window(struct wined3d_device *devic
BOOL
__cdecl
wined3d_device_show_cursor
(
struct
wined3d_device
*
device
,
BOOL
show
);
HRESULT
__cdecl
wined3d_device_uninit_3d
(
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_uninit_gdi
(
struct
wined3d_device
*
device
);
void
__cdecl
wined3d_device_update_sub_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_box
*
box
,
const
void
*
data
,
unsigned
int
row_pitch
,
unsigned
int
depth_pitch
);
HRESULT
__cdecl
wined3d_device_update_surface
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
POINT
*
dst_point
);
HRESULT
__cdecl
wined3d_device_update_texture
(
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