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
95130a7d
Commit
95130a7d
authored
Apr 15, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_attach_surface_fbo().
parent
870b3cb4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
14 deletions
+13
-14
context.c
dlls/wined3d/context.c
+7
-8
device.c
dlls/wined3d/device.c
+4
-4
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
95130a7d
...
...
@@ -255,20 +255,19 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context,
/* GL locking is done by the caller */
void
context_attach_surface_fbo
(
const
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
)
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
Impl
*
surface
)
{
IWineD3DSurfaceImpl
*
surface_impl
=
(
IWineD3DSurfaceImpl
*
)
surface
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
TRACE
(
"Attach surface %p to %u
\n
"
,
surface
,
idx
);
if
(
surface
)
{
surface_prepare_texture
(
surface
_impl
,
gl_info
,
FALSE
);
context_apply_attachment_filter_states
(
surface
_impl
);
surface_prepare_texture
(
surface
,
gl_info
,
FALSE
);
context_apply_attachment_filter_states
(
surface
);
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_COLOR_ATTACHMENT0
+
idx
,
surface
_impl
->
texture_target
,
surface
_impl
->
texture_name
,
surface_impl
->
texture_level
);
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_COLOR_ATTACHMENT0
+
idx
,
surface
->
texture_target
,
surface
->
texture_name
,
surface
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
}
else
...
...
@@ -415,7 +414,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
/* Apply render targets */
for
(
i
=
0
;
i
<
gl_info
->
limits
.
buffers
;
++
i
)
{
IWineD3DSurface
*
render_target
=
device
->
render_targets
[
i
];
IWineD3DSurface
Impl
*
render_target
=
(
IWineD3DSurfaceImpl
*
)
device
->
render_targets
[
i
];
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
i
,
render_target
);
}
...
...
@@ -2011,7 +2010,7 @@ static void context_apply_state(struct wined3d_context *context, IWineD3DDeviceI
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
&
context
->
dst_fbo
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
context
->
current_rt
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
(
IWineD3DSurfaceImpl
*
)
context
->
current_rt
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
,
FALSE
);
LEAVE_GL
();
}
else
{
...
...
dlls/wined3d/device.c
View file @
95130a7d
...
...
@@ -4394,7 +4394,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
&
context
->
dst_fbo
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
(
IWineD3DSurface
*
)
target
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
target
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
,
FALSE
);
LEAVE_GL
();
}
...
...
@@ -5458,7 +5458,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
context
=
context_acquire
(
This
,
NULL
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
&
context
->
dst_fbo
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
surface
);
context_attach_surface_fbo
(
context
,
GL_FRAMEBUFFER
,
0
,
(
IWineD3DSurfaceImpl
*
)
surface
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
,
FALSE
);
}
...
...
@@ -5784,7 +5784,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
TRACE
(
"Source surface %p is offscreen
\n
"
,
src_surface
);
ENTER_GL
();
context_bind_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
&
context
->
src_fbo
);
context_attach_surface_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
0
,
src_surface
);
context_attach_surface_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
0
,
(
IWineD3DSurfaceImpl
*
)
src_surface
);
glReadBuffer
(
GL_COLOR_ATTACHMENT0
);
checkGLcall
(
"glReadBuffer()"
);
context_attach_depth_stencil_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
FALSE
);
...
...
@@ -5823,7 +5823,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
ENTER_GL
();
context_bind_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
&
context
->
dst_fbo
);
context_attach_surface_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
0
,
dst_surface
);
context_attach_surface_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
0
,
(
IWineD3DSurfaceImpl
*
)
dst_surface
);
context_set_draw_buffer
(
context
,
GL_COLOR_ATTACHMENT0
);
context_attach_depth_stencil_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
,
FALSE
);
}
...
...
dlls/wined3d/swapchain.c
View file @
95130a7d
...
...
@@ -118,7 +118,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
{
ENTER_GL
();
context_bind_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
&
context
->
src_fbo
);
context_attach_surface_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
0
,
This
->
backBuffer
[
0
]
);
context_attach_surface_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
0
,
backbuffer
);
context_attach_depth_stencil_fbo
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
FALSE
);
context_bind_fbo
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
);
...
...
dlls/wined3d/wined3d_private.h
View file @
95130a7d
...
...
@@ -1216,7 +1216,7 @@ void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fb
void
context_attach_depth_stencil_fbo
(
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
)
DECLSPEC_HIDDEN
;
void
context_attach_surface_fbo
(
const
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
)
DECLSPEC_HIDDEN
;
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
Impl
*
surface
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_create
(
IWineD3DSwapChainImpl
*
swapchain
,
IWineD3DSurfaceImpl
*
target
,
const
struct
wined3d_format_desc
*
ds_format_desc
)
DECLSPEC_HIDDEN
;
void
context_destroy
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
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