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
ecc67757
Commit
ecc67757
authored
Aug 29, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce surface_color_fill().
This is also a first attempt at a more structured interface to blitter operations.
parent
9363ea55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
15 deletions
+45
-15
surface.c
dlls/wined3d/surface.c
+17
-15
utils.c
dlls/wined3d/utils.c
+23
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-0
No files found.
dlls/wined3d/surface.c
View file @
ecc67757
...
...
@@ -3354,6 +3354,22 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT
context_release
(
context
);
}
static
HRESULT
surface_color_fill
(
IWineD3DSurfaceImpl
*
s
,
const
RECT
*
rect
,
const
WINED3DCOLORVALUE
*
color
)
{
IWineD3DDeviceImpl
*
device
=
s
->
resource
.
device
;
const
struct
blit_shader
*
blitter
;
blitter
=
wined3d_select_blitter
(
&
device
->
adapter
->
gl_info
,
BLIT_OP_COLOR_FILL
,
NULL
,
0
,
0
,
NULL
,
rect
,
s
->
resource
.
usage
,
s
->
resource
.
pool
,
s
->
resource
.
format_desc
);
if
(
!
blitter
)
{
FIXME
(
"No blitter is capable of performing the requested color fill operation.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
return
blitter
->
color_fill
(
device
,
s
,
rect
,
color
);
}
/* Not called from the VTable */
static
HRESULT
IWineD3DSurfaceImpl_BltOverride
(
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
DestRect
,
IWineD3DSurfaceImpl
*
src_surface
,
const
RECT
*
SrcRect
,
DWORD
Flags
,
const
WINEDDBLTFX
*
DDBltFx
,
...
...
@@ -3737,21 +3753,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
if
(
!
surface_convert_color_to_float
(
dst_surface
,
DDBltFx
->
u5
.
dwFillColor
,
&
color
))
return
WINED3DERR_INVALIDCALL
;
if
(
ffp_blit
.
blit_supported
(
gl_info
,
BLIT_OP_COLOR_FILL
,
NULL
,
0
,
0
,
NULL
,
&
dst_rect
,
dst_surface
->
resource
.
usage
,
dst_surface
->
resource
.
pool
,
dst_surface
->
resource
.
format_desc
))
{
return
ffp_blit
.
color_fill
(
device
,
dst_surface
,
&
dst_rect
,
&
color
);
}
else
if
(
cpu_blit
.
blit_supported
(
gl_info
,
BLIT_OP_COLOR_FILL
,
NULL
,
0
,
0
,
NULL
,
&
dst_rect
,
dst_surface
->
resource
.
usage
,
dst_surface
->
resource
.
pool
,
dst_surface
->
resource
.
format_desc
))
{
return
cpu_blit
.
color_fill
(
device
,
dst_surface
,
&
dst_rect
,
&
color
);
}
return
WINED3DERR_INVALIDCALL
;
return
surface_color_fill
(
dst_surface
,
&
dst_rect
,
&
color
);
}
}
...
...
dlls/wined3d/utils.c
View file @
ecc67757
...
...
@@ -3136,3 +3136,26 @@ void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected,
else
if
(
gl_info
->
supported
[
ATI_FRAGMENT_SHADER
])
*
ps_selected
=
SHADER_ATI
;
else
*
ps_selected
=
SHADER_NONE
;
}
const
struct
blit_shader
*
wined3d_select_blitter
(
const
struct
wined3d_gl_info
*
gl_info
,
enum
blit_operation
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format_desc
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format_desc
*
dst_format
)
{
static
const
struct
blit_shader
*
const
blitters
[]
=
{
&
arbfp_blit
,
&
ffp_blit
,
&
cpu_blit
,
};
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
blitters
)
/
sizeof
(
*
blitters
);
++
i
)
{
if
(
blitters
[
i
]
->
blit_supported
(
gl_info
,
blit_op
,
src_rect
,
src_usage
,
src_pool
,
src_format
,
dst_rect
,
dst_usage
,
dst_pool
,
dst_format
))
return
blitters
[
i
];
}
return
NULL
;
}
dlls/wined3d/wined3d_private.h
View file @
ecc67757
...
...
@@ -1151,6 +1151,11 @@ extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN;
extern
const
struct
blit_shader
arbfp_blit
DECLSPEC_HIDDEN
;
extern
const
struct
blit_shader
cpu_blit
DECLSPEC_HIDDEN
;
const
struct
blit_shader
*
wined3d_select_blitter
(
const
struct
wined3d_gl_info
*
gl_info
,
enum
blit_operation
blit_op
,
const
RECT
*
src_rect
,
DWORD
src_usage
,
WINED3DPOOL
src_pool
,
const
struct
wined3d_format_desc
*
src_format
,
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
WINED3DPOOL
dst_pool
,
const
struct
wined3d_format_desc
*
dst_format
)
DECLSPEC_HIDDEN
;
/* Temporary blit_shader helper functions */
HRESULT
arbfp_blit_surface
(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
src_surface
,
const
RECT
*
src_rect
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect_in
,
enum
blit_operation
blit_op
,
...
...
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