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
36b38b8a
Commit
36b38b8a
authored
Feb 03, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a debug function for struct wined3d_box.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
46317e0c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
24 deletions
+27
-24
device.c
dlls/wined3d/device.c
+6
-9
resource.c
dlls/wined3d/resource.c
+2
-2
surface.c
dlls/wined3d/surface.c
+4
-4
texture.c
dlls/wined3d/texture.c
+1
-1
utils.c
dlls/wined3d/utils.c
+9
-0
volume.c
dlls/wined3d/volume.c
+4
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
36b38b8a
...
...
@@ -3965,9 +3965,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
HRESULT
hr
;
TRACE
(
"device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
"src_resource %p, src_sub_resource_idx %u, src_box %
p
.
\n
"
,
"src_resource %p, src_sub_resource_idx %u, src_box %
s
.
\n
"
,
device
,
dst_resource
,
dst_sub_resource_idx
,
dst_x
,
dst_y
,
dst_z
,
src_resource
,
src_sub_resource_idx
,
src_box
);
src_resource
,
src_sub_resource_idx
,
debug_box
(
src_box
)
);
if
(
src_resource
==
dst_resource
&&
src_sub_resource_idx
==
dst_sub_resource_idx
)
{
...
...
@@ -4017,9 +4017,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
{
if
(
src_box
->
front
>=
src_box
->
back
)
{
WARN
(
"Invalid box (%u, %u, %u)->(%u, %u, %u) specified.
\n
"
,
src_box
->
left
,
src_box
->
top
,
src_box
->
front
,
src_box
->
right
,
src_box
->
bottom
,
src_box
->
back
);
WARN
(
"Invalid box %s specified.
\n
"
,
debug_box
(
src_box
));
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -4060,8 +4058,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
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
);
TRACE
(
"device %p, resource %p, sub_resource_idx %u, box %
s
, data %p, row_pitch %u, depth_pitch %u.
\n
"
,
device
,
resource
,
sub_resource_idx
,
debug_box
(
box
)
,
data
,
row_pitch
,
depth_pitch
);
if
(
resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
...
...
@@ -4102,8 +4100,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
||
box
->
top
>=
box
->
bottom
||
box
->
bottom
>
sub_resource
->
height
||
box
->
front
>=
box
->
back
)
{
WARN
(
"Invalid box (%u, %u, %u)->(%u, %u, %u) specified.
\n
"
,
box
->
left
,
box
->
top
,
box
->
front
,
box
->
right
,
box
->
bottom
,
box
->
back
);
WARN
(
"Invalid box %s specified.
\n
"
,
debug_box
(
box
));
return
;
}
...
...
dlls/wined3d/resource.c
View file @
36b38b8a
...
...
@@ -308,8 +308,8 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st
HRESULT
CDECL
wined3d_resource_map
(
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
struct
wined3d_map_desc
*
map_desc
,
const
struct
wined3d_box
*
box
,
DWORD
flags
)
{
TRACE
(
"resource %p, sub_resource_idx %u, map_desc %p, box %
p
, flags %#x.
\n
"
,
resource
,
sub_resource_idx
,
map_desc
,
box
,
flags
);
TRACE
(
"resource %p, sub_resource_idx %u, map_desc %p, box %
s
, flags %#x.
\n
"
,
resource
,
sub_resource_idx
,
map_desc
,
debug_box
(
box
)
,
flags
);
return
resource
->
resource_ops
->
resource_sub_resource_map
(
resource
,
sub_resource_idx
,
map_desc
,
box
,
flags
);
}
...
...
dlls/wined3d/surface.c
View file @
36b38b8a
...
...
@@ -2460,8 +2460,8 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
const
struct
wined3d_gl_info
*
gl_info
;
BYTE
*
base_memory
;
TRACE
(
"surface %p, map_desc %p, box %
p
, flags %#x.
\n
"
,
surface
,
map_desc
,
box
,
flags
);
TRACE
(
"surface %p, map_desc %p, box %
s
, flags %#x.
\n
"
,
surface
,
map_desc
,
debug_box
(
box
)
,
flags
);
if
(
surface
->
resource
.
map_count
)
{
...
...
@@ -2472,8 +2472,8 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
if
((
fmt_flags
&
WINED3DFMT_FLAG_BLOCKS
)
&&
box
&&
!
surface_check_block_align
(
surface
,
box
))
{
WARN
(
"Map
rect %p
is misaligned for %ux%u blocks.
\n
"
,
box
,
format
->
block_width
,
format
->
block_height
);
WARN
(
"Map
box %s
is misaligned for %ux%u blocks.
\n
"
,
debug_box
(
box
)
,
format
->
block_width
,
format
->
block_height
);
if
(
surface
->
resource
.
pool
==
WINED3D_POOL_DEFAULT
)
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/texture.c
View file @
36b38b8a
...
...
@@ -712,7 +712,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
{
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"texture %p, layer %u, dirty_region %
p.
\n
"
,
texture
,
layer
,
dirty_region
);
TRACE
(
"texture %p, layer %u, dirty_region %
s.
\n
"
,
texture
,
layer
,
debug_box
(
dirty_region
)
);
if
(
!
(
sub_resource
=
wined3d_texture_get_sub_resource
(
texture
,
layer
*
texture
->
level_count
)))
{
...
...
dlls/wined3d/utils.c
View file @
36b38b8a
...
...
@@ -2958,6 +2958,15 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali
/*****************************************************************************
* Trace formatting of useful values
*/
const
char
*
debug_box
(
const
struct
wined3d_box
*
box
)
{
if
(
!
box
)
return
"(null)"
;
return
wine_dbg_sprintf
(
"(%u, %u, %u)-(%u, %u, %u)"
,
box
->
left
,
box
->
top
,
box
->
front
,
box
->
right
,
box
->
bottom
,
box
->
back
);
}
const
char
*
debug_d3dformat
(
enum
wined3d_format_id
format_id
)
{
switch
(
format_id
)
...
...
dlls/wined3d/volume.c
View file @
36b38b8a
...
...
@@ -517,8 +517,8 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
const
struct
wined3d_format
*
format
=
volume
->
resource
.
format
;
const
unsigned
int
fmt_flags
=
volume
->
container
->
resource
.
format_flags
;
TRACE
(
"volume %p, map_desc %p, box %
p
, flags %#x.
\n
"
,
volume
,
map_desc
,
box
,
flags
);
TRACE
(
"volume %p, map_desc %p, box %
s
, flags %#x.
\n
"
,
volume
,
map_desc
,
debug_box
(
box
)
,
flags
);
map_desc
->
data
=
NULL
;
if
(
!
(
volume
->
resource
.
access_flags
&
WINED3D_RESOURCE_ACCESS_CPU
))
...
...
@@ -538,8 +538,8 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
}
if
((
fmt_flags
&
WINED3DFMT_FLAG_BLOCKS
)
&&
!
volume_check_block_align
(
volume
,
box
))
{
WARN
(
"Map box is misaligned for %ux%u blocks.
\n
"
,
format
->
block_width
,
format
->
block_height
);
WARN
(
"Map box
%s
is misaligned for %ux%u blocks.
\n
"
,
debug_box
(
box
),
format
->
block_width
,
format
->
block_height
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -612,14 +612,10 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
if
(
!
box
)
{
TRACE
(
"No box supplied - all is ok
\n
"
);
map_desc
->
data
=
base_memory
;
}
else
{
TRACE
(
"Lock Box (%p) = l %u, t %u, r %u, b %u, fr %u, ba %u
\n
"
,
box
,
box
->
left
,
box
->
top
,
box
->
right
,
box
->
bottom
,
box
->
front
,
box
->
back
);
if
((
fmt_flags
&
(
WINED3DFMT_FLAG_BLOCKS
|
WINED3DFMT_FLAG_BROKEN_PITCH
))
==
WINED3DFMT_FLAG_BLOCKS
)
{
/* Compressed textures are block based, so calculate the offset of
...
...
dlls/wined3d/wined3d_private.h
View file @
36b38b8a
...
...
@@ -2936,6 +2936,7 @@ void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPE
*/
/* Trace routines */
const
char
*
debug_box
(
const
struct
wined3d_box
*
box
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dshaderinstructionhandler
(
enum
WINED3D_SHADER_INSTRUCTION_HANDLER
handler_idx
)
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
;
...
...
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