Commit Graph

899 Commits

Author SHA1 Message Date
Henri Verbeet 89139b7589 wined3d: Make shader texture format fixups more generic.
Based on a patch by Stefan Dösinger. This is more flexible, and allows
the shader backend implementation to be simpler, since it doesn't have
to know about specific formats. The next patch makes use of this.
2008-12-04 11:59:58 +01:00
Henri Verbeet b451048eb7 wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Chris Robinson 7806e4d85a wined3d: Make sure a context is set for query object generation. 2008-12-03 10:59:49 +01:00
Henri Verbeet 70968e69ac wined3d: Use a bitmask to store which bool and int constants are set.
Note that constants_set was never actually NULL for
shader_glsl_load_constantsB() and shader_glsl_load_constantsI().
2008-12-03 09:49:10 +01:00
Henri Verbeet 92b93172df wined3d: Remove some unused code. 2008-12-02 14:04:40 +01:00
Henri Verbeet 5532c990b6 wined3d: Const correctness fixes. 2008-12-02 14:04:15 +01:00
Henri Verbeet fec9820e56 wined3d: Handle a few "silent" FIXMEs more consistent with the rest of the code.
Also avoids needlessly initializing static variables.
2008-12-02 14:04:00 +01:00
Henri Verbeet c7880e8916 wined3d: Make minMipLookup_noFilter and magLookup_noFilter const.
Note that minMipLookup and magLookup aren't particularly safe to use,
they're global arrays initialized from IWineD3DImpl_FillGLCaps(). The same
goes for the other global dynamic lookup tables.
2008-11-28 12:53:57 +01:00
Henri Verbeet 449c219eb0 wined3d: Const correctness fixes for device.c. 2008-11-28 12:53:41 +01:00
Henri Verbeet f2b34c97cc wined3d: Remove some unnecessary casts in process_vertices_strided().
lpData is already a pointer to BYTE. Note that the cast for the normal
data was actually wrong.
2008-11-28 12:53:33 +01:00
Henri Verbeet b4f0b5bdd0 wined3d: Const correctness fixes. 2008-11-25 13:37:39 +01:00
Stefan Dösinger ff767f4984 wined3d: Make the shader backend call CompileShader.
A number of considerations contribute to this:

1) The shader backend knows best which shader(s) it needs. GLSL needs
both, arb only one
2) The shader backend may pass some parameters to the compilation
code(e.g. which pixel format fixup to use)
3) The structures used in (2) are different in vs and ps, so a
baseshader::Compile won't work
4) The structures in (2) are wined3d-private structures, so
having a public method in the vtable won't work(its a bad idea
anyway).
2008-11-25 13:06:23 +01:00
Francois Gouget c0e271c4de wined3d: Remove WINAPI on static functions where not needed. 2008-11-25 11:49:57 +01:00
Andrew Talbot fdba8b8593 wined3d: Sign-compare warnings fix. 2008-11-21 11:29:12 +01:00
Stefan Dösinger a8497a5545 wined3d: Fix the num blend values -> type match. 2008-11-04 11:40:37 +01:00
Henri Verbeet c52a55d724 wined3d: Fix some indentation. 2008-10-28 12:46:51 +01:00
Henri Verbeet 092b51e82a wined3d: Rename CreateAdditionalSwapChain to CreateSwapChain. 2008-10-28 12:46:46 +01:00
Roderick Colenbrander 47372928b8 wined3d: Fix recursive ENTER_GL in UpdateSurface. 2008-10-20 11:38:43 +02:00
Roderick Colenbrander d4b4810ebe wined3d: Prevent a recursive ENTER_GL before calling blitter->free_private. 2008-10-20 11:38:02 +02:00
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