Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
08101957
Commit
08101957
authored
Aug 29, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass render targets to context_apply_draw_buffers().
This avoids the special handling for blits.
parent
1848ae8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
33 deletions
+23
-33
context.c
dlls/wined3d/context.c
+23
-33
No files found.
dlls/wined3d/context.c
View file @
08101957
...
...
@@ -1961,17 +1961,12 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
}
/* Context activation is done by the caller. */
static
void
context_apply_draw_buffer
(
struct
wined3d_context
*
context
,
BOOL
blit
)
static
void
context_apply_draw_buffer
s
(
struct
wined3d_context
*
context
,
UINT
rt_count
,
IWineD3DSurfaceImpl
**
rts
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
IWineD3DSurfaceImpl
*
rt
=
context
->
current_rt
;
IWineD3DDeviceImpl
*
device
;
device
=
rt
->
resource
.
device
;
if
(
!
surface_is_offscreen
(
rt
))
if
(
!
surface_is_offscreen
(
rts
[
0
]))
{
ENTER_GL
();
glDrawBuffer
(
surface_get_gl_buffer
(
rt
));
glDrawBuffer
(
surface_get_gl_buffer
(
rt
s
[
0
]
));
checkGLcall
(
"glDrawBuffer()"
);
LEAVE_GL
();
}
...
...
@@ -1980,36 +1975,31 @@ static void context_apply_draw_buffer(struct wined3d_context *context, BOOL blit
ENTER_GL
();
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
if
(
!
blit
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
gl_info
->
limits
.
buffers
;
++
i
)
{
if
(
device
->
render_targets
[
i
])
context
->
draw_buffers
[
i
]
=
GL_COLOR_ATTACHMENT0
+
i
;
else
context
->
draw_buffers
[
i
]
=
GL_NONE
;
}
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
unsigned
int
i
;
if
(
gl_info
->
supported
[
ARB_DRAW_BUFFERS
])
{
GL_EXTCALL
(
glDrawBuffersARB
(
gl_info
->
limits
.
buffers
,
context
->
draw_buffers
));
checkGLcall
(
"glDrawBuffers()"
);
}
for
(
i
=
0
;
i
<
gl_info
->
limits
.
buffers
;
++
i
)
{
if
(
i
<
rt_count
&&
rts
[
i
])
context
->
draw_buffers
[
i
]
=
GL_COLOR_ATTACHMENT0
+
i
;
else
{
glDrawBuffer
(
context
->
draw_buffers
[
0
]);
checkGLcall
(
"glDrawBuffer()"
);
}
}
else
{
glDrawBuffer
(
GL_COLOR_ATTACHMENT0
);
context
->
draw_buffers
[
i
]
=
GL_NONE
;
}
if
(
gl_info
->
supported
[
ARB_DRAW_BUFFERS
])
{
GL_EXTCALL
(
glDrawBuffersARB
(
gl_info
->
limits
.
buffers
,
context
->
draw_buffers
));
checkGLcall
(
"glDrawBuffers()"
);
}
else
{
glDrawBuffer
(
context
->
draw_buffers
[
0
]);
checkGLcall
(
"glDrawBuffer()"
);
}
}
else
{
glDrawBuffer
(
device
->
offscreenBuffer
);
glDrawBuffer
(
rts
[
0
]
->
resource
.
device
->
offscreenBuffer
);
checkGLcall
(
"glDrawBuffer()"
);
}
LEAVE_GL
();
...
...
@@ -2122,7 +2112,7 @@ void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImp
if
(
context
->
draw_buffer_dirty
)
{
context_apply_draw_buffer
(
context
,
TRUE
);
context_apply_draw_buffer
s
(
context
,
1
,
&
context
->
current_rt
);
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
context
->
draw_buffer_dirty
=
FALSE
;
}
...
...
@@ -2252,7 +2242,7 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
if
(
context
->
draw_buffer_dirty
)
{
context_apply_draw_buffer
(
context
,
FALSE
);
context_apply_draw_buffer
s
(
context
,
context
->
gl_info
->
limits
.
buffers
,
device
->
render_targets
);
context
->
draw_buffer_dirty
=
FALSE
;
}
...
...
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