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
1ff96603
Commit
1ff96603
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: Pass a view to blit_shader.depth_fill().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed0b3462
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
23 deletions
+30
-23
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-2
surface.c
dlls/wined3d/surface.c
+27
-20
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
1ff96603
...
@@ -7929,8 +7929,8 @@ static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined
...
@@ -7929,8 +7929,8 @@ static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
static
HRESULT
arbfp_blit_depth_fill
(
struct
wined3d_device
*
device
,
static
HRESULT
arbfp_blit_depth_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
view
,
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
float
depth
)
const
RECT
*
rect
,
float
depth
)
{
{
FIXME
(
"Depth filling not implemented by arbfp_blit.
\n
"
);
FIXME
(
"Depth filling not implemented by arbfp_blit.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/surface.c
View file @
1ff96603
...
@@ -1048,19 +1048,35 @@ static BOOL surface_convert_depth_to_float(const struct wined3d_surface *surface
...
@@ -1048,19 +1048,35 @@ static BOOL surface_convert_depth_to_float(const struct wined3d_surface *surface
static
HRESULT
wined3d_surface_depth_fill
(
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
float
depth
)
static
HRESULT
wined3d_surface_depth_fill
(
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
float
depth
)
{
{
const
struct
wined3d_resource
*
resource
=
&
surface
->
container
->
resource
;
struct
wined3d_resource
*
resource
=
&
surface
->
container
->
resource
;
struct
wined3d_device
*
device
=
resource
->
device
;
struct
wined3d_device
*
device
=
resource
->
device
;
struct
wined3d_rendertarget_view_desc
view_desc
;
struct
wined3d_rendertarget_view
*
view
;
const
struct
blit_shader
*
blitter
;
const
struct
blit_shader
*
blitter
;
HRESULT
hr
;
blitter
=
wined3d_select_blitter
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
WINED3D_BLIT_OP_DEPTH_FILL
,
if
(
!
(
blitter
=
wined3d_select_blitter
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
NULL
,
0
,
0
,
NULL
,
rect
,
resource
->
usage
,
resource
->
pool
,
resource
->
format
);
WINED3D_BLIT_OP_DEPTH_FILL
,
NULL
,
0
,
0
,
NULL
,
rect
,
resource
->
usage
,
resource
->
pool
,
resource
->
format
)))
if
(
!
blitter
)
{
{
FIXME
(
"No blitter is capable of performing the requested depth fill operation.
\n
"
);
FIXME
(
"No blitter is capable of performing the requested depth fill operation.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
return
blitter
->
depth_fill
(
device
,
surface
,
rect
,
depth
);
view_desc
.
format_id
=
resource
->
format
->
id
;
view_desc
.
u
.
texture
.
level_idx
=
surface
->
texture_level
;
view_desc
.
u
.
texture
.
layer_idx
=
surface
->
texture_layer
;
view_desc
.
u
.
texture
.
layer_count
=
1
;
if
(
FAILED
(
hr
=
wined3d_rendertarget_view_create
(
&
view_desc
,
resource
,
NULL
,
&
wined3d_null_parent_ops
,
&
view
)))
{
ERR
(
"Failed to create rendertarget view, hr %#x.
\n
"
,
hr
);
return
hr
;
}
hr
=
blitter
->
depth_fill
(
device
,
view
,
rect
,
depth
);
wined3d_rendertarget_view_decref
(
view
);
return
hr
;
}
}
static
HRESULT
wined3d_surface_depth_blt
(
struct
wined3d_surface
*
src_surface
,
DWORD
src_location
,
const
RECT
*
src_rect
,
static
HRESULT
wined3d_surface_depth_blt
(
struct
wined3d_surface
*
src_surface
,
DWORD
src_location
,
const
RECT
*
src_rect
,
...
@@ -4186,22 +4202,13 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d
...
@@ -4186,22 +4202,13 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
static
HRESULT
ffp_blit_depth_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
dst_surface
,
static
HRESULT
ffp_blit_depth_fill
(
struct
wined3d_device
*
device
,
const
RECT
*
dst_
rect
,
float
depth
)
struct
wined3d_rendertarget_view
*
view
,
const
RECT
*
rect
,
float
depth
)
{
{
const
RECT
draw_rect
=
{
0
,
0
,
dst_surface
->
resource
.
width
,
dst_surface
->
resource
.
height
};
const
RECT
draw_rect
=
{
0
,
0
,
view
->
width
,
view
->
height
};
struct
wined3d_fb_state
fb
=
{
NULL
,
NULL
};
struct
wined3d_fb_state
fb
=
{
NULL
,
view
};
HRESULT
hr
;
if
(
FAILED
(
hr
=
wined3d_rendertarget_view_create_from_surface
(
dst_surface
,
NULL
,
&
wined3d_null_parent_ops
,
&
fb
.
depth_stencil
)))
{
ERR
(
"Failed to create rendertarget view, hr %#x.
\n
"
,
hr
);
return
hr
;
}
device_clear_render_targets
(
device
,
0
,
&
fb
,
1
,
dst_rect
,
&
draw_rect
,
WINED3DCLEAR_ZBUFFER
,
0
,
depth
,
0
);
device_clear_render_targets
(
device
,
0
,
&
fb
,
1
,
rect
,
&
draw_rect
,
WINED3DCLEAR_ZBUFFER
,
0
,
depth
,
0
);
wined3d_rendertarget_view_decref
(
fb
.
depth_stencil
);
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
@@ -4890,7 +4897,7 @@ static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d
...
@@ -4890,7 +4897,7 @@ static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d
}
}
static
HRESULT
cpu_blit_depth_fill
(
struct
wined3d_device
*
device
,
static
HRESULT
cpu_blit_depth_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_
surface
*
surface
,
const
RECT
*
rect
,
float
depth
)
struct
wined3d_
rendertarget_view
*
view
,
const
RECT
*
rect
,
float
depth
)
{
{
FIXME
(
"Depth filling not implemented by cpu_blit.
\n
"
);
FIXME
(
"Depth filling not implemented by cpu_blit.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/wined3d_private.h
View file @
1ff96603
...
@@ -1465,7 +1465,7 @@ struct blit_shader
...
@@ -1465,7 +1465,7 @@ struct blit_shader
HRESULT
(
*
color_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
view
,
HRESULT
(
*
color_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
view
,
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
);
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
);
HRESULT
(
*
depth_fill
)(
struct
wined3d_device
*
device
,
HRESULT
(
*
depth_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_
surface
*
surface
,
const
RECT
*
rect
,
float
depth
);
struct
wined3d_
rendertarget_view
*
view
,
const
RECT
*
rect
,
float
depth
);
void
(
*
blit_surface
)(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
void
(
*
blit_surface
)(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
...
...
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