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
74851738
Commit
74851738
authored
Jul 17, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the context instead of the device to the various context functions.
parent
a01616a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
context.c
dlls/wined3d/context.c
+0
-0
device.c
dlls/wined3d/device.c
+11
-11
surface.c
dlls/wined3d/surface.c
+3
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-3
No files found.
dlls/wined3d/context.c
View file @
74851738
This diff is collapsed.
Click to expand it.
dlls/wined3d/device.c
View file @
74851738
...
...
@@ -6050,9 +6050,9 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
ActivateContext
(
This
,
This
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
context_bind_fbo
(
iface
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
dst_fbo
);
context_attach_surface_fbo
(
This
,
GL_FRAMEBUFFER_EXT
,
0
,
surface
);
context_attach_depth_stencil_fbo
(
This
,
GL_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
context_bind_fbo
(
This
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
dst_fbo
);
context_attach_surface_fbo
(
This
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
0
,
surface
);
context_attach_depth_stencil_fbo
(
This
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
}
if
(
rect
)
{
...
...
@@ -6081,7 +6081,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
checkGLcall
(
"glClear"
);
if
(
This
->
activeContext
->
current_fbo
)
{
context_bind_fbo
(
iface
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
current_fbo
->
id
);
context_bind_fbo
(
This
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
current_fbo
->
id
);
}
else
{
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
checkGLcall
(
"glBindFramebuffer()"
);
...
...
@@ -6474,11 +6474,11 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
}
else
{
TRACE
(
"Source surface %p is offscreen
\n
"
,
src_surface
);
ENTER_GL
();
context_bind_fbo
(
iface
,
GL_READ_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
src_fbo
);
context_attach_surface_fbo
(
This
,
GL_READ_FRAMEBUFFER_EXT
,
0
,
src_surface
);
context_bind_fbo
(
This
->
activeContext
,
GL_READ_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
src_fbo
);
context_attach_surface_fbo
(
This
->
activeContext
,
GL_READ_FRAMEBUFFER_EXT
,
0
,
src_surface
);
glReadBuffer
(
GL_COLOR_ATTACHMENT0_EXT
);
checkGLcall
(
"glReadBuffer()"
);
context_attach_depth_stencil_fbo
(
This
,
GL_READ_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
context_attach_depth_stencil_fbo
(
This
->
activeContext
,
GL_READ_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
}
LEAVE_GL
();
...
...
@@ -6514,11 +6514,11 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
TRACE
(
"Destination surface %p is offscreen
\n
"
,
dst_surface
);
ENTER_GL
();
context_bind_fbo
(
iface
,
GL_DRAW_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
dst_fbo
);
context_attach_surface_fbo
(
This
,
GL_DRAW_FRAMEBUFFER_EXT
,
0
,
dst_surface
);
context_bind_fbo
(
This
->
activeContext
,
GL_DRAW_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
dst_fbo
);
context_attach_surface_fbo
(
This
->
activeContext
,
GL_DRAW_FRAMEBUFFER_EXT
,
0
,
dst_surface
);
glDrawBuffer
(
GL_COLOR_ATTACHMENT0_EXT
);
checkGLcall
(
"glDrawBuffer()"
);
context_attach_depth_stencil_fbo
(
This
,
GL_DRAW_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
context_attach_depth_stencil_fbo
(
This
->
activeContext
,
GL_DRAW_FRAMEBUFFER_EXT
,
NULL
,
FALSE
);
}
glDisable
(
GL_SCISSOR_TEST
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
...
...
@@ -6536,7 +6536,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
IWineD3DSurface_ModifyLocation
(
dst_surface
,
SFLAG_INDRAWABLE
,
TRUE
);
if
(
This
->
activeContext
->
current_fbo
)
{
context_bind_fbo
(
iface
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
current_fbo
->
id
);
context_bind_fbo
(
This
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
current_fbo
->
id
);
}
else
{
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
checkGLcall
(
"glBindFramebuffer()"
);
...
...
dlls/wined3d/surface.c
View file @
74851738
...
...
@@ -4439,17 +4439,17 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
device
->
depth_blt_rb_h
=
This
->
currentDesc
.
Height
;
}
context_bind_fbo
(
(
IWineD3DDevice
*
)
device
,
GL_FRAMEBUFFER_EXT
,
&
device
->
activeContext
->
dst_fbo
);
context_bind_fbo
(
device
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
&
device
->
activeContext
->
dst_fbo
);
GL_EXTCALL
(
glFramebufferRenderbufferEXT
(
GL_FRAMEBUFFER_EXT
,
GL_COLOR_ATTACHMENT0_EXT
,
GL_RENDERBUFFER_EXT
,
device
->
depth_blt_rb
));
checkGLcall
(
"glFramebufferRenderbufferEXT"
);
context_attach_depth_stencil_fbo
(
device
,
GL_FRAMEBUFFER_EXT
,
iface
,
FALSE
);
context_attach_depth_stencil_fbo
(
device
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
iface
,
FALSE
);
/* Do the actual blit */
surface_depth_blt
(
This
,
device
->
depth_blt_texture
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
,
bind_target
);
checkGLcall
(
"depth_blt"
);
if
(
device
->
activeContext
->
current_fbo
)
{
context_bind_fbo
(
(
IWineD3DDevice
*
)
device
,
GL_FRAMEBUFFER_EXT
,
&
device
->
activeContext
->
current_fbo
->
id
);
context_bind_fbo
(
device
->
activeContext
,
GL_FRAMEBUFFER_EXT
,
&
device
->
activeContext
->
current_fbo
->
id
);
}
else
{
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
checkGLcall
(
"glBindFramebuffer()"
);
...
...
dlls/wined3d/wined3d_private.h
View file @
74851738
...
...
@@ -1262,9 +1262,11 @@ WineD3DContext *getActiveContext(void);
WineD3DContext
*
CreateContext
(
IWineD3DDeviceImpl
*
This
,
IWineD3DSurfaceImpl
*
target
,
HWND
win
,
BOOL
create_pbuffer
,
const
WINED3DPRESENT_PARAMETERS
*
pPresentParms
);
void
DestroyContext
(
IWineD3DDeviceImpl
*
This
,
WineD3DContext
*
context
);
void
context_resource_released
(
IWineD3DDevice
*
iface
,
IWineD3DResource
*
resource
,
WINED3DRESOURCETYPE
type
);
void
context_bind_fbo
(
IWineD3DDevice
*
iface
,
GLenum
target
,
GLuint
*
fbo
);
void
context_attach_depth_stencil_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
);
void
context_attach_surface_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
);
void
context_bind_fbo
(
struct
WineD3DContext
*
context
,
GLenum
target
,
GLuint
*
fbo
);
void
context_attach_depth_stencil_fbo
(
struct
WineD3DContext
*
context
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
);
void
context_attach_surface_fbo
(
const
struct
WineD3DContext
*
context
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
);
void
context_set_last_device
(
IWineD3DDeviceImpl
*
device
);
void
delete_opengl_contexts
(
IWineD3DDevice
*
iface
,
IWineD3DSwapChain
*
swapchain
);
...
...
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