Commit Graph

2127 Commits

Author SHA1 Message Date
Stefan Dösinger 107e80a79c wined3d: Implement a different constant dirtification algorithm.
Add a new property of the shader backend which indicates whether the
shader backend is able to dirtify single constants rather than
dirtifying vshader and pshader constants as a whole. Depending on this
a different Set*ConstantF implementation is used which marks constants
dirty. The ARB shader backend uses this and marks constants clean
after uploading.
2008-03-04 12:15:16 +01:00
Stefan Dösinger 5709a0b4b6 wined3d: Call fixup_extensions before destroying the fake context. 2008-03-03 20:45:48 +01:00
Francois Gouget 29ef0b90ee Assorted spelling, punctuation and case fixes. 2008-03-03 12:04:48 +01:00
Roderick Colenbrander 2e0d35aa2f wined3d: Add D32F_LOCKABLE to getDepthStencilBits. 2008-03-03 12:00:39 +01:00
Stefan Dösinger dd997c1de6 wined3d: Catch NOP palette changes. 2008-03-03 11:59:05 +01:00
Stefan Dösinger 32be503c62 wined3d: Give occlusion queries their own vtable. 2008-03-03 11:58:10 +01:00
Stefan Dösinger 071d4afb2b wined3d: Subclass queries. 2008-03-03 11:57:59 +01:00
James Hawkins c2a627c6e8 janitorial: Remove links to any microsoft site. 2008-03-01 12:17:07 +01:00
Stefan Dösinger 8c758a62e8 wined3d: Remove VBFLAG_LOAD. 2008-02-28 20:10:40 +01:00
Roderick Colenbrander 4ac1b94d96 wined3d: Improved CheckDeviceType. 2008-02-27 14:52:25 +01:00
Stefan Dösinger 7b297890a7 wined3d: Mark a vertex buffer dirty after VBO creation. 2008-02-26 11:31:53 +01:00
Stefan Dösinger 220d9eb44c wined3d: Move the dummy texture creation to the device. 2008-02-26 11:31:47 +01:00
Stefan Dösinger f912f18b13 wined3d: Move shader model private data into its own structure. 2008-02-26 11:31:39 +01:00
Stefan Dösinger 6269415793 wined3d: Add GL_APPLE_float_pixels. 2008-02-26 11:31:29 +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 f5149e651e wined3d: Check real depth/stencil capabilities based on WGL pixel formats. 2008-02-26 11:29:59 +01:00
Roderick Colenbrander e5bef99fbe wined3d: Request aux buffers when using backbuffer rendering. 2008-02-25 12:17:36 +01:00
Roderick Colenbrander 68467cf344 wined3d: Request alpha in backbuffer mode, to work correctly with multiple opengl pixel formats. 2008-02-25 12:14:36 +01:00
Roderick Colenbrander e2d70fff6b ddraw: Add yv12 detection support. 2008-02-22 12:04:01 +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 c623ffd7d0 wined3d: Don't flush in GDI RealizePalette without a palette. 2008-02-22 11:53:29 +01:00
Roderick Colenbrander 8f18eeea35 wined3d: Let flush_to_framebuffer_drawpixels use a valid rect. 2008-02-20 12:06:46 +01:00
Stefan Dösinger f952419651 wined3d: Enable the texcoord init workaround on radeon HD cards on MacOS. 2008-02-19 14:47:59 +01:00
Stefan Dösinger e40bb4a8c3 wined3d: Create a VBO before returning memory.
The state manager calls GetMemory before it calls PreLoad on the VBO,
and PreLoad depends on finding the VBO in the strided vertex structure.
This can cause problems on the first draw which creates the vertex
buffer, because the first PreLoad creates the vbo and attempts to
convert with an incorrect strided structure.
2008-02-19 14:47:51 +01:00
Roderick Colenbrander 28464f9689 wined3d: Fix lack of indent in PreLoad. 2008-02-19 13:39:25 +01:00
Roderick Colenbrander ef21f1e85e wined3d: The base RealizePalette isn't needed anymore. 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
Roderick Colenbrander 61c82f8069 wined3d: Add a GDI version of RealizePalette.
The base version won't suffice anymore as it is not able to upload
palette changes to the drawable in an efficient way for both GDI and
GL. Further the LoadLocation code in RealizePalette isn't needed for
the GDI version as in all cases it works on system memory.
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 1079f37407 wined3d: When DDCAPS_ALLOW256 is set, palette entry 0 and 255 are filled with black and white. 2008-02-19 12:06:25 +01:00
Roderick Colenbrander c2d978410f wined3d: Add separate alpha blend support. 2008-02-18 14:19:57 +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 989d283000 wined3d: Detect and work around the MacOS Geforce 8 PBO brokeness. 2008-02-18 13:36:58 +01:00
Stefan Dösinger b8c613196d wined3d: Fix a syntax error in the ARB vertex program offset shader.
As some Mesa developers pointed out, the GL_ARB_vertex_program grammar
does not allow an immediate value as source argument in ARL. Most
compilers accept it, but since it is not the purpose of the test
program to test for this replace it with a proper constant.
2008-02-18 13:34:37 +01:00
Stefan Dösinger c2d97b2329 wined3d: Add a test for fixed function bump mapping. 2008-02-18 13:34:25 +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
Stefan Dösinger b1e1df5117 wined3d: Extend out anti-spam database a bit. 2008-02-18 13:34:01 +01:00
Rico Schüller 59a43c4cc9 wined3d: Fix memcpy with wrong size parameter to simple assignment in GetScissorRect. 2008-02-15 12:08:54 +01:00
Stefan Dösinger 81de2fa10a wined3d: Add a test for the vFace register. 2008-02-15 09:40:03 +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
Stefan Dösinger 62a92d160e wined3d: Restore the Window size on reset. 2008-02-07 13:05:44 +01:00
Stefan Dösinger b322f81b75 wined3d: Reject unsupported modes when restting the device. 2008-02-07 13:05:27 +01:00
Stefan Dösinger 3e7f1388be wined3d: Add some ATI cards to the version database. 2008-02-07 13:05:20 +01:00
Stefan Dösinger 1c1a6f32ae wined3d: Add infrastructure for faking driver versions.
Often the Linux / MacOS graphics driver version is of no use for
finding a proper driver version to report to the D3D app. So this
patch adds some infrastructure for easy hardcoding of card specific
driver versions to report to the application. This helps applications
which make assumptions based on the driver version, like bug
workarounds.
2008-02-07 13:05:04 +01:00
Stefan Dösinger 089c34b95a wined3d: Create VBOs. 2008-02-06 12:43:53 +01:00
Stefan Dösinger 74db14728e wined3d: Separate OpenGL and driver version. 2008-02-06 12:43:53 +01:00
Stefan Dösinger 3188d9ae30 wined3d: Move the highpart of the driver version to the gl structure.
While 6.14 is a sane default, we might want to override it on a
per-driver basis, if we have really old Windows drivers on some cards.
2008-02-06 12:43:53 +01:00
Stefan Dösinger cb6de00c86 wined3d: Tear down the dummy textures before resetting.
In theory the opengl library should release the gl resources when we
destroy the context, and the stateblock reset will recreate the dummy
textures, but I think it is cleaner to do this explicitly.
2008-02-06 12:43:53 +01:00
Stefan Dösinger 564532f026 wined3d: Restore the stateblock after Reset. 2008-02-06 12:43:53 +01:00
Roderick Colenbrander 35e0bb8225 wined3d: Redownload the surface data in case of a palette change. This fixes a lot of redrawing problems in Red Alert. 2008-02-06 11:36:44 +01:00
Roderick Colenbrander 424e9c3e08 wined3d: Allow read back of P8 surfaces. This fixes some of the redrawing issues in Red Alert. 2008-02-06 11:36:35 +01:00
Roderick Colenbrander f84589ea1f wined3d: Reload the palette on a color key change. This fixes the ddex4/ddex5 samples from the dx7 sdk. 2008-02-06 11:36:23 +01:00
Roderick Colenbrander 1b78457bc6 wined3d: Make sure to set the color key when it is needed including for index_in_alpha. 2008-02-06 11:36:15 +01:00
Stefan Dösinger dcf08f01ed wined3d: Recreate the contexts on _Reset. 2008-02-05 12:42:39 +01:00
Stefan Dösinger e7393a8a11 wined3d: Move vertex buffer vbo creation to PreLoad. 2008-02-05 12:42:30 +01:00
Stefan Dösinger b813398467 wined3d: Move the float format check to the big switch statement. 2008-02-05 12:42:20 +01:00
Stefan Dösinger bbeedca67e wined3d: Fix dxtn format check.
We can't return WINED3D_OK straight away because we have yet to check
the other flags, like sRGB correction.
2008-02-05 12:42:12 +01:00
Stefan Dösinger 9d9a640127 wined3d: Correct the srgb reading check. 2008-02-05 12:41:59 +01:00
Stefan Dösinger 635daf8b5d wined3d: D3DTADDRESS_WRAP on conditional NP2 textures clamps to edge.
Conditional NP2 textures in Direct3D do not support D3DTADDRESS_WRAP
texture addressing. Similarly, GL_ARB_texture_rectangle textures do
not support GL_REPEAT. This patch adds a test which shows that _WRAP
clamps to the texture edge and implements that.
2008-02-05 12:37:49 +01:00
Stefan Dösinger 08391b82c1 wined3d: Update the gl rectangle when adjusting surface sizes. 2008-02-05 12:37:28 +01:00
Stefan Dösinger 1424e7fd09 wined3d: Make Clear aware of the depth stencil sharing. 2008-02-05 12:37:01 +01:00
Stefan Dösinger 3d2aa7afa0 wined3d: De-Statify depth blit opengl resources. 2008-02-05 12:33:15 +01:00
Stefan Dösinger 093d7d00c5 wined3d: Mark textures dirty on UnLoad. 2008-02-05 12:33:05 +01:00
Stefan Dösinger a0f2e6e55e wined3d: Move some UnLoad code to the base texture class. 2008-02-05 12:32:58 +01:00
Stefan Dösinger 4c99bd5f87 wined3d: Destroy FBOs and reset pointers on Reset. 2008-02-05 12:32:49 +01:00
Stefan Dösinger 33d012efcb wined3d: Unload implicit depth stencil buffers correctly.
We have to destroy potential fbo renderbuffers, and make sure the
texture is gone
2008-02-05 12:32:42 +01:00
Stefan Dösinger c1538f8048 wined3d: Update the auto depth stencil buffer size on reset. 2008-02-05 12:32:30 +01:00
Stefan Dösinger b706a62aff wined3d: Beware of texture_rectangle NP2 support in Reset. 2008-02-05 12:32:22 +01:00
Alexandre Julliard e84daed485 Avoid sizeof in traces. 2008-01-24 14:03:10 +01:00
Andrew Talbot 35c3bfe25c wined3d: Remove unneeded casts. 2008-01-24 11:41:47 +01:00
Andrew Talbot 18047e77e5 wined3d: Remove unneeded casts. 2008-01-24 11:41:42 +01:00
Andrew Talbot b3a58a2486 wined3d: Remove unneeded casts. 2008-01-24 11:41:36 +01:00
Andrew Talbot ebcedd0350 wined3d: Remove unneeded casts. 2008-01-24 11:41:30 +01:00
Francois Gouget d0794c4aeb Assorted spelling fixes. 2008-01-23 21:16:22 +01:00
Roderick Colenbrander a1364d11c0 wined3d: Don't use texture_rectangle for paletted textures. 2008-01-23 11:31:42 +01:00
Marcus Meissner 755d806f1a wined3d: Initialize swapchain. 2008-01-22 12:58:14 +01:00
Alexander Dorofeyev d9567b7627 wined3d: Fix not released swapchain in some codepaths. 2008-01-22 11:19:43 +01:00
Alexander Dorofeyev 536f98000d wined3d: Change colorkey fixup for stage 0 alphaop / alphaarg. 2008-01-22 11:19:05 +01:00
Marcus Meissner d757432c7d wined3d: Removed deadcode. 2008-01-21 12:41:31 +01:00
Austin English 3471f841a1 wined3d: Spelling fixes. 2008-01-18 12:53:33 +01:00
Marcus Meissner 293ec5843d wined3d: Check for overflows. 2008-01-16 19:14:38 +01:00
Allan Tong 7b40fd645d wined3d: Set swapchain container before flagging front buffer with SFLAG_INDRAWABLE. 2008-01-15 14:35:20 +01:00
Pablo Spallanzani 91afa09ac0 wined3d: Fix texture coordinate calculation in surface_blt_to_drawable. 2008-01-15 11:36:44 +01:00
Stefan Dösinger 5426cd6317 wined3d: Clear the constant list before finding constants.
shader_get_registers_used is delayed until compile time for some 1.x
shaders, mostly to wait for the right vertex declaration to be
set. This means that on a recompile it will be run again, adding
another instance of each local constant, which in turn causes compile
errors because of constant redeclaration. Just purging the lists
before finding the constants is a simple and reliable solution.
2008-01-14 15:21:20 +01:00
Stefan Dösinger 11d6ed0c0b wined3d: Destroy opengl shaders on reset. 2008-01-14 15:21:08 +01:00
Stefan Dösinger 1156194881 wined3d: Destroy arb shaders on shader destroy. 2008-01-14 15:21:01 +01:00
Stefan Dösinger 4d0a609452 wined3d: Reset the shader state on shader_*_destroy. 2008-01-14 15:20:51 +01:00
Stefan Dösinger 09bf3d5aea wined3d: Keep track of shaders. 2008-01-14 15:20:42 +01:00
Stefan Dösinger c3c6c6f543 wined3d: Unload all resources on Reset. 2008-01-14 15:20:34 +01:00
Stefan Dösinger 80953d62d7 d3d9: Reject IDirect3DDevice9::Reset with active default pool resources. 2008-01-14 15:12:00 +01:00
Stefan Dösinger 8bb5d13fe2 wined3d: Implement VolumeTexture::UnLoad. 2008-01-14 15:11:35 +01:00
Stefan Dösinger 38a4f6339b wined3d: Implement IWineD3DCubeTexture::UnLoad. 2008-01-14 15:11:27 +01:00
Stefan Dösinger 5d7b8dafb8 wined3d: Implement IWineD3DTexture::UnLoad. 2008-01-14 15:11:18 +01:00
Stefan Dösinger 0ca65c7bc0 wined3d: Implement IWineD3DVolume::UnLoad. 2008-01-14 15:11:07 +01:00
Stefan Dösinger 36729a874c wined3d: Implement IWineD3DIndexBuffer::UnLoad. 2008-01-14 15:10:54 +01:00