wined3d: Bind device framebuffer in ActivateContext

Allan Tong actong88 at gmail.com
Sat Dec 15 12:19:25 CST 2007


Here's my second attempt at this, this time merging FBO draw buffer
selection into ActivateContext.  Could you please review it?
Hopefully I'm going in the right direction.  The first patch moves the
call to ActivateContext before the GL calls that setup the blit.  This
is needed so the second patch doesn't break stretch_rect_fbo.

The second patch moves FBO draw buffer selection to ActivateContext.
For onscreen rendering, not much changes except binding framebuffer 0.
 For offscreen rendering, the behavior depends on the specified
context usage.  For BLIT and RESOURCE_LOAD, the target surface is
attached to dst_fbo and used as the draw buffer.  For DRAWPRIM and
CLEAR, I simply call apply_fbo_state.  This assumes that DRAWPRIM and
CLEAR will always be used with device->render_targets[0].

With these patches, the visual tests in ddraw/d3d8/d3d9 mostly succeed
with FBO offscreen rendering.  The newly added alpha blending test
still fails in ddraw, but it still does better than without the
patches.

 - Allan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-wined3d-Activate-GL-context-before-making-any-GL-ca.patch
Url: http://www.winehq.org/pipermail/wine-devel/attachments/20071215/2ab49af1/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-wined3d-Make-FBO-draw-buffer-selection-in-ActivateC.patch
Url: http://www.winehq.org/pipermail/wine-devel/attachments/20071215/2ab49af1/attachment-0001.txt 


More information about the wine-devel mailing list