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
fb753159
Commit
fb753159
authored
Jun 05, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only use stretch_rect_fbo() on surfaces that are FBO attachable.
parent
786408fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
surface.c
dlls/wined3d/surface.c
+18
-3
utils.c
dlls/wined3d/utils.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/surface.c
View file @
fb753159
...
...
@@ -523,6 +523,17 @@ void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect)
}
}
static
inline
BOOL
surface_can_stretch_rect
(
IWineD3DSurfaceImpl
*
src
,
IWineD3DSurfaceImpl
*
dst
)
{
return
((
src
->
resource
.
format_desc
->
Flags
&
WINED3DFMT_FLAG_FBO_ATTACHABLE
)
||
(
src
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
))
&&
((
dst
->
resource
.
format_desc
->
Flags
&
WINED3DFMT_FLAG_FBO_ATTACHABLE
)
||
(
dst
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
))
&&
(
src
->
resource
.
format_desc
->
format
==
dst
->
resource
.
format_desc
->
format
||
(
is_identity_fixup
(
src
->
resource
.
format_desc
->
color_fixup
)
&&
is_identity_fixup
(
dst
->
resource
.
format_desc
->
color_fixup
)));
}
static
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -3408,7 +3419,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
* FBO support, so it doesn't really make sense to try and make it work with different offscreen rendering
* backends.
*/
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
GL_SUPPORT
(
EXT_FRAMEBUFFER_BLIT
))
{
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
GL_SUPPORT
(
EXT_FRAMEBUFFER_BLIT
)
&&
surface_can_stretch_rect
(
Src
,
This
))
{
stretch_rect_fbo
((
IWineD3DDevice
*
)
myDevice
,
SrcSurface
,
&
srect
,
(
IWineD3DSurface
*
)
This
,
&
rect
,
Filter
,
upsideDown
);
}
else
if
((
!
stretchx
)
||
rect
.
x2
-
rect
.
x1
>
Src
->
currentDesc
.
Width
||
...
...
@@ -3470,8 +3483,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
Src
->
palette
=
This
->
palette
;
}
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
GL_SUPPORT
(
EXT_FRAMEBUFFER_BLIT
)
&&
(
Flags
&
(
WINEDDBLT_KEYSRC
|
WINEDDBLT_KEYSRCOVERRIDE
))
==
0
)
{
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
GL_SUPPORT
(
EXT_FRAMEBUFFER_BLIT
)
&&
!
(
Flags
&
(
WINEDDBLT_KEYSRC
|
WINEDDBLT_KEYSRCOVERRIDE
))
&&
surface_can_stretch_rect
(
Src
,
This
))
{
TRACE
(
"Using stretch_rect_fbo
\n
"
);
/* The source is always a texture, but never the currently active render target, and the texture
* contents are never upside down
...
...
dlls/wined3d/utils.c
View file @
fb753159
...
...
@@ -549,6 +549,7 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info)
if
(
check_fbo_compat
(
gl_info
,
desc
->
glInternal
,
desc
->
glFormat
,
desc
->
glType
))
{
TRACE
(
"Format %s is supported as fbo target
\n
"
,
debug_d3dformat
(
desc
->
format
));
desc
->
Flags
|=
WINED3DFMT_FLAG_FBO_ATTACHABLE
;
desc
->
rtInternal
=
desc
->
glInternal
;
}
else
...
...
dlls/wined3d/wined3d_private.h
View file @
fb753159
...
...
@@ -2749,6 +2749,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth);
#define WINED3DFMT_FLAG_STENCIL 0x8
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
#define WINED3DFMT_FLAG_FOURCC 0x20
#define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x40
struct
GlPixelFormatDesc
{
...
...
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