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
a7d3b616
Commit
a7d3b616
authored
Mar 25, 2010
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add color_fill to blit_shader.
parent
9a1fd552
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
15 deletions
+72
-15
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-0
surface.c
dlls/wined3d/surface.c
+63
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
a7d3b616
...
...
@@ -6848,12 +6848,19 @@ static BOOL arbfp_blit_color_fixup_supported(const struct wined3d_gl_info *gl_in
}
}
static
HRESULT
arbfp_blit_color_fill
(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect
,
DWORD
fill_color
)
{
FIXME
(
"Color filling not implemented by arbfp_blit
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
const
struct
blit_shader
arbfp_blit
=
{
arbfp_blit_alloc
,
arbfp_blit_free
,
arbfp_blit_set
,
arbfp_blit_unset
,
arbfp_blit_color_fixup_supported
,
arbfp_blit_color_fill
};
#undef GLINFO_LOCATION
dlls/wined3d/surface.c
View file @
a7d3b616
...
...
@@ -4183,20 +4183,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
}
else
{
/* Source-Less Blit to render target */
if
(
Flags
&
WINEDDBLT_COLORFILL
)
{
/* This is easy to handle for the D3D Device... */
DWORD
color
;
TRACE
(
"Colorfill
\n
"
);
/* This == (IWineD3DSurfaceImpl *) myDevice->render_targets[0] || dstSwapchain
must be true if we are here */
if
(
This
!=
(
IWineD3DSurfaceImpl
*
)
myDevice
->
render_targets
[
0
]
&&
!
(
This
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontBuffer
||
(
dstSwapchain
->
backBuffer
&&
This
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
backBuffer
[
0
])))
{
TRACE
(
"Surface is higher back buffer, falling back to software
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
/* The color as given in the Blt function is in the format of the frame-buffer...
* 'clear' expect it in ARGB format => we need to do some conversion :-)
*/
...
...
@@ -4206,10 +4196,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
return
WINED3DERR_INVALIDCALL
;
}
TRACE
(
"(%p) executing Render Target override, color = %x
\n
"
,
This
,
color
);
IWineD3DDeviceImpl_ClearSurface
(
myDevice
,
This
,
1
/* Number of rectangles */
,
&
rect
,
WINED3DCLEAR_TARGET
,
color
,
0
.
0
f
/* Z */
,
0
/* Stencil */
);
return
WINED3D_OK
;
/* This == (IWineD3DSurfaceImpl *) myDevice->render_targets[0] || dstSwapchain
must be true if we are here */
if
(
This
!=
(
IWineD3DSurfaceImpl
*
)
myDevice
->
render_targets
[
0
]
&&
!
(
This
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontBuffer
||
(
dstSwapchain
->
backBuffer
&&
This
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
backBuffer
[
0
])))
{
TRACE
(
"Surface is higher back buffer, falling back to software
\n
"
);
return
cpu_blit
.
color_fill
(
myDevice
,
This
,
(
RECT
*
)
&
rect
,
color
);
}
return
ffp_blit
.
color_fill
(
myDevice
,
This
,
(
RECT
*
)
&
rect
,
color
);
}
}
...
...
@@ -5245,10 +5241,62 @@ static BOOL ffp_blit_color_fixup_supported(const struct wined3d_gl_info *gl_info
return
FALSE
;
}
static
HRESULT
ffp_blit_color_fill
(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect
,
DWORD
fill_color
)
{
return
IWineD3DDeviceImpl_ClearSurface
(
device
,
dst_surface
,
1
/* Number of rectangles */
,
(
const
WINED3DRECT
*
)
dst_rect
,
WINED3DCLEAR_TARGET
,
fill_color
,
0
.
0
f
/* Z */
,
0
/* Stencil */
);
}
const
struct
blit_shader
ffp_blit
=
{
ffp_blit_alloc
,
ffp_blit_free
,
ffp_blit_set
,
ffp_blit_unset
,
ffp_blit_color_fixup_supported
ffp_blit_color_fixup_supported
,
ffp_blit_color_fill
};
static
HRESULT
cpu_blit_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;
}
/* Context activation is done by the caller. */
static
void
cpu_blit_free
(
IWineD3DDevice
*
iface
)
{
}
/* Context activation is done by the caller. */
static
HRESULT
cpu_blit_set
(
IWineD3DDevice
*
iface
,
const
struct
wined3d_format_desc
*
format_desc
,
GLenum
textype
,
UINT
width
,
UINT
height
)
{
return
WINED3D_OK
;
}
/* Context activation is done by the caller. */
static
void
cpu_blit_unset
(
IWineD3DDevice
*
iface
)
{
}
static
BOOL
cpu_blit_color_fixup_supported
(
const
struct
wined3d_gl_info
*
gl_info
,
struct
color_fixup_desc
fixup
)
{
return
FALSE
;
}
static
HRESULT
cpu_blit_color_fill
(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect
,
DWORD
fill_color
)
{
WINEDDBLTFX
BltFx
;
memset
(
&
BltFx
,
0
,
sizeof
(
BltFx
));
BltFx
.
dwSize
=
sizeof
(
BltFx
);
BltFx
.
u5
.
dwFillColor
=
color_convert_argb_to_fmt
(
fill_color
,
dst_surface
->
resource
.
format_desc
->
format
);
return
IWineD3DBaseSurfaceImpl_Blt
((
IWineD3DSurface
*
)
dst_surface
,
dst_rect
,
NULL
,
NULL
,
WINEDDBLT_COLORFILL
,
&
BltFx
,
WINED3DTEXF_POINT
);
}
const
struct
blit_shader
cpu_blit
=
{
cpu_blit_alloc
,
cpu_blit_free
,
cpu_blit_set
,
cpu_blit_unset
,
cpu_blit_color_fixup_supported
,
cpu_blit_color_fill
};
dlls/wined3d/wined3d_private.h
View file @
a7d3b616
...
...
@@ -1177,10 +1177,12 @@ struct blit_shader
GLenum
textype
,
UINT
width
,
UINT
height
);
void
(
*
unset_shader
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
color_fixup_supported
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
color_fixup_desc
fixup
);
HRESULT
(
*
color_fill
)(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect
,
DWORD
fill_color
);
};
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
;
typedef
enum
ContextUsage
{
CTXUSAGE_RESOURCELOAD
=
1
,
/* Only loads textures: No State is applied */
...
...
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