Commit Graph

2353 Commits

Author SHA1 Message Date
Stefan Dösinger 9e831a8733 wined3d: Create a fake non-gl adapter. 2008-04-01 20:31:30 +02:00
Roderick Colenbrander 4120188f99 wined3d: Request a pixel format with alpha support in case of P8 render targets. 2008-03-31 13:01:24 +02:00
Roderick Colenbrander 76014205de wined3d: Fix a postpixelshader_blending bug. 2008-03-31 12:14:33 +02:00
Roderick Colenbrander c0be6047ef wined3d: Also move the rendertarget capability to the formats table. 2008-03-29 10:31:50 +01:00
Roderick Colenbrander ef73fe5d47 wined3d: Add a depthstencil flag to the formats table and make use of it in CheckDepthStencilCapability. 2008-03-29 10:31:36 +01:00
Roderick Colenbrander e1bf1cd640 wined3d: Make the filtering capability of a format a flag in the formats table. 2008-03-29 10:31:18 +01:00
Roderick Colenbrander 69a40127c6 wined3d: Add D3DUSAGE_QUERY_PIXELSHADER_BLENDING to CheckDeviceFormat. 2008-03-28 15:50:36 +01:00
Roderick Colenbrander 4eaa424c79 wined3d: Initial post pixelshader blending support. [attempt 2].
For each pixel format we store a flag in the table whether it supports
post pixelshader blending. Before applying blending or during a
context switch we verify that blending is turned off for the
format. In case of R32F this gave a 5-6x performance boost (without
filtering and software conversion).
2008-03-28 15:50:24 +01:00
Stefan Dösinger 1fdc0ee811 wined3d: Remove some debug TRACE stuff. 2008-03-28 14:51:25 +01:00
Stefan Dösinger f63ce1c489 wined3d: Inherit from the proper state table in atifs. 2008-03-28 14:49:38 +01:00
Stefan Dösinger f761b90801 wined3d: Free heapMemory, not allocatedMemory when adjusting the surface. 2008-03-27 11:19:05 +01:00
Alexander Dorofeyev 165970992a wined3d: Make device palettes dynamically allocated. 2008-03-27 11:09:06 +01:00
Stefan Dösinger 39e2cbc5d5 wined3d: Enable D3DFMT_V8U8 with GL_ATI_fragment_shader. 2008-03-25 19:50:55 +01:00
Stefan Dösinger 9b79bc5e31 wined3d: Implement env bump mapping in the atifs ffp replacement. 2008-03-25 19:50:43 +01:00
Stefan Dösinger 4640be8dc8 wined3d: Fragment processing using GL_ATI_fragment_shader.
This adds code for handling fixed function fragment processing with the
GL_ATI_fragment_shader extension. This is a sort-of programmable
interface for fragment processing at the level of shader model 1.4 in
d3d. This code is of use on r200, r250 and r280 cards(radeon 8500 to
9200) which do not support GL_ARB_fragment_program, but support pixel
shader 1.4 on Windows. This code is somewhat a counterpart to the
existing fragment processing code using GL_NV_register_combiners and
GL_NV_texture_shader.
2008-03-25 19:50:32 +01:00
Stefan Dösinger a440051016 wined3d: Add a shader DLL init callback. 2008-03-25 19:49:17 +01:00
Stefan Dösinger 18e16f4e66 wined3d: Add GL_ATI_fragment_shader. 2008-03-25 19:48:35 +01:00
Stefan Dösinger 28fdebe404 wined3d: Alloc / free shader private data and blt stuff in Init3D/Uninit3D. 2008-03-25 19:48:24 +01:00
Stefan Dösinger ac57b4e2f5 wined3d: Free shader private data on reset.
Since the shader backend implementations might track opengl resources in
their private data inform them about reset calls. For example, the atifs
backend keeps track of the replacement shaders, which are lost during an
opengl context recreation.
2008-03-25 19:48:14 +01:00
Stefan Dösinger ee7e149998 wined3d: Move shader caps setting into the arb and glsl shader backends. 2008-03-25 19:39:23 +01:00
Stefan Dösinger 5ab5202e0f wined3d: Set shader specific caps in the shader backend.
The whole control structures in directx.c get terribly confusing with
the various codepaths for texturing and different shader
implementations. It is also hard to reflect the shader model
decisions this way too. This patch moves the shader specific parts of
the caps code into the shader backend where we can set our caps
dependent of the shader model decisions and without complex caps flag
checks.
2008-03-25 19:39:11 +01:00
Stefan Dösinger 8869c0f147 d3d: De-pointerize the WINED3DCAPS structure. 2008-03-25 19:36:38 +01:00
Stefan Dösinger 6d5f562dcf wined3d: Move the shader backend selection into a separate function. 2008-03-25 19:36:13 +01:00
Stefan Dösinger a66fb40d83 wined3d: Move shader generation into the shader backend.
Generating the shader ID and parts of the shader prolog and epilog was
done by the common vertexshader.c / pixelshader.c, which is ugly.

