Commit Graph

379 Commits

Author SHA1 Message Date
Stefan Dösinger 6ab3d17104 wined3d: Remove a broken AddDirtyRect call. 2008-06-13 10:15:02 +02:00
H. Verbeet 35bdc00479 wined3d: Set the surface location to SFLAG_INSYSMEM for depth stencils on Reset. 2008-06-03 11:11:44 +02:00
Andrew Talbot c58e59f40f wined3d: Remove unneeded "extern" from function definition. 2008-05-22 11:29:05 +02:00
Alexander Dorofeyev a25651138a wined3d: Activate context for the right target in surface_blt_to_drawable. 2008-05-12 13:27:44 +02:00
Alexander Dorofeyev e1c60caa42 wined3d: glFlush when updating front buffer.
Fixes screen not updating or getting updated inconsistently when apps blit to 
front buffer or lock it when RenderTargetLockMode=readtex, as happens in e.g. 
Red Alert 2 and also in p8_primary_test in ddraw tests.
2008-05-12 13:27:40 +02:00
Alexander Dorofeyev b8a5742358 wined3d: Set alpha to index even when there is no palette.
Fixes a failure in p8_primary_test when running with opengl ddraw renderer.
2008-05-09 11:20:01 +02:00
Alexander Dorofeyev 6d86e7f861 wined3d: Use source colorkey when passed KEYSRC or KEYSRCOVERRIDE.
Fixes failure in p8_primary_test when using opengl ddraw renderer.
2008-05-09 11:19:39 +02:00
Andrew Talbot 0de14c37e5 wined3d: Remove unused variables. 2008-04-30 10:25:47 +02:00
Stefan Dösinger 5d49dea373 d3d9: Add a test for NP2 stretchrect. 2008-04-24 11:43:18 +02:00
Stefan Dösinger 1c9f1f8ddd wined3d: Support framebuffer reading from texture_rectangle sources. 2008-04-24 11:43:18 +02:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Alexander Dorofeyev db36665be5 wined3d: Add missing check for p8 primary in surface_download_data. 2008-04-21 14:22:35 +02:00
Roderick Colenbrander f2753d7189 wined3d: Add palette re-upload support for cards with hardware palette support.
Before it was broken and when it worked it was slow due to unneeded
gpu -> cpu -> gpu copying.
2008-04-21 13:36:19 +02:00
Stefan Dösinger a22203adeb wined3d: Make the mag filter lookup a separate array.
This makes it easier to make this a per texture / per adapter property.
Somewhen we should rename the remaining lookup type in the general
lookup table to wraplookup.
2008-04-09 11:48:30 +02:00
Stefan Dösinger 67e0943ba3 wined3d: Store the number of aux buffers in the context. 2008-04-09 11:47:24 +02:00
Stefan Dösinger 0de167db9e wined3d: Put implicit surfaces into drawable on unload.
If we mark the sysmem copy up to date we would have to take care about
allocating it. As explained in the comment, INDRAWABLE is a saner
choice
2008-04-08 11:59:28 +02:00
Alexander Dorofeyev 65f9abc88d wined3d: Move PreLoad to avoid calling it with gl lock held. 2008-04-07 21:18:47 +02:00
Alexander Dorofeyev 7f2257ca55 wined3d: Add device->isInDraw checks in LoadLocation.
Prevents calling ActivateContext while holding gl lock, e.g. when preloading 
texture in sampler().
2008-04-07 21:18:36 +02:00
Alexander Dorofeyev 29b38bc886 wined3d: Implement CONVERT_RGB32_888 conversion. 2008-04-07 21:17:15 +02:00
Roderick Colenbrander f04d870a8d wined3d: Remove a PBO when a converted surface is detected.
This can happen e.g. when suddenly color keying is activated and at
some stages we don't know if we will need conversion at PBO creation
time.
2008-04-07 12:05:54 +02:00
Roderick Colenbrander 0efefef34b wined3d: Use the render target its palette when performing a texture copy as the texture doesn't hold one. 2008-04-07 12:05:39 +02:00
Allan Tong a68637b59b wined3d: Call ActivateContext before any gl call in IWineD3DSurfaceImpl_Release. 2008-04-04 11:43:50 +02:00
Alexander Dorofeyev d6ba069d9e wined3d: Improve detection of device palette change. 2008-04-03 11:31:57 +02:00
Alexander Dorofeyev 1c89795438 wined3d: Support index in alpha in BltOverride colorfill codepath.
Fixes a failure in ddraw p8_primary_test when running with opengl ddraw renderer.
2008-04-03 11:31:43 +02:00
Alexander Dorofeyev b54553a253 wined3d: Avoid calling LoadTexture with gl lock held in IWineD3DSurfaceImpl_PreLoad.
Needed to prevent ActivateContext being called while holding gl lock.
2008-04-03 11:31:09 +02:00
Alexander Dorofeyev 1e6f02ed2b wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DSurfaceImpl_Release. 2008-04-03 11:30:55 +02:00
Alexander Dorofeyev 088c34ec1c wined3d: Add ENTER_GL/LEAVE_GL in surface_allocate_surface. 2008-04-03 11:30:47 +02:00
Alexander Dorofeyev d5b400307b wined3d: Add ENTER_GL/LEAVE_GL in surface_bind_and_dirtify. 2008-04-03 11:30:38 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Alexander Dorofeyev 9b913b3b79 wined3d: Don't use device palettes in RealizePalette. 2008-03-25 11:53:47 +01:00
Alexander Dorofeyev 13ce219235 wined3d: Don't use device palettes in GetDC. 2008-03-25 11:53:39 +01:00
Alexander Dorofeyev 85fd313046 wined3d: Don't use device palettes in read_from_framebuffer. 2008-03-25 11:53:24 +01:00
Alexander Dorofeyev 16da594354 wined3d: Fix comment. 2008-03-25 11:53:01 +01:00
Roderick Colenbrander 3771341774 wined3d: Add a missing break to blt_to_drawable. 2008-03-24 12:08:12 +01:00
Alexander Dorofeyev fc064cb04b wined3d: Use primary_render_target_is_p8 in read_from_framebuffer. 2008-03-10 12:55:02 +01:00
Alexander Dorofeyev 8f8076c3f7 wined3d: Get rid of spurious err when locking with WINED3DLOCK_DISCARD. 2008-03-10 12:54:48 +01:00
Stefan Dösinger 825506d5ff wined3d: General cross format blitting infrastrucutre, R32F->R16F blits. 2008-02-26 11:31:19 +01:00
Roderick Colenbrander 0b3d880c8e wined3d: Use the color key in glAlphaFunc in case of index_in_alpha. 2008-02-22 11:54:51 +01:00
Roderick Colenbrander 0cdccfc8b5 wined3d: Unify p8 render target detection code. 2008-02-22 11:54:40 +01:00
Roderick Colenbrander a5444cb897 wined3d: In DirectDraw a palette is a property of a surface while in d3d8/9 it is a property of a device. 2008-02-22 11:54:31 +01:00
Roderick Colenbrander 98a0786096 wined3d: Don't flush in D3D RealizePalette without a palette. 2008-02-22 11:53:45 +01:00
Roderick Colenbrander 8f18eeea35 wined3d: Let flush_to_framebuffer_drawpixels use a valid rect. 2008-02-20 12:06:46 +01:00
Roderick Colenbrander 28464f9689 wined3d: Fix lack of indent in PreLoad. 2008-02-19 13:39:25 +01:00
Roderick Colenbrander 48275308ee wined3d: Add a GL specific RealizePalette which also updates the drawable. 2008-02-19 13:39:25 +01:00
Alexander Dorofeyev 5346039d5a wined3d: Take alpha from device palette entry for d3d 8 and later.
Adds support for D3D >= 8 style palettes that contain alpha. This fixes
rendering problems in games like Commandos 3 and Madden NFL 2004.
2008-02-19 13:39:24 +01:00
Roderick Colenbrander a29584b34f wined3d: Add SURFACE_BUSY support to *_BltFast. 2008-02-18 14:19:44 +01:00
Roderick Colenbrander 5437cb01f1 wined3d: Add SURFACE_BUSY support to *_Blt. 2008-02-18 14:19:37 +01:00
Stefan Dösinger d49c9bbcbe wined3d: Do not change the texture unit when binding surfaces.
Changing the texture unit when binding a surface for loading can break
the state manager in the way that it changes the currently active
texture unit while it is setting up a texture that has to be loaded.
Instead find out the current unit to dirtify the correct sampler.
2008-02-18 13:34:13 +01:00
Roderick Colenbrander ba90a740be wined3d: Add read_from_framebuffer_texture which combines code from read_from_framebuffer (drawpixels) and LoadLocation.
This makes the code easier to read and the pieces borrowed from
read_from_framebuffer are more correct than the code in LoadLocation.
2008-02-11 19:58:58 +01:00
Roderick Colenbrander 059778446f wined3d: Upload p8 palette using GL_ALPHA instead of GL_RED. 2008-02-08 11:04:36 +01:00