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
ebd6bf7f
Commit
ebd6bf7f
authored
Sep 07, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove old surface flipping hacks.
They're non-functional these days anyway.
parent
2936e4ac
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
112 deletions
+5
-112
surface.c
dlls/wined3d/surface.c
+0
-77
swapchain.c
dlls/wined3d/swapchain.c
+5
-34
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/surface.c
View file @
ebd6bf7f
...
...
@@ -2881,83 +2881,6 @@ void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl
}
}
void
flip_surface
(
struct
wined3d_surface
*
front
,
struct
wined3d_surface
*
back
)
{
if
(
front
->
container
->
level_count
!=
1
||
front
->
container
->
layer_count
!=
1
||
back
->
container
->
level_count
!=
1
||
back
->
container
->
layer_count
!=
1
)
ERR
(
"Flip between surfaces %p and %p not supported.
\n
"
,
front
,
back
);
/* Flip the surface contents */
/* Flip the DC */
{
HDC
tmp
;
tmp
=
front
->
hDC
;
front
->
hDC
=
back
->
hDC
;
back
->
hDC
=
tmp
;
}
/* Flip the DIBsection */
{
HBITMAP
tmp
=
front
->
dib
.
DIBsection
;
front
->
dib
.
DIBsection
=
back
->
dib
.
DIBsection
;
back
->
dib
.
DIBsection
=
tmp
;
}
/* Flip the surface data */
{
void
*
tmp
;
tmp
=
front
->
dib
.
bitmap_data
;
front
->
dib
.
bitmap_data
=
back
->
dib
.
bitmap_data
;
back
->
dib
.
bitmap_data
=
tmp
;
tmp
=
front
->
resource
.
heap_memory
;
front
->
resource
.
heap_memory
=
back
->
resource
.
heap_memory
;
back
->
resource
.
heap_memory
=
tmp
;
}
/* Flip the PBO */
{
GLuint
tmp_pbo
=
front
->
pbo
;
front
->
pbo
=
back
->
pbo
;
back
->
pbo
=
tmp_pbo
;
}
/* Flip the opengl texture */
{
GLuint
tmp
;
tmp
=
back
->
container
->
texture_rgb
.
name
;
back
->
container
->
texture_rgb
.
name
=
front
->
container
->
texture_rgb
.
name
;
front
->
container
->
texture_rgb
.
name
=
tmp
;
tmp
=
back
->
container
->
texture_srgb
.
name
;
back
->
container
->
texture_srgb
.
name
=
front
->
container
->
texture_srgb
.
name
;
front
->
container
->
texture_srgb
.
name
=
tmp
;
tmp
=
back
->
rb_multisample
;
back
->
rb_multisample
=
front
->
rb_multisample
;
front
->
rb_multisample
=
tmp
;
tmp
=
back
->
rb_resolved
;
back
->
rb_resolved
=
front
->
rb_resolved
;
front
->
rb_resolved
=
tmp
;
resource_unload
(
&
back
->
resource
);
resource_unload
(
&
front
->
resource
);
}
{
DWORD
tmp_flags
=
back
->
flags
;
back
->
flags
=
front
->
flags
;
front
->
flags
=
tmp_flags
;
tmp_flags
=
back
->
locations
;
back
->
locations
=
front
->
locations
;
front
->
locations
=
tmp_flags
;
}
}
/* Does a direct frame buffer -> texture copy. Stretching is done with single
* pixel copy calls. */
static
void
fb_copy_to_texture_direct
(
struct
wined3d_surface
*
dst_surface
,
struct
wined3d_surface
*
src_surface
,
...
...
dlls/wined3d/swapchain.c
View file @
ebd6bf7f
...
...
@@ -555,45 +555,16 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
}
front
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
swapchain
->
front_buffer
,
0
));
if
(
!
swapchain
->
render_to_fbo
&&
((
front
->
locations
&
WINED3D_LOCATION_SYSMEM
)
||
(
back_buffer
->
locations
&
WINED3D_LOCATION_SYSMEM
)))
{
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
* Doesn't work with render_to_fbo because we're not flipping
*/
if
(
front
->
resource
.
size
==
back_buffer
->
resource
.
size
)
{
flip_surface
(
front
,
back_buffer
);
/* Tell the front buffer surface that is has been modified. However,
* the other locations were preserved during that, so keep the flags.
* This serves to update the emulated overlay, if any. */
surface_validate_location
(
front
,
WINED3D_LOCATION_DRAWABLE
);
}
else
{
surface_validate_location
(
front
,
WINED3D_LOCATION_DRAWABLE
);
surface_invalidate_location
(
front
,
~
WINED3D_LOCATION_DRAWABLE
);
surface_validate_location
(
back_buffer
,
WINED3D_LOCATION_DRAWABLE
);
surface_invalidate_location
(
back_buffer
,
~
WINED3D_LOCATION_DRAWABLE
);
}
}
else
{
surface_validate_location
(
front
,
WINED3D_LOCATION_DRAWABLE
);
surface_invalidate_location
(
front
,
~
WINED3D_LOCATION_DRAWABLE
);
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
* and INTEXTURE copies can keep their old content if they have any defined content.
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
* the texture / sysmem copy needs to be reloaded from the drawable
*/
if
(
swapchain
->
desc
.
swap_effect
==
WINED3D_SWAP_EFFECT_FLIP
)
{
surface_validate_location
(
back_buffer
,
back_buffer
->
container
->
resource
.
draw_binding
);
surface_invalidate_location
(
back_buffer
,
~
back_buffer
->
container
->
resource
.
draw_binding
);
}
}
* If the swapeffect is COPY, the content remains the same.
*
* The FLIP swap effect is not implemented yet. We could mark WINED3D_LOCATION_DRAWABLE
* up to date and hope WGL flipped front and back buffers and read this data into
* the FBO. Don't bother about this for now. */
if
(
fb
->
depth_stencil
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
ebd6bf7f
...
...
@@ -2456,7 +2456,6 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
void
draw_textured_quad
(
const
struct
wined3d_surface
*
src_surface
,
struct
wined3d_context
*
context
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
enum
wined3d_texture_filter_type
filter
)
DECLSPEC_HIDDEN
;
void
flip_surface
(
struct
wined3d_surface
*
front
,
struct
wined3d_surface
*
back
)
DECLSPEC_HIDDEN
;
/* Surface flags: */
#define SFLAG_DIBSECTION 0x00000001
/* Has a DIB section attached for GetDC. */
...
...
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