Commit Graph

440 Commits

Author SHA1 Message Date
Henri Verbeet b4f0b5bdd0 wined3d: Const correctness fixes. 2008-11-25 13:37:39 +01:00
Francois Gouget c0e271c4de wined3d: Remove WINAPI on static functions where not needed. 2008-11-25 11:49:57 +01:00
Christian Costa 632d34651f wined3d: Implement CONVERT_CK_RGB24 in d3dfmt_convert_surface. 2008-11-24 14:18:41 +01:00
Henri Verbeet 29f2fefc2b wined3d: Fix the cube map coordinates in surface_blt_to_drawable().
I don't see how this can ever have worked properly.
2008-11-19 14:22:29 +01:00
Stefan Dösinger 620a423b22 wined3d: Kill the GL_ATI_envmap_bumpmap code.
GL_ATI_envmap_bumpmap provides two things: Signed V8U8 pixel formats,
and bump mapping. The extension is only supported on fglrx, and this
driver also supports GL_ARB_fragment_program.  Thus the bump mapping
code is never used on any driver out there.  Furthermore, if it is
used, it tends to crash the driver

The signed pixel format is used, as it can be used by pixel shaders or
the ARBfp replacement. However, the format is broken in fglrx, and
negative values are clamped to 0.0. This results in test
failures. WineD3D has an alternative codepath using scale+bias to
enable V8U8 using a standard signed RGB which works correctly on
fglrx.
2008-11-04 11:41:14 +01:00
Henri Verbeet d262752aea wined3d: Handle lack of NPOT support for depth blts. 2008-10-29 11:52:06 +01:00
Henri Verbeet 80818bfc8d wined3d: Support some more depth blt texture types in surface_depth_blt(). 2008-10-29 11:52:01 +01:00
Henri Verbeet 437b342424 wined3d: Pass explicit texcoords to depth blt. 2008-10-28 12:33:27 +01:00
Henri Verbeet 57401fcab2 wined3d: Pass the texture type to the shader depth blt function. 2008-10-28 12:33:18 +01:00
Henri Verbeet 4034a29f19 wined3d: Move depth_blt to surface.c. 2008-10-28 12:33:13 +01:00
Roderick Colenbrander b98a7b5082 wined3d: Fix recursive ENTER_GL in LoadLocation. 2008-10-20 11:38:19 +02:00
Roderick Colenbrander e5ed8edb89 wined3d: Fix a recursive ENTER_GL in read_from_framebuffer. 2008-10-20 11:38:11 +02:00
Roderick Colenbrander 5163a360e0 wined3d: arbfp_blit_unset should call ENTER_GL/LEAVE_GL instead of the caller. 2008-10-20 11:37:46 +02:00
Roderick Colenbrander 8a002b09c1 wined3d: arbfp_set_shader_blit should handle ENTER_GL/LEAVE_GL instead of the caller. 2008-10-20 11:37:38 +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 f5fbfe47d7 wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable(). 2008-10-16 12:35:09 +02:00
Henri Verbeet e22bda24c6 wined3d: Simplify texture target handling in surface_blt_to_drawable(). 2008-10-15 15:22:11 +02:00
Henri Verbeet c777f962a2 wined3d: We only need to enable texturing for a target if we're going to draw with it (without a shader).
Also, these enables cause problems if they're done while the context
is setup for blitting.
2008-10-15 15:22:06 +02:00
Henri Verbeet a98b19cef5 wined3d: Pass the correct RECT to LoadLocation() in LockRect(). 2008-10-10 12:27:21 +02:00
Henri Verbeet eaf2474003 wined3d: Split SetGlTextureDesc() up.
This creates a function for setting the texture name and one for
setting the texture target. The idea is that the texture target should
get set right after the surface is created, and won't change, while
generating a texture name can wait.
2008-09-25 11:52:42 +02:00
Henri Verbeet 254349fb4d wined3d: Remove the "Wine 1.0 safety path". 2008-09-24 12:53:29 +02:00
Roderick Colenbrander c13b3f6179 wined3d: Re-add a comment which got lost. 2008-09-22 12:20:42 +02:00
Stefan Dösinger 2e6717ab79 wined3d: Initialize standalone surface parameters. 2008-09-22 12:20:13 +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 53a7951230 wined3d: Clarify a comment. 2008-09-17 20:49:33 +02:00
Henri Verbeet 147ec1a1a4 wined3d: Use the internal format for renderbuffer storage.
Note that using GL_DEPTH_COMPONENT instead of eg. GL_DEPTH_COMPONENT24
will work, but will create a renderbuffer with the format of the
onscreen depth buffer.
2008-09-16 22:34:03 +02:00
Henri Verbeet 047e42da08 wined3d: Improve a TRACE. 2008-09-16 22:33:46 +02:00
Henri Verbeet 81effcf30d wined3d: Set the viewport to the texture size in depth_blt(). 2008-09-05 10:50:55 +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
Alexander Dorofeyev 1bcd6e4508 wined3d: Get rid of gl buffer variable in BltOverride.
Uses This == dstSwapchain->frontBuffer instead as suggested by Henri Verbeet.
2008-09-04 12:29:50 +02:00
Alexander Dorofeyev 7c38816819 wined3d: Remove glDrawBuffer calls in BltOverride.
Handled in ActivateContext, must be remains of pre-context management code.
2008-09-04 12:29:42 +02:00
Alexander Dorofeyev 5c7f2906ee wined3d: Make the condition to enter p8 conversion shader path more strict.
This prevents shader path from being entered for an offscreen surface
when there is p8 render target and fixes failures in ddraw visual test
(with opengl rendering and RTL_READDRAW mode) and visual glitches in
Red Alert.
2008-09-04 12:29:35 +02:00
Alexander Dorofeyev e13d0efb01 wined3d: Remove glFlush in RealizePalette.
glFlush was added to surface_blt_to_drawable some time ago, which is a
more general fix and makes this one superfluous.
2008-09-03 13:14:52 +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 6c87a66355 wined3d: Get a GL context before creating a PBO. 2008-08-25 12:24:43 +02:00
Stefan Dösinger ba58adaaf6 wined3d: Remove a few texture initializations.
This is done by LoadLocation now.
2008-08-25 12:24:33 +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
Stefan Dösinger bab367e1a0 wined3d: Update the overlay when the destination was drawn to. 2008-08-21 13:27:47 +02:00
Stefan Dösinger bfe7067973 wined3d: Ask the ffp/shader/blit implementation about format support.
If a format is not supported natively by opengl, a shader may be able
to convert it. Up to now, CheckDeviceFormat had magic knowldge which
GL extensions lead to which supported format. This patch adds
functions that allow CheckDeviceFormat to ask the actual
implementation for its capabilities.
2008-08-20 12:26:02 +02:00
Stefan Dösinger fc6b977486 wined3d: Start a framework for color conversion shaders in blits. 2008-08-20 12:25:26 +02:00
Roderick Colenbrander 4421e3ebe5 wined3d: Fix BltOverride regression. 2008-08-20 11:45:41 +02:00
H. Verbeet f71fdecdc7 wined3d: Move creating a texture id from PreLoad to BindTexture.
This is consistent with BindTexture in basetexture/texture/etc. and has the
added benefit that it makes LoadLocation work properly.
2008-08-20 10:26:19 +02:00
Stefan Dösinger 25c07dc86c wined3d: Remove the ddraw_window device member. 2008-08-19 12:25:05 +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 851dd7339e wined3d: Implement overlay flipping. 2008-08-05 14:09:36 +02:00
Stefan Dösinger fad3f9ba98 wined3d: Basic overlay emulation with opengl. 2008-08-05 14:09:36 +02:00