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
33fafc61
Commit
33fafc61
authored
Jul 31, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of context_bind_fbo() calls outside context.c.
parent
dcc969c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
27 deletions
+17
-27
context.c
dlls/wined3d/context.c
+1
-1
surface.c
dlls/wined3d/surface.c
+14
-23
swapchain.c
dlls/wined3d/swapchain.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/context.c
View file @
33fafc61
...
...
@@ -33,7 +33,7 @@ static DWORD wined3d_context_tls_idx;
/* FBO helper functions */
/* GL locking is done by the caller */
void
context_bind_fbo
(
struct
wined3d_context
*
context
,
GLenum
target
,
GLuint
*
fbo
)
static
void
context_bind_fbo
(
struct
wined3d_context
*
context
,
GLenum
target
,
GLuint
*
fbo
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLuint
f
;
...
...
dlls/wined3d/surface.c
View file @
33fafc61
...
...
@@ -5010,6 +5010,7 @@ static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREF
struct
wined3d_context
*
context
;
RECT
src_rect
,
dst_rect
;
GLenum
gl_filter
;
GLenum
buffer
;
TRACE
(
"device %p, filter %s,
\n
"
,
device
,
debug_d3dtexturefiltertype
(
filter
));
TRACE
(
"src_surface %p, src_location %s, src_rect %s,
\n
"
,
...
...
@@ -5062,48 +5063,38 @@ static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREF
if
(
src_location
==
SFLAG_INDRAWABLE
)
{
GLenum
buffer
=
surface_get_gl_buffer
(
src_surface
);
TRACE
(
"Source surface %p is onscreen.
\n
"
,
src_surface
);
buffer
=
surface_get_gl_buffer
(
src_surface
);
surface_translate_drawable_coords
(
src_surface
,
context
->
win_handle
,
&
src_rect
);
ENTER_GL
();
context_bind_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
);
glReadBuffer
(
buffer
);
checkGLcall
(
"glReadBuffer()"
);
}
else
{
TRACE
(
"Source surface %p is offscreen.
\n
"
,
src_surface
);
ENTER_GL
();
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
src_surface
,
NULL
,
src_location
);
glReadBuffer
(
GL_COLOR_ATTACHMENT0
);
checkGLcall
(
"glReadBuffer()"
);
buffer
=
GL_COLOR_ATTACHMENT0
;
}
ENTER_GL
();
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
src_surface
,
NULL
,
src_location
);
glReadBuffer
(
buffer
);
checkGLcall
(
"glReadBuffer()"
);
context_check_fbo_status
(
context
,
GL_READ_FRAMEBUFFER
);
LEAVE_GL
();
if
(
dst_location
==
SFLAG_INDRAWABLE
)
{
GLenum
buffer
=
surface_get_gl_buffer
(
dst_surface
);
TRACE
(
"Destination surface %p is onscreen.
\n
"
,
dst_surface
);
buffer
=
surface_get_gl_buffer
(
dst_surface
);
surface_translate_drawable_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
ENTER_GL
();
context_bind_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
);
context_set_draw_buffer
(
context
,
buffer
);
}
else
{
TRACE
(
"Destination surface %p is offscreen.
\n
"
,
dst_surface
);
ENTER_GL
();
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
dst_surface
,
NULL
,
dst_location
);
context_set_draw_buffer
(
context
,
GL_COLOR_ATTACHMENT0
);
buffer
=
GL_COLOR_ATTACHMENT0
;
}
ENTER_GL
();
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
dst_surface
,
NULL
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
context_check_fbo_status
(
context
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
...
...
dlls/wined3d/swapchain.c
View file @
33fafc61
...
...
@@ -306,7 +306,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
glReadBuffer
(
GL_COLOR_ATTACHMENT0
);
context_check_fbo_status
(
context
,
GL_READ_FRAMEBUFFER
);
context_
bind_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
);
context_
apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
swapchain
->
front_buffer
,
NULL
,
SFLAG_INDRAWABLE
);
context_set_draw_buffer
(
context
,
GL_BACK
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
...
...
@@ -350,7 +350,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
gl_filter
=
GL_NEAREST
;
ENTER_GL
();
context_
bind_fbo
(
context2
,
GL_FRAMEBUFFER
,
NULL
);
context_
apply_fbo_state_blit
(
context2
,
GL_FRAMEBUFFER
,
swapchain
->
front_buffer
,
NULL
,
SFLAG_INDRAWABLE
);
/* Set up the texture. The surface is not in a wined3d_texture
* container, so there are no D3D texture settings to dirtify. */
...
...
dlls/wined3d/wined3d_private.h
View file @
33fafc61
...
...
@@ -1233,7 +1233,6 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
BOOL
context_apply_draw_state
(
struct
wined3d_context
*
context
,
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
context_apply_fbo_state_blit
(
struct
wined3d_context
*
context
,
GLenum
target
,
struct
wined3d_surface
*
render_target
,
struct
wined3d_surface
*
depth_stencil
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
context_bind_fbo
(
struct
wined3d_context
*
context
,
GLenum
target
,
GLuint
*
fbo
)
DECLSPEC_HIDDEN
;
void
context_check_fbo_status
(
const
struct
wined3d_context
*
context
,
GLenum
target
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_create
(
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_surface
*
target
,
const
struct
wined3d_format
*
ds_format
)
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