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
7427b722
Commit
7427b722
authored
Nov 22, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of surface_internal_preload().
parent
e0beab8b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
26 deletions
+12
-26
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
context.c
dlls/wined3d/context.c
+6
-4
surface.c
dlls/wined3d/surface.c
+5
-19
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7427b722
...
...
@@ -7469,7 +7469,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
src_rect
.
bottom
=
src_surface
->
resource
.
height
-
src_rect
.
bottom
;
}
else
surface_internal_preload
(
src_surface
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
src_surface
->
container
,
context
,
SRGB_RGB
);
context_apply_blit_state
(
context
,
device
);
...
...
dlls/wined3d/context.c
View file @
7427b722
...
...
@@ -2124,7 +2124,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
if
(
context
->
render_offscreen
)
{
surface_internal_preload
(
rt
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
rt
->
container
,
context
,
SRGB_RGB
);
context_apply_fbo_state_blit
(
context
,
GL_FRAMEBUFFER
,
rt
,
NULL
,
rt
->
draw_binding
);
if
(
rt
->
resource
.
format
->
id
!=
WINED3DFMT_NULL
)
...
...
@@ -2938,10 +2938,12 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
&&
old_render_offscreen
&&
context
->
current_rt
!=
target
)
{
struct
wined3d_texture
*
texture
=
context
->
current_rt
->
container
;
/* Read the back buffer of the old drawable into the destination texture. */
if
(
context
->
current_rt
->
container
->
texture_srgb
.
name
)
surface_internal_preload
(
context
->
current_rt
,
context
,
SRGB_SRGB
);
surface_internal_preload
(
context
->
current_rt
,
context
,
SRGB_RGB
);
if
(
texture
->
texture_srgb
.
name
)
wined3d_texture_load
(
texture
,
context
,
SRGB_SRGB
);
wined3d_texture_load
(
texture
,
context
,
SRGB_RGB
);
surface_invalidate_location
(
context
->
current_rt
,
SFLAG_INDRAWABLE
);
}
}
...
...
dlls/wined3d/surface.c
View file @
7427b722
...
...
@@ -2419,7 +2419,6 @@ DWORD CDECL wined3d_surface_get_priority(const struct wined3d_surface *surface)
void
CDECL
wined3d_surface_preload
(
struct
wined3d_surface
*
surface
)
{
struct
wined3d_context
*
context
;
TRACE
(
"surface %p.
\n
"
,
surface
);
if
(
!
surface
->
resource
.
device
->
d3d_initialized
)
...
...
@@ -2428,9 +2427,7 @@ void CDECL wined3d_surface_preload(struct wined3d_surface *surface)
return
;
}
context
=
context_acquire
(
surface
->
resource
.
device
,
NULL
);
surface_internal_preload
(
surface
,
context
,
SRGB_ANY
);
context_release
(
context
);
wined3d_texture_preload
(
surface
->
container
);
}
void
*
CDECL
wined3d_surface_get_parent
(
const
struct
wined3d_surface
*
surface
)
...
...
@@ -3447,17 +3444,6 @@ HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined
return
WINED3D_OK
;
}
/* Context activation is done by the caller */
void
surface_internal_preload
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
enum
WINED3DSRGB
srgb
)
{
struct
wined3d_texture
*
texture
=
surface
->
container
;
TRACE
(
"iface %p, srgb %#x.
\n
"
,
surface
,
srgb
);
wined3d_texture_load
(
texture
,
context
,
srgb
);
}
/* Read the framebuffer back into the surface */
static
void
read_from_framebuffer
(
struct
wined3d_surface
*
surface
,
void
*
dest
,
UINT
pitch
)
{
...
...
@@ -4099,7 +4085,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
context
=
context_acquire
(
device
,
src_surface
);
gl_info
=
context
->
gl_info
;
context_apply_blit_state
(
context
,
device
);
surface_internal_preload
(
dst_surface
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
dst_surface
->
container
,
context
,
SRGB_RGB
);
/* Bind the target texture */
context_bind_texture
(
context
,
dst_surface
->
container
->
target
,
dst_surface
->
container
->
texture_rgb
.
name
);
...
...
@@ -4207,14 +4193,14 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
context
=
context_acquire
(
device
,
src_surface
);
gl_info
=
context
->
gl_info
;
context_apply_blit_state
(
context
,
device
);
surface_internal_preload
(
dst_surface
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
dst_surface
->
container
,
context
,
SRGB_RGB
);
src_offscreen
=
surface_is_offscreen
(
src_surface
);
noBackBufferBackup
=
src_offscreen
&&
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
;
if
(
!
noBackBufferBackup
&&
!
src_surface
->
container
->
texture_rgb
.
name
)
{
/* Get it a description */
surface_internal_preload
(
src_surface
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
src_surface
->
container
,
context
,
SRGB_RGB
);
}
/* Try to use an aux buffer for drawing the rectangle. This way it doesn't need restoring.
...
...
@@ -4503,7 +4489,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
/* Make sure the surface is up-to-date. This should probably use
* surface_load_location() and worry about the destination surface too,
* unless we're overwriting it completely. */
surface_internal_preload
(
src_surface
,
context
,
SRGB_RGB
);
wined3d_texture_load
(
src_surface
->
container
,
context
,
SRGB_RGB
);
/* Activate the destination context, set it up for blitting */
context_apply_blit_state
(
context
,
device
);
...
...
dlls/wined3d/wined3d_private.h
View file @
7427b722
...
...
@@ -2249,8 +2249,6 @@ void surface_set_dirty(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
HRESULT
surface_color_fill
(
struct
wined3d_surface
*
s
,
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
)
DECLSPEC_HIDDEN
;
GLenum
surface_get_gl_buffer
(
const
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_internal_preload
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
enum
WINED3DSRGB
srgb
)
DECLSPEC_HIDDEN
;
void
surface_invalidate_location
(
struct
wined3d_surface
*
surface
,
DWORD
location
)
DECLSPEC_HIDDEN
;
BOOL
surface_is_offscreen
(
const
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_load
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
...
...
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