This patch doesn't get rid of all the uglyness, somewhen we'll still
have to sort out the relationship of [arb|glsl]_generate_shader and
[arb|glsl]_generate_declarations.
2008-03-25 19:35:58 +01:00
Stefan Dösinger 84258723f9 wined3d: Make the state table a property of the shader backend. 2008-03-25 19:35:32 +01:00
Roderick Colenbrander eaa1ff0d2c wined3d: Always report D16 as Windows drivers report it on all cards (likely using emulation). 2008-03-25 16:14:03 +01:00
Alexander Dorofeyev f2e03d6c3f wined3d: Don't store primary surface palette in device palettes. 2008-03-25 11:53:55 +01: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
Alexander Dorofeyev 3d2bdf52cd wined3d: Handle zero primitive count. 2008-03-24 20:40:13 +01:00
Roderick Colenbrander cb9252db36 wined3d: Fix a typo in CheckSrgbWriteCapability. We support both X8R8G8B8 and A8R8G8B8. 2008-03-24 20:39:50 +01:00
Roderick Colenbrander 9123e8f374 wined3d: Add more debug code to CheckDeviceFormat. 2008-03-24 20:39:37 +01:00
Roderick Colenbrander 690f496bd4 wined3d: We want to compare the old and the new format and not the old with the old. 2008-03-24 13:27:14 +01:00
Philip Nilsson 1110f17581 wined3d: Initialize maxAttribs in case it isn't changed by glGetIntegerv. 2008-03-24 13:26:20 +01:00
Roderick Colenbrander e749825793 wined3d: CheckTextureCapability returns TRUE for V8U8. 2008-03-24 12:08:34 +01:00
Roderick Colenbrander 3771341774 wined3d: Add a missing break to blt_to_drawable. 2008-03-24 12:08:12 +01:00
Roderick Colenbrander 856af1b5d7 wined3d: Add srgb write support to CheckDeviceFormat. 2008-03-22 12:23:23 +01:00
Roderick Colenbrander 9e9ef6238a wined3d: Remove unneeded code in CheckDeviceFormat.
All these checks are done during the capability checks which are
performed under the resource type checks.
2008-03-22 11:46:25 +01:00
Roderick Colenbrander 5d151c0ffc wined3d: Don't continue with CheckDeviceFormat when the texture format isn't around.
It is legal to pass Usage=0 to CheckDeviceFormat and in both this case
and in the case a format isn't available UsageCaps would be 0 and a
format would be reported available.
2008-03-22 11:45:58 +01:00
Roderick Colenbrander 460f0d1608 wined3d: Return WINED3DERR_NOTAVAILABLE when cubemapping isn't supported. 2008-03-22 11:45:41 +01:00
Roderick Colenbrander 616944ae7e wined3d: Add reporting of D3DRTYPE_VOLUME capabilties.
We assume it has the same capabilities as VOLUMETEXTURE. MSDN is very
vague on this topic. Intel/Nvidia/ATI drivers seem to offer nearly the
same caps on both, so do that too.
2008-03-22 11:45:31 +01:00
Roderick Colenbrander 6f3127291f wined3d: When volume textures aren't around (GL_EXT_texture3D not supported) return WINED3DERR_NOTAVAILABLE. 2008-03-22 11:44:11 +01:00
Roderick Colenbrander eef51ed4ca wined3d: We don't offer index/vertex buffer caps. Neither do Windows drivers (at least Nvidia, Ati and Intel). 2008-03-22 11:14:37 +01:00
Roderick Colenbrander 51a8162330 wined3d: Check pixel formats of the same pixel type. 2008-03-21 15:19:05 +01:00
Andrew Talbot 19c105c79c wined3d: Assign to structs instead of using memcpy. 2008-03-21 11:24:05 +01:00
Luis Javier Merino 3bb1ea3d34 wined3d: BltFast dealing correctly with overlapping src and dest. 2008-03-20 14:27:36 +01:00
Roderick Colenbrander fd71421ebe wined3d: Report software processing in CheckDeviceFormat. 2008-03-19 17:21:59 +01:00
Roderick Colenbrander 30a3bc2651 wined3d: Add dynamic locking support to CheckDeviceFormat. 2008-03-19 17:21:47 +01:00
Roderick Colenbrander 7fd87f10cd wined3d: There is no need for the !Usage checks at the start of the resource type checks.
The return-path of the code will handle this properly and this also
ensures that the R8G8B8 dxVersion test is reached.
2008-03-19 17:21:34 +01:00
Francois Gouget 304b415284 Assorted spelling fixes. 2008-03-19 11:21:27 +01:00
Roderick Colenbrander 0e9d02ded4 wined3d: Add correct autogenmipmap support. 2008-03-18 11:17:42 +01:00
Roderick Colenbrander aa46edd60c wined3d: Add a function which checks the filtering capabilities for a format. 2008-03-18 11:17:31 +01:00
Roderick Colenbrander 2f1e01bbe3 wined3d: Put vertex texture capability checking in its own function. 2008-03-18 11:17:15 +01:00
Roderick Colenbrander 32a32d82c4 wined3d: Put the SRG read capability check in its own function. 2008-03-18 11:17:01 +01:00
Roderick Colenbrander 4e66c9c990 wined3d: Add a function which checks the legacy bump mapping capabilities. 2008-03-18 11:16:48 +01:00
Roderick Colenbrander d44c295651 wined3d: Check the render target capabilities of a resource type. 2008-03-17 11:42:19 +01:00
Roderick Colenbrander ecf24604e2 wined3d: Check the texture capabilities we offer for the different texture types (cube, plain, volume). 2008-03-17 11:41:58 +01:00
Roderick Colenbrander 02f6c9ece8 wined3d: Move depth/stencil verification to CheckDepthStencilCapability. 2008-03-17 11:41:39 +01:00
Artur Szymiec 102b9d12e4 wined3d: Add a device uuid. 2008-03-13 20:44:18 +01:00
Stefan Dösinger c5117dab68 wined3d: Set the fullscreen flag before the display Mode. 2008-03-11 12:11:52 +01:00
Stefan Dösinger c81b114269 wined3d: Only restore the style and exStyle when it is untouched. 2008-03-11 12:11:52 +01:00
Stefan Dösinger a9fb81b2ed wined3d: Only adjust windows in fullscreen mode to the screen. 2008-03-11 12:11:52 +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 20e57ea607 wined3d: Mark constants dirty in the EXT_gpu_program_parameters path. 2008-03-07 11:01:07 +01:00
Stefan Dösinger 8a3ef776f4 wined3d: gl_FragCoord isn't exact. 2008-03-07 11:01:07 +01:00
Rico Schüller 7cbdb29884 wined3d: Fix copy and past error. 2008-03-06 12:46:50 +01:00
Stefan Dösinger d20768c120 wined3d: Support shininess > 128 if opengl does. 2008-03-05 19:23:06 +01:00
Stefan Dösinger 167a271434 wined3d: Support more than one texbem instruction per shader. 2008-03-05 19:22:44 +01:00
Stefan Dösinger 739278baf1 wined3d: Add a number to the ARB program shader bumpenvmat matrices. 2008-03-05 19:22:31 +01:00
Stefan Dösinger 6ea0880e43 wined3d: Fix a small bug in a patch from yesterday. 2008-03-05 11:21:51 +01:00
Rob Shearman 48000893f9 makefiles: Simplify the use of the IMPORTLIB variable in the DLL makefiles.
Only specify the root to keep platform-specifics out of the individual 
DLL makefiles.
2008-03-04 20:55:01 +01:00
Stefan Dösinger 8b28ca720e wined3d: Use GL_EXT_gpu_program_parameters if available. 2008-03-04 12:15:32 +01:00
Stefan Dösinger aeb0e43e3e wined3d: Hardcode local constants in ARB shaders if possible. 2008-03-04 12:15:26 +01:00
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
Stefan Dösinger 15245a74b6 wined3d: Implement IWineD3DVertexBuffer::UnLoad. 2008-01-14 15:10:42 +01:00
Stefan Dösinger c372654b26 wined3d: Implement IWineD3DSurface::UnLoad. 2008-01-14 15:10:30 +01:00
Stefan Dösinger e59ddb0ab1 wined3d: Add a new IWineD3DResource::UnLoad method. 2008-01-14 15:10:17 +01:00
Roderick Colenbrander 916b56391d wined3d: Fix glBlendColorEXT for use on RivaTNT. 2008-01-14 13:10:28 +01:00
Stefan Dösinger 29a0b3622c wined3d: Fix a pixelshader recompilation check. 2008-01-08 17:04:49 +01:00
Stefan Dösinger c290f4c7a3 wined3d: Detect geforce 7300 cards. 2008-01-08 17:04:36 +01:00
Roderick Colenbrander a74ecc5f2f wined3d: Unify color conversion code. 2008-01-07 22:57:05 +01:00
Roderick Colenbrander f2e32f7c45 wined3d: Use software palette conversion for non-texturing operations. 2008-01-07 18:20:07 +01:00
Alexandre Julliard 9636c7fa0e wined3d: Use unsigned int instead of size_t for the glsl mask size. 2008-01-07 17:17:27 +01:00
Alexandre Julliard 980ee365a0 wined3d: Use unsigned int instead of size_t for element counts. 2008-01-07 17:17:04 +01:00
Gerald Pfeifer 21a9c2d2f9 wined3d: Removed dead FIXME checks. 2008-01-03 11:53:29 +01:00
H. Verbeet 3f6c3d2db0 wined3d: Properly handle the surface location in stretch_rect_fbo(). 2008-01-03 11:40:31 +01:00
H. Verbeet bf50e07f34 wined3d: SFLAG_INTEXTURE is the same as SFLAG_INDRAWABLE for offscreen render targets when ORM_FBO is used. 2008-01-03 11:40:31 +01:00
H. Verbeet 4863daf06a wined3d: Bind the surface texture in LoadLocation(). 2008-01-03 11:40:31 +01:00
H. Verbeet 6cab4c8005 wined3d: Move binding the texture and dirtifying the sampler to its own function from surface_download_data(). 2008-01-03 11:40:31 +01:00
H. Verbeet 2820ecc5fe wined3d: Call SetGlTextureDesc() from BindTexture() rather than from PreLoad(). 2008-01-03 11:40:31 +01:00
H. Verbeet c46c53a12c wined3d: Call ActivateContext regardless of WINED3DCREATE_MULTITHREADED. 2008-01-03 11:40:31 +01:00
Gerald Pfeifer 520832451f wined3d: Simplify three checks based on the unsignedness of variables. 2008-01-02 12:38:42 +01:00
Gerald Pfeifer 02afd70fbb wined3d: Remove four noop checks. 2008-01-02 12:38:42 +01:00
Alexander Dorofeyev 7165d7268b wined3d: Fix regression of colorfill and texture to swapchain codepaths in BltOverride. 2007-12-31 17:49:00 +01:00
Alexander Dorofeyev 83fe4e77f5 wined3d: Free palette handle when destroying IWineD3DPaletteImpl. 2007-12-31 17:48:08 +01:00
Gerald Pfeifer d3840f0bb7 wined3d: Remove noop check in IWineD3DBaseTextureImpl_Appl(). 2007-12-31 17:29:33 +01:00
Roderick Colenbrander f3df6cf42b wined3d: Only store the palette index in the alpha component when the primary render target uses P8.
This was already done in other places but I missed this spot.
2007-12-28 11:45:03 +01:00
Roderick Colenbrander 756cb66e78 wined3d: In case of GL_EXT_paletted_textures we use GL_COLOR_INDEX and don't need a GL_RED fixup. 2007-12-28 11:44:49 +01:00
Stefan Dösinger ea093f4a38 wined3d: Multiply the half pixel correction with .w. 2007-12-28 11:28:59 +01:00
Stefan Dösinger fd711c57df wined3d: Combine two glScalef calls into one. 2007-12-27 13:44:18 +01:00
Stefan Dösinger 44b8915371 wined3d: Get rid of the invymat.
glScalef(1.0, -1.0, 1.0) does the same as the glMultMatrix with the
invymat matrix, and it is more optimal.
2007-12-27 13:44:13 +01:00
Stefan Dösinger 2bec23fd7c wined3d: Fix a problem in BltOverride. 2007-12-27 13:44:05 +01:00
Alexander Dorofeyev 27c98fd628 wined3d: Also update alpha test when stage texture is NULL. 2007-12-27 13:43:49 +01:00
Alexander Dorofeyev 1e23602d4b wined3d: Add zero/near zero vertex rhw special case. 2007-12-26 14:03:48 +01:00
Alexander Dorofeyev eb3fb4bf28 wined3d: Use IWineD3DDeviceImpl_ClearSurface in IWineD3DDeviceImpl_Clear. 2007-12-21 13:58:19 +01:00
Alexander Dorofeyev f5aaabd1f2 wined3d: Rewrite IWineD3DSurfaceImpl_BltOverride colorfill codepath. 2007-12-21 13:58:13 +01:00
Stefan Dösinger 47a8a6bd44 wined3d: Implement and test vertex fixups with per stream offsets. 2007-12-21 13:44:16 +01:00
Stefan Dösinger e27cf6ff8f wined3d: Per stream offsets are 4 byte aligned. 2007-12-21 13:44:06 +01:00
Stefan Dösinger 8ff517eeb9 wined3d: Vertex attributes are 4 byte aligned. 2007-12-21 13:43:58 +01:00
Stefan Dösinger b475047cc0 wined3d: Improve some traces. 2007-12-21 13:14:58 +01:00
Stefan Dösinger 6d575ec301 wined3d: Change the vertex buffer declaration's data format.
This hopefully makes the vertex attribute detection simpler, more solid, 
readable and flexible.
2007-12-21 13:14:36 +01:00
Stefan Dösinger b5f925cae0 wined3d: Implement half float vertex buffer conversion. 2007-12-21 13:13:56 +01:00
Stefan Dösinger aaa0e5090a wined3d: Add a test for 16 bit floats. 2007-12-20 12:10:16 +01:00
Stefan Dösinger b83dc6bbf6 wined3d: Move the GL info structure into the adapter. 2007-12-20 12:10:08 +01:00
Stefan Dösinger 6ac59b96ed wined3d: Fix vertex buffers based on type, not semantic. 2007-12-20 12:09:56 +01:00
Stefan Dösinger 2d90449500 wined3d: Fixed function vertex attribute types are flexible. 2007-12-20 10:49:42 +01:00
Stefan Dösinger a3c2fb9e64 wined3d: Store if half float conversion is needed in the decl. 2007-12-20 10:48:16 +01:00
Stefan Dösinger 30c1abb1eb wined3d: Always dump the fbo state on errors. 2007-12-20 10:48:08 +01:00
Rico Schüller b7dfe3afb6 wined3d: Fix some typos. 2007-12-20 10:47:06 +01:00
Stefan Dösinger b95f30134b wined3d: Implement texture -> swapchain blits with stretch_rect_fbo. 2007-12-19 12:19:43 +01:00
Stefan Dösinger 37e872e901 wined3d: Some improvements for SFLAG_CONVERTED checking.
We can check this flag before setting up the gl lock, and add the
surface format to the FIXME.
2007-12-19 12:19:39 +01:00
Stefan Dösinger 7a1d35e513 wined3d: Emulate half float vertices if GL_NV_half_float is not there. 2007-12-19 12:19:27 +01:00
Stefan Dösinger 7e9af243d1 wined3d: Implement blits from the active render target to swapchains. 2007-12-19 12:19:12 +01:00
Stefan Dösinger 83c0b13c5b wined3d: Split up the render target -> render target blit. 2007-12-18 14:08:28 +01:00
Stefan Dösinger df77e28854 wined3d: Implement D3DFMT_G16R16. 2007-12-18 14:08:18 +01:00
Stefan Dösinger 88f746ab0e wined3d: Filter out some shader compilation spam. 2007-12-18 14:07:12 +01:00
Stefan Dösinger 2eab3d5c11 wined3d: Ignore tesselated and unused streams when comparing attribs. 2007-12-18 13:23:16 +01:00
Stefan Dösinger 8e036d6487 wined3d: Correct a pixel shader version comparison. 2007-12-18 13:23:09 +01:00
Stefan Dösinger cd858dfa22 wined3d: Disable the SWAPEFFECT_DISCARD clear. 2007-12-18 13:23:00 +01:00
Stefan Dösinger f78ae8d125 wined3d: Use SetDisplayMode to set the display mode. 2007-12-12 13:46:04 +01:00
Stefan Dösinger 51adbf5bbf wined3d: Remove 24/32 bit hacks. 2007-12-12 13:45:50 +01:00
Marco Schuster 96504632de wined3d: Fixed a bug that the 8600M GT could not be detected. 2007-12-12 13:45:42 +01:00
Michael Stefaniuc a526ad6cbc wined3d: Fix a "ordered comparison of pointer with integer zero". 2007-12-11 14:59:54 +01:00
Stefan Dösinger 7f10ee453a wined3d: Use the adapter to read the display mode. 2007-12-11 12:14:35 +01:00
Alexander Dorofeyev 1dbc9d50c9 wined3d: Improve thread safety in IWineD3DSurfaceImpl_BltOverride. 2007-12-10 12:36:06 +01:00
Detlef Riekenberg efb13b28df Assorted spelling fixes. 2007-12-08 19:55:39 +01:00
Francois Gouget 5f7a9cea38 Assorted spelling fixes. 2007-12-07 16:35:32 +01:00
Stefan Dösinger f700cbe74b wined3d: Add an alpha blending test. 2007-12-07 16:26:43 +01:00
Stefan Dösinger 0e8c13e630 wined3d: A more detailed occlusion query test and fixes. 2007-12-07 15:27:11 +01:00
Stefan Dösinger 54fa712981 wined3d: Initialize output texcoord .w to 1.0 if needed.
The GL_ARB_vertex_program extension does not define a standard value for
output texture coordinates. This makes problems when using vertex
shaders with fixed function fragment processing because fffp divides the
texture coords by its .w component. This means that gl shaders have to
write to the .w component of texture coords. Direct3D shaders however
do not.
2007-12-07 14:54:22 +01:00
Stefan Dösinger 1cc7530332 wined3d: Ignore unused attributes when generating the swizzle array. 2007-12-06 13:48:59 +01:00
Stefan Dösinger f4d2449244 wined3d: Test clearing regarding the scissor test and colorwrite. 2007-12-06 13:48:43 +01:00
Gerald Pfeifer f4ec0a209b wined3d: Fix error handling in fixed_get_input(). 2007-12-05 13:47:10 +01:00
Gerald Pfeifer 81f32c7a38 wined3d: Fix error handling in transform_texture(). 2007-12-04 18:41:45 +01:00
Stefan Dösinger 1ac109e5a0 wined3d: Use the proper drawable size when clearing. 2007-12-04 14:32:39 +01:00
Stefan Dösinger fce9abd095 wined3d: Clear honors the viewport. 2007-12-04 14:32:39 +01:00
Stefan Dösinger bd10d5261f wined3d: Fixes for drawable handling in Clear. 2007-12-04 14:32:39 +01:00
Stefan Dösinger a4461e03f7 wined3d: Disable the scissor test when blitting. 2007-12-04 14:32:39 +01:00