Commit Graph

880 Commits

Author SHA1 Message Date
Alexandre Julliard 6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +02:00
Henri Verbeet 231e2c60b5 wined3d: The container is always non-NULL if GetContainer() succeeds. 2008-10-16 12:35:34 +02:00
Henri Verbeet 2889b42a3f wined3d: Cleanup properly if creating the context array fails in CreateAdditionalSwapChain(). 2008-10-15 15:21:41 +02:00
Henri Verbeet 2bb7aa7252 wined3d: Don't crash in CreateAdditionalSwapChain() if the context array wasn't allocated yet. 2008-10-15 15:21:35 +02:00
Henri Verbeet 3b2ac77e12 wined3d: Set the correct pow2Matrix for cube textures when NPOT textures are supported. 2008-10-09 12:14:08 +02:00
Henri Verbeet 8985b7a755 wined3d: Get rid of some redundant assignments (LLVM/Clang). 2008-10-09 12:14:01 +02:00
Henri Verbeet e9daf92ae6 wined3d: Assign the correct "levels" variable (LLVM/Clang). 2008-10-09 12:13:43 +02:00
Kjell Rune Skaaraas ed96dd72e3 wined3d: Implement IWineD3DResourceImpl_GetPriority and IWineD3DResourceImpl_SetPriority for resource management. 2008-10-08 14:17:03 +02:00
Henri Verbeet 31d6dbfd74 wined3d: Cleanup CreateAdditionalSwapChain error handling a bit (LLVM/Clang). 2008-10-08 12:16:54 +02:00
Henri Verbeet c5fbf98ed2 wined3d: Enable lights on the correct swapchain. 2008-10-06 13:06:44 +02:00
Henri Verbeet c6cd7a7717 wined3d: Properly handle the offset for compressed surfaces in IWineD3DDeviceImpl_UpdateSurface(). 2008-09-25 11:52:56 +02:00
Henri Verbeet 0ee57cf142 wined3d: Set the texture name at surface creation.
This prevents the target from changing during the first PreLoad() call
on a surface, which would be inconvenient when attaching a surface to
a FBO for example.
2008-09-25 11:52:50 +02:00
Henri Verbeet 9d192c6251 wined3d: Skip copying the depth stencil if it's discarded.
This gives a small performance improvement for applications that are
smart enough to set the D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL flag, or
to create depth stencils with Discard set to TRUE.
2008-09-23 12:25:18 +02:00
Henri Verbeet d95ae08ad4 wined3d: Get rid of the wantsDepthStencilBuffer in IWineD3DSwapChainImpl. 2008-09-23 12:25:04 +02:00
Roderick Colenbrander 0362ee3d16 wined3d: UpdateSurface should take into account the offset from the source rectangle. 2008-09-22 13:19:57 +02:00
Henri Verbeet 3862347bce wined3d: Fix a memory leak. 2008-09-22 12:20:28 +02:00
Henri Verbeet 76de76e508 wined3d: Destroy FBO entries in the context. 2008-09-22 12:20:24 +02:00
Henri Verbeet 45820046e8 wined3d: Create a FBO for each combination of render targets and depth stencil.
The main reason for this change is crappy performance for reconfiguring FBOs.
2008-09-19 11:30:00 +02:00
Henri Verbeet a269236649 wined3d: Move FBO handling functions to context.c. 2008-09-19 11:29:13 +02:00
Henri Verbeet 99981f2604 wined3d: Remove some assumptions that PreLoad() will always bind the texture. 2008-09-17 20:49:38 +02:00
Henri Verbeet d51ea01159 wined3d: Reset the auto depth stencil. 2008-09-10 12:05:31 +02:00
Francois Gouget e1797b530d wined3d: Remove spaces before '\n' in Wine traces. 2008-09-05 13:39:08 +02:00
Stefan Dösinger da1030f36c wined3d: Compressed surface sizes are multiples of 4.
Since those surfaces are stored in blocks, the 4 pixel step doesn't only apply to surfaces < 4, but
also to surfaces bigger than that, with a non-multiple-of-4 size.
2008-09-04 12:44:00 +02:00
Alexander Dorofeyev 78312704d9 wined3d: Remove obsolete code & ModifyLocation TODO.
This fbo logic appears to have already been implemented in ModifyLocation.
2008-09-04 12:29:57 +02:00
Henri Verbeet 615f75faec wined3d: IWineD3DSurface_PreLoad() doesn't do an implicit glBindTexture() anymore.
This was exposed by moving texture id generation from Preload() to BindTexture().
2008-09-04 11:15:33 +02:00
Henri Verbeet 4b6887b8e3 wined3d: Be more careful when deleting FBOs.
Clear all attachments before deleting FBOs. It should be valid to
delete FBOs that still have attachments, but for some reason the
nvidia drivers don't like it. The resulting memory corruption can be
pretty nasty, and this workaround seems clean enough.
2008-09-04 11:14:53 +02:00
Alexander Dorofeyev 379f400990 wined3d: Add glFlush when clearing the front buffer in ClearSurface. 2008-09-03 13:14:52 +02:00
Stefan Dösinger 8b1727ae62 wined3d: Report incorrect filtering settings in ValidateDevice. 2008-09-02 14:56:06 +02:00
Stefan Dösinger 3b48660f43 wined3d: Implement YV12 support for emulated overlays.
This is the prefered format of many codecs, and for some codecs this
is the only supported output format. As usual I try to handle all the
conversion in the GPU and keep the CPU involvement minimal to gain the
full performance of PBO transfers.
2008-09-02 14:55:50 +02:00
Stefan Dösinger a580325a47 wined3d: Remove some more junk code. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 462ddaa254 wined3d: Make the texture stage mapping nvrc independent. 2008-08-27 13:21:24 +02:00
Stefan Dösinger a674ae71ae wined3d: Remove dead code. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 9a6bc683e1 wined3d: Use the correct texture limit.
We have to use the texture limit of the fragment pipeline in use here,
not the fixed function GL texture limit.
2008-08-26 12:07:41 +02:00
Stefan Dösinger e8b9f167d6 wined3d: Fix the texcoord size mask.
There is room for 8 texture coordinates, not just 4.
2008-08-26 12:07:41 +02:00
David Adam bb67a925d6 ddraw: Only ddraw checks wether one can give a null pointer to SetMaterial. 2008-08-22 11:32:09 +02:00
Roderick Colenbrander fd0e60180a wined3d: Fix window rewrite regression. 2008-08-22 10:39:23 +02:00
H. Verbeet 05931f4a5a wined3d: Track FBOs per-context.
Although sharing FBOs across contexts is allowed by EXT_framebuffer_object
(issue 76), it causes issues with nVidia drivers. Considering the GL 3 spec
explicitly disallows sharing of FBOs accross contexts (Appendix D), this
patch is probably the right thing to do.
2008-08-22 10:38:59 +02:00
H. Verbeet 040c33de5a wined3d: Don't allocate This->draw_buffers in the error path for Init3D(). 2008-08-21 11:36:29 +02:00
H. Verbeet c33e03cca3 wined3d: Don't free backends if they're not created yet.
This would crash if CreateAdditionalSwapChain() failed.
2008-08-21 11:36:18 +02:00
Stefan Dösinger fc6b977486 wined3d: Start a framework for color conversion shaders in blits. 2008-08-20 12:25:26 +02:00
Stefan Dösinger 25c07dc86c wined3d: Remove the ddraw_window device member. 2008-08-19 12:25:05 +02:00
Stefan Dösinger 376944ebe4 wined3d: Remove the device-global fullscreen flag. 2008-08-19 12:24:57 +02:00
Stefan Dösinger 34b37fe241 d3d: Remove IWineD3DDevice::SetHwnd. 2008-08-19 12:22:05 +02:00
Stefan Dösinger 7f2b8f9bba wined3d: Support redirecting the primary context. 2008-08-19 12:21:49 +02:00
Stefan Dösinger e178ddd9e1 wined3d: Use a swapchain for GDI surfaces.
This is a long-needed cleanup aimed at removing the ddraw_primary,
ddraw_window, ddraw_width and ddraw_height members from
IWineD3DDeviceImpl, which just do not belong there.  Destination
window and screen handling is supposed to be done by swapchains.
2008-08-19 12:21:32 +02:00
Stefan Dösinger dff3a42233 wined3d: Track overlay surfaces in the overlayed surface. 2008-08-05 14:09:37 +02:00
Stefan Dösinger 44d419ad8e wined3d: Call glFlush outside the GL lock. 2008-08-05 14:09:36 +02:00
H. Verbeet 2d6d879562 wined3d: Handle CTXUSAGE_BLIT with offscreen targets and FBO ORM.
This is mostly for correctness, in practice we should always be able
to avoid using CTXUSAGE_BLIT for offscreen targets when FBO ORM is
used.
2008-08-05 14:09:34 +02:00
H. Verbeet b685b84e66 wined3d: Apply FBO state in ActivateContext().
Fixes some GL errors due to calling glDrawBuffer(GL_BACK) when an FBO
is still active.
2008-08-05 14:09:34 +02:00
H. Verbeet 9a9414dfe2 wined3d: Mark STATE_SCISSORRECT dirty in color_fill_fbo().
As pointed out by Alexander Dorofeyev.
2008-08-05 14:09:34 +02:00