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
79a014a5
Commit
79a014a5
authored
Apr 20, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_get_gl_buffer().
parent
7b47dabd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
21 deletions
+20
-21
context.c
dlls/wined3d/context.c
+3
-3
device.c
dlls/wined3d/device.c
+4
-4
surface.c
dlls/wined3d/surface.c
+12
-13
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
79a014a5
...
...
@@ -1874,11 +1874,11 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
static
void
context_apply_draw_buffer
(
struct
wined3d_context
*
context
,
BOOL
blit
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
IWineD3DSurface
*
rt
=
context
->
current_rt
;
IWineD3DSurface
Impl
*
rt
=
(
IWineD3DSurfaceImpl
*
)
context
->
current_rt
;
IWineD3DDeviceImpl
*
device
;
device
=
((
IWineD3DSurfaceImpl
*
)
rt
)
->
resource
.
device
;
if
(
!
surface_is_offscreen
(
(
IWineD3DSurfaceImpl
*
)
rt
))
device
=
rt
->
resource
.
device
;
if
(
!
surface_is_offscreen
(
rt
))
{
ENTER_GL
();
glDrawBuffer
(
surface_get_gl_buffer
(
rt
));
...
...
dlls/wined3d/device.c
View file @
79a014a5
...
...
@@ -4403,7 +4403,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
);
context_set_draw_buffer
(
context
,
surface_get_gl_buffer
(
(
IWineD3DSurface
*
)
target
));
context_set_draw_buffer
(
context
,
surface_get_gl_buffer
(
target
));
LEAVE_GL
();
}
else
...
...
@@ -5465,7 +5465,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
context
=
context_acquire
(
This
,
surface
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
);
context_set_draw_buffer
(
context
,
surface_get_gl_buffer
(
surface
));
context_set_draw_buffer
(
context
,
surface_get_gl_buffer
(
(
IWineD3DSurfaceImpl
*
)
surface
));
}
else
{
...
...
@@ -5773,7 +5773,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
if
(
!
surface_is_offscreen
((
IWineD3DSurfaceImpl
*
)
src_surface
))
{
GLenum
buffer
=
surface_get_gl_buffer
(
src_surface
);
GLenum
buffer
=
surface_get_gl_buffer
(
(
IWineD3DSurfaceImpl
*
)
src_surface
);
TRACE
(
"Source surface %p is onscreen
\n
"
,
src_surface
);
...
...
@@ -5809,7 +5809,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
/* Attach dst surface to dst fbo */
if
(
!
surface_is_offscreen
((
IWineD3DSurfaceImpl
*
)
dst_surface
))
{
GLenum
buffer
=
surface_get_gl_buffer
(
dst_surface
);
GLenum
buffer
=
surface_get_gl_buffer
(
(
IWineD3DSurfaceImpl
*
)
dst_surface
);
TRACE
(
"Destination surface %p is onscreen
\n
"
,
dst_surface
);
...
...
dlls/wined3d/surface.c
View file @
79a014a5
...
...
@@ -925,20 +925,19 @@ void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, unsigned
checkGLcall
(
"set_compatible_renderbuffer"
);
}
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
i
face
)
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
Impl
*
sur
face
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DSwapChainImpl
*
swapchain
=
(
IWineD3DSwapChainImpl
*
)
This
->
container
;
IWineD3DSwapChainImpl
*
swapchain
=
(
IWineD3DSwapChainImpl
*
)
surface
->
container
;
TRACE
(
"
iface %p.
\n
"
,
i
face
);
TRACE
(
"
surface %p.
\n
"
,
sur
face
);
if
(
!
(
This
->
Flags
&
SFLAG_SWAPCHAIN
))
if
(
!
(
surface
->
Flags
&
SFLAG_SWAPCHAIN
))
{
ERR
(
"Surface %p is not on a swapchain.
\n
"
,
i
face
);
ERR
(
"Surface %p is not on a swapchain.
\n
"
,
sur
face
);
return
GL_NONE
;
}
if
(
swapchain
->
backBuffer
&&
swapchain
->
backBuffer
[
0
]
==
i
face
)
if
(
swapchain
->
backBuffer
&&
(
IWineD3DSurfaceImpl
*
)
swapchain
->
backBuffer
[
0
]
==
sur
face
)
{
if
(
swapchain
->
render_to_fbo
)
{
...
...
@@ -948,7 +947,7 @@ GLenum surface_get_gl_buffer(IWineD3DSurface *iface)
TRACE
(
"Returning GL_BACK
\n
"
);
return
GL_BACK
;
}
else
if
(
swapchain
->
frontBuffer
==
i
face
)
else
if
(
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
==
sur
face
)
{
TRACE
(
"Returning GL_FRONT
\n
"
);
return
GL_FRONT
;
...
...
@@ -1294,7 +1293,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v
else
{
/* Onscreen surfaces are always part of a swapchain */
GLenum
buffer
=
surface_get_gl_buffer
(
(
IWineD3DSurface
*
)
This
);
GLenum
buffer
=
surface_get_gl_buffer
(
This
);
TRACE
(
"Locking %#x buffer
\n
"
,
buffer
);
glReadBuffer
(
buffer
);
checkGLcall
(
"glReadBuffer"
);
...
...
@@ -1516,7 +1515,7 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
*/
if
(
!
surface_is_offscreen
(
This
))
{
GLenum
buffer
=
surface_get_gl_buffer
(
(
IWineD3DSurface
*
)
This
);
GLenum
buffer
=
surface_get_gl_buffer
(
This
);
TRACE
(
"Locking %#x buffer
\n
"
,
buffer
);
ENTER_GL
();
...
...
@@ -1775,7 +1774,7 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm
if
(
!
surface_is_offscreen
(
This
))
{
GLenum
buffer
=
surface_get_gl_buffer
(
(
IWineD3DSurface
*
)
This
);
GLenum
buffer
=
surface_get_gl_buffer
(
This
);
TRACE
(
"Unlocking %#x buffer.
\n
"
,
buffer
);
context_set_draw_buffer
(
context
,
buffer
);
}
...
...
@@ -2999,7 +2998,7 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
}
else
{
glReadBuffer
(
surface_get_gl_buffer
(
Src
Surface
));
glReadBuffer
(
surface_get_gl_buffer
(
Src
));
}
checkGLcall
(
"glReadBuffer"
);
...
...
@@ -3154,7 +3153,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
}
else
{
glReadBuffer
(
surface_get_gl_buffer
(
Src
Surface
));
glReadBuffer
(
surface_get_gl_buffer
(
Src
));
}
/* TODO: Only back up the part that will be overwritten */
...
...
dlls/wined3d/wined3d_private.h
View file @
79a014a5
...
...
@@ -2679,7 +2679,7 @@ void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
surface_add_dirty_rect
(
IWineD3DSurface
*
iface
,
const
RECT
*
dirty_rect
)
DECLSPEC_HIDDEN
;
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
i
face
)
DECLSPEC_HIDDEN
;
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
Impl
*
sur
face
)
DECLSPEC_HIDDEN
;
void
surface_load_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_modify_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
location
)
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