Commit Graph

1345 Commits

Author SHA1 Message Date
Stefan Dösinger 1f1d0cda22 wined3d: Misc comment updates. 2007-02-20 11:47:57 +01:00
Stefan Dösinger 27113156d9 wined3d: Remove IWineD3DDevice::EnumDisplayModes. 2007-02-20 11:47:46 +01:00
Stefan Dösinger 7676462a3d wined3d: Fix d3d8/9 style palettes. 2007-02-20 11:46:20 +01:00
Stefan Dösinger 4a93eb840a wined3d: Remove stream flags from GetStreamSource. 2007-02-20 11:46:06 +01:00
Stefan Dösinger ef68e32b03 wined3d/d3d8: Move todo about sw vp usage to d3d8. 2007-02-20 11:45:56 +01:00
Stefan Dösinger 401110538a wined3d: Check volume texture creation errors.
Volumetexture::Release checks for NULL pointers, so releasing a partially 
created texture works.
2007-02-20 11:45:42 +01:00
Stefan Dösinger 5e37345b30 wined3d: Activate a different context if the active render target is destroyed. 2007-02-19 13:10:51 +01:00
Stefan Dösinger 762e227994 wined3d: Only scream about unsupported vertex blending when it is used. 2007-02-19 13:10:24 +01:00
Stefan Dösinger 06f2829b92 wined3d: Pretend to support event queries. 2007-02-19 13:10:10 +01:00
Stefan Dösinger 266fc77cf0 wined3d: Lighting is calculated for vertices without normals.
It still should be disabled for transformed vertices though.
2007-02-19 13:08:35 +01:00
Stefan Dösinger 03bc11fa16 wined3d: Visual test framework. 2007-02-19 13:07:44 +01:00
Stefan Dösinger 5916fdd560 wined3d: Remove an outdated TODO comment.
BltFast takes care of activating the correct context nowadays.
2007-02-19 13:02:19 +01:00
H. Verbeet 78e50b78a6 wined3d: Remove the d3d9.h include from wined3d_private.h. 2007-02-16 12:31:28 +01:00
H. Verbeet dc5b08cc76 wined3d: Get rid of any remaining d3d9 stuff in directx.c. 2007-02-16 12:31:21 +01:00
H. Verbeet bd5488cda9 wined3d: Add WINED3DCREATE flags and use them. 2007-02-16 12:31:11 +01:00
H. Verbeet a4bc52a89c wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS. 2007-02-16 12:31:03 +01:00
Stefan Dösinger 1f32d6235e wined3d: Convert the full surface for now.
Until we have proper subrectangle handling for offscreen surfaces,
surface conversion has to use the real surface sizes, and not the size
of the opengl subrectangle that it is going to upload. Due to the
power of 2 limitations the gl height may be bigger than the real
surface height. If that is not the case, the uploading function will
pick the correct parts from the converted surface data.
2007-02-15 17:22:27 +01:00
Stefan Dösinger 20a07693b5 wined3d: Read offscreen render targets upside down when blitting them to a texture. 2007-02-15 17:22:06 +01:00
Stefan Dösinger a41ba013b6 wined3d: Test for supported queries.
This test contains a table of known supported / known unsupported
queries. In theory wined3d could just report the queries it supports,
but applications may make some assumtions regarding supported /
unsupported queries and stop working if they find a query unexpectadely
supported or unsupported. It also tests what is supposed to happen if an
unsupported query is created.
2007-02-15 17:21:58 +01:00
Stefan Dösinger 2f96220b3e 6/10: WineD3D: rsq and rcp instructions may need a default swizzle in arb.
ARB shaders need a swizzle for the RSQ and RCP instructions, while d3d
shaders do not. The DirectX sdk says that the x component is used if
no swizzle is given.
2007-02-15 17:21:27 +01:00
Stefan Dösinger 8e84127aed wined3d: Restore the display mode when releasing a swapchain. 2007-02-15 16:56:02 +01:00
Stefan Dösinger 19baae3159 wined3d: Remove empty texture stage applying loop. 2007-02-15 16:55:38 +01:00
H. Verbeet 75ebf29e1b wined3d: Get rid of any remaining d3d9 stuff in surface.c and surface_gdi.c. 2007-02-15 14:21:11 +01:00
H. Verbeet 1a07d3142c wined3d: Get rid of any remaining d3d9 stuff in stateblock.c. 2007-02-15 14:21:03 +01:00
H. Verbeet a2fde7d912 wined3d: Get rid of any remaining d3d9 stuff in state.c. 2007-02-15 14:20:56 +01:00
H. Verbeet 618dc7da1f wined3d: Use WINED3DISSUE_BEGIN / WINED3DISSUE_END rather than D3DISSUE_BEGIN / D3DISSUE_END. 2007-02-15 14:20:46 +01:00
H. Verbeet e8419403ee wined3d: Add the WINED3DSPD_IUNKNOWN flag and use it. 2007-02-15 14:20:38 +01:00
H. Verbeet 176a2a19c3 wined3d: Use WINED3DRTYPE_SURFACE rather than D3DRTYPE_SURFACE. 2007-02-15 14:20:28 +01:00
H. Verbeet e01f242a2a wined3d: Add WINED3DVS20 & WINED3DVS20CAPS flags and use them. 2007-02-15 14:20:19 +01:00
H. Verbeet 594f7fd882 wined3d: Add WINED3DPS20 & WINED3DPS20CAPS flags and use them. 2007-02-15 14:20:12 +01:00
H. Verbeet db8da81e67 wined3d: Add WINED3DDTCAPS flags and use them. 2007-02-15 14:20:01 +01:00
H. Verbeet da354c6dfa wined3d: Add WINED3DLINECAPS flags and use them. 2007-02-15 14:19:52 +01:00
H. Verbeet 5c398c571f wined3d: Add WINED3DPTADDRESSCAPS flags and use them. 2007-02-15 11:43:59 +01:00
H. Verbeet a58b156264 wined3d: Add WINED3DPCMPCAPS flags and use them. 2007-02-15 11:43:53 +01:00
H. Verbeet fd8e0f1589 wined3d: Add WINED3DPMISCCAPS flags and use them. 2007-02-15 11:43:46 +01:00
H. Verbeet 748fd83ebd wined3d: Add WINED3DPBLENDCAPS flags and use them. 2007-02-15 11:43:37 +01:00
H. Verbeet 8fdd88b42c wined3d: Add WINED3DSTENCILCAPS flags and use them. 2007-02-15 11:43:29 +01:00
H. Verbeet ea683407af wined3d: Add WINED3DTEXOPCAPS flags and use them. 2007-02-15 11:43:22 +01:00
Stefan Dösinger 1282b43302 wined3d: Restore blitting environment after modifying it. 2007-02-15 11:41:05 +01:00
Stefan Dösinger b3f96f4327 wined3d: alphaop fixes for color keying. 2007-02-15 11:40:57 +01:00
Stefan Dösinger d4c4e5d167 wined3d: Enable color keying only for surfaces without an alpha channel. 2007-02-15 11:40:44 +01:00
Stefan Dösinger 8b8e30b1e1 ddraw, wined3d: Color keying tests and fixes. 2007-02-15 11:37:00 +01:00
Stefan Dösinger ccd2772e28 wined3d: Accelerated blits from and to offscreen render targets. 2007-02-15 11:36:39 +01:00
Stefan Dösinger de036ff68e wined3d: Convert and load U8V8 surfaces as rgb.
GL_INDEX is definitly not the way to load U8V8 surfaces
2007-02-15 11:36:28 +01:00
Stefan Dösinger 99576ea24e wined3d: Implement texbem in arb, improve it in glsl. 2007-02-15 11:36:14 +01:00
Stefan Dösinger 49a49fcfec wined3d: Load one bump mapping environment matrix into pixel shaders if needed. 2007-02-15 11:36:01 +01:00
Stefan Dösinger efbd6d6332 wined3d: Give the bump env matrices their own states. 2007-02-15 11:35:52 +01:00
H. Verbeet 34e74ffc2a wined3d: Use WINED3D_OK rather than D3D_OK. 2007-02-15 11:15:50 +01:00
H. Verbeet 3e77ffc563 wined3d: Use WINED3DPRESENT_BACK_BUFFER_MAX rather than D3DPRESENT_BACK_BUFFER_MAX. 2007-02-15 11:15:41 +01:00
H. Verbeet d4d165afd8 wined3d: Use WINED3DUSAGE rather than D3DUSAGE. 2007-02-15 11:15:33 +01:00
H. Verbeet 498f9c507a wined3d: Use WINED3DSTREAMSOURCE_INSTANCEDATA rather than D3DSTREAMSOURCE_INSTANCEDATA. 2007-02-15 11:15:25 +01:00
Francois Gouget 536e738552 Assorted spelling fixes. 2007-02-14 21:03:57 +01:00
Stefan Dösinger 388499ff28 wined3d: More fullscreen window fixes. 2007-02-14 20:46:51 +01:00
Stefan Dösinger 0feddccfe3 wined3d: Instancing emulation. 2007-02-14 20:46:25 +01:00
Stefan Dösinger 93cd7ef7ff wined3d: Correctly load vertex attributes with a stride of 0. 2007-02-14 20:46:02 +01:00
Stefan Dösinger aec06f60e7 wined3d: Do not leave SetStreamSource early. 2007-02-14 20:45:54 +01:00
Stefan Dösinger e6fedfca7a wined3d: Do not release the local vertex buffer copy. 2007-02-14 20:45:44 +01:00
Stefan Dösinger 40c85a60b7 wined3d: SetStreamSource does not modify stream flags. 2007-02-14 20:45:32 +01:00
Stefan Dösinger 174b6321eb wined3d: Move lights to the state table. 2007-02-14 20:45:15 +01:00
Stefan Dösinger acadf3f241 wined3d: Replace the light chain with a hashmap. 2007-02-14 20:44:58 +01:00
H. Verbeet 157205c085 d3d8: Don't store the d3d8 declaration in the wined3d object. 2007-02-14 13:56:50 +01:00
H. Verbeet efed9aea1f d3d8: Move loading local d3d8 vertex shader constants from wined3d to d3d8. 2007-02-14 13:54:55 +01:00
H. Verbeet dea795f7ac d3d9: Don't store the d3d9 declaration in the wined3d object. 2007-02-14 13:54:42 +01:00
H. Verbeet 32e5cac2be wined3d: Get rid of the vertexDeclaration field in IWineD3DVertexShaderImpl. 2007-02-14 13:54:29 +01:00
H. Verbeet 8f0884066f wined3d: Add WINED3DDECLUSAGE, use it. 2007-02-14 13:50:22 +01:00
H. Verbeet 2d9540cab7 wined3d: Don't use WINED3DSHADERDECLUSAGE_PSIZE / WINED3DSHADERDECLUSAGE_FOG. 2007-02-14 13:50:01 +01:00
Stefan Dösinger b90a665d20 wined3d: Do not allocate compressed surfaces with glTexImage2D. 2007-02-14 12:29:42 +01:00
Stefan Dösinger ae3327334d wined3d: Swap the SFLAG_DIBSECTION flag when swaping hdc and memory. 2007-02-14 12:29:29 +01:00
Stefan Dösinger 0ddd236480 wined3d: Check error conditions before creating the object. 2007-02-14 12:29:19 +01:00
Stefan Dösinger 403b5ecf60 wined3d: Partial render target locking. 2007-02-14 12:29:11 +01:00
Stefan Dösinger b48dfb3c54 wined3d: Always use np2 repacking if no native np2 support is available. 2007-02-14 12:29:01 +01:00
Stefan Dösinger 21172f1dec wined3d: Improve render target locking. 2007-02-14 12:28:39 +01:00
Stefan Dösinger c3f0eb489b wined3d: Remove pow2Size from the surfaces. 2007-02-14 12:28:19 +01:00
Stefan Dösinger e16d08f011 wined3d: Show fullscreen rendering windows. 2007-02-14 12:28:04 +01:00
Stefan Dösinger f196680c59 wined3d: GetRenderTargetData can call BltFast. 2007-02-14 12:27:37 +01:00
Stefan Dösinger 8cae0e4d07 wined3d: Dirtify the render targets, not the primary swapchain on draws. 2007-02-14 12:27:23 +01:00
H. Verbeet 2a309f503d wined3d: Cleanup the pixelshader() state handler a little bit. 2007-02-14 12:21:46 +01:00
H. Verbeet 1636bc1aec wined3d: Always select the correct shader pair in the vertexdeclaration() state handler. 2007-02-14 12:21:41 +01:00
Stefan Dösinger f5f501d573 wined3d: Use the context manager to create onscreen contexts. 2007-02-13 12:08:02 +01:00
Stefan Dösinger 12252d0589 wined3d: Use the context manager to select the primary render target. 2007-02-13 12:05:35 +01:00
Stefan Dösinger 7253fae31f wined3d: Make the context array dynamic. 2007-02-13 12:04:40 +01:00
Stefan Dösinger e534340450 wined3d: Improve render target to texture blits. 2007-02-13 12:04:20 +01:00
Stefan Dösinger f22d37e4dd wined3d: Use the context manager to prepare for blitting. 2007-02-13 12:04:08 +01:00
Stefan Dösinger c1623d4e7b wined3d: Use the context manager to prepare for drawing. 2007-02-13 12:03:40 +01:00
Stefan Dösinger 380930dc54 wined3d: Store dirty states per context. 2007-02-13 11:55:07 +01:00
Stefan Dösinger e6c9a073b0 wined3d: Store state optmization members in the context. 2007-02-13 11:50:38 +01:00
Stefan Dösinger c739c387b6 wined3d: Add a per context structure for context management. 2007-02-13 11:50:14 +01:00
Chris Robinson 5f1a1bbc84 wined3d: Properly round negative values in shader_glsl_mov. 2007-02-12 14:12:29 +01:00
Stefan Dösinger fa97fbdcad wined3d: Make shader_cleanup more useful. 2007-02-12 12:37:48 +01:00
Stefan Dösinger 67b1f4a7e9 wined3d: BeginScene and EndScene tests and fixes. 2007-02-12 12:08:34 +01:00
Maarten Lankhorst 89840c0517 wined3d: Report D3D caps properly for ATI cards. 2007-02-05 14:01:43 +01:00
H. Verbeet 7c40799df0 wined3d: Remove the d3d9types.h include from wined3d_private.h. 2007-01-23 11:27:05 +01:00
H. Verbeet 32778357f8 wined3d: Use ARB_VERTEX_PROGRAM instead of GL_VERTEX_PROGRAM_ARB with GL_SUPPORT.
Spotted by Marcus Meissner.
2007-01-23 11:26:58 +01:00
H. Verbeet beed89cde4 wined3d: The sincos instruction is valid for ps/vs 2.1 as well. 2007-01-19 12:29:17 +01:00
H. Verbeet efed4c33c2 wined3d: gl_FragDepth is a float, so fixup the write mask. 2007-01-19 12:29:11 +01:00
H. Verbeet 4352934b84 wined3d: Use SetupFullscreenWindow() to make the window fullscreen. 2007-01-19 12:29:05 +01:00
H. Verbeet 6112522122 wined3d: Move SetupFullscreenWindow() and RestoreWindow() from IDirectDrawImpl to IWineD3DDeviceImpl. 2007-01-19 12:28:58 +01:00
H. Verbeet a31f2fd9fc wined3d: Use %s in trace. 2007-01-19 12:28:58 +01:00
Francois Gouget b0bde6b87c Assorted spelling fixes. 2007-01-18 12:56:52 +01:00
H. Verbeet 955fb95eb6 wined3d: Give shader constants their own debug channel. 2007-01-18 12:09:09 +01:00
H. Verbeet 79c7aeab00 wined3d: Fix a typo. 2007-01-18 12:09:03 +01:00
H. Verbeet d429ff5b69 wined3d: When switching color material, apply the material we were previously tracking.
This fixes a regression introduced by 329670c7f1.
2007-01-18 12:08:57 +01:00
H. Verbeet 612a74a994 wined3d: Don't set Parm when isDiffuseSupplied is FALSE in state_colormat(), it isn't used anyway. 2007-01-18 12:08:45 +01:00
Francois Gouget d4ca34dd9b d3d: Fix the D3DFMT_XXX constant declarations. 2007-01-18 12:05:05 +01:00
Stefan Dösinger 354fdae524 wined3d: Implement per stream offsets. 2007-01-17 11:24:04 +01:00
Stefan Dösinger 1d3abdeeaa wined3d: Store the stream number in the strided structure. 2007-01-17 11:23:54 +01:00
Stefan Dösinger 71f923a6d2 wined3d: Improve drawStridedSlow a bit. 2007-01-17 11:23:41 +01:00
H. Verbeet e3cc00cf47 wined3d: Add a glsl_src_param_t type, pass it to shader_glsl_add_src_param() instead of three separate character arrays. 2007-01-16 16:14:21 +01:00
H. Verbeet 04e6250c87 wined3d: Add a glsl_dst_param_t type, pass it to shader_glsl_add_dst_param() instead of three separate character arrays. 2007-01-16 16:13:58 +01:00
H. Verbeet 6f3fae4e04 wined3d: Simplify shader_glsl_get_write_mask(). 2007-01-16 16:13:29 +01:00
H. Verbeet c6bccc9278 wined3d: Simplify shader_glsl_get_swizzle(). 2007-01-16 16:13:19 +01:00
H. Verbeet 48f82d3f5e wined3d: Fix pshader_glsl_tex() and pshader_glsl_texcoord(). 2007-01-16 16:13:10 +01:00
H. Verbeet c3bfef8d7e wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_callnz(). 2007-01-16 16:12:46 +01:00
H. Verbeet 50e0deafca wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_breakc(). 2007-01-16 16:12:37 +01:00
H. Verbeet f593cd0de8 wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_ifc(). 2007-01-16 16:12:26 +01:00
H. Verbeet a89edf1be9 wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_if(). 2007-01-16 16:12:18 +01:00
H. Verbeet 9f22df26ef wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_rep(). 2007-01-16 16:12:11 +01:00
H. Verbeet 2cb49c67db wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_loop().
Fix the comment.
2007-01-16 16:12:02 +01:00
H. Verbeet cf1a3cc81a wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x3vspec().
Use shader_glsl_get_sample_function().
Use the GLSL builtin reflect() function.
2007-01-16 16:11:45 +01:00
H. Verbeet f0fb61daed wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x3spec().
Use shader_glsl_get_sample_function().
2007-01-16 16:11:26 +01:00
H. Verbeet ba1740909e wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x3(). 2007-01-16 16:11:13 +01:00
H. Verbeet b26fae9a25 wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x3tex().
Use shader_glsl_get_sample_function().
2007-01-16 16:11:02 +01:00
H. Verbeet 950783d4fd wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x2tex(). 2007-01-16 16:10:43 +01:00
H. Verbeet 92ab90eee8 wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x3pad(). 2007-01-16 16:10:34 +01:00
H. Verbeet 459e0bf633 wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x2pad(). 2007-01-16 16:10:23 +01:00
H. Verbeet 04144983eb wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texm3x2depth(). 2007-01-16 16:10:17 +01:00
H. Verbeet 1947b27380 wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texdp3(). 2007-01-16 16:10:07 +01:00
H. Verbeet 3cd84d9ab6 wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texdp3tex(). 2007-01-16 16:10:01 +01:00
H. Verbeet 0fcb682af6 wined3d: Rewrite pshader_glsl_texreg2rgb to properly take the write mask into account.
Use shader_glsl_get_sample_function() rather than having the instruction handler figure it out itself.
Get rid of shader_glsl_add_dst_old().
2007-01-16 16:09:50 +01:00
H. Verbeet 67e203215f wined3d: Split out getting the sample function and coordinate mask from shader_glsl_sample(). 2007-01-16 16:09:23 +01:00
H. Verbeet 54137bacfa wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texreg2gb(). 2007-01-16 16:09:09 +01:00
H. Verbeet 8325937ded wined3d: Pass the correct mask to shader_glsl_add_src_param() in pshader_glsl_texreg2ar.
Use the correct source swizzle.
2007-01-16 16:08:58 +01:00
H. Verbeet 7d07f31045 wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_dst(). 2007-01-16 16:08:35 +01:00
H. Verbeet 146093af33 wined3d: Rewrite shader_glsl_rcp() to properly take the write mask into account. 2007-01-16 16:08:19 +01:00
H. Verbeet 9857158a99 wined3d: Rewrite shader_glsl_expp() to properly take the write mask into account. 2007-01-16 16:08:08 +01:00
H. Verbeet 2c60906ec4 wined3d: Rewrite shader_glsl_cnd() to properly take the write mask into account.
Take the difference between ps 1.4 and earlier versions into account.
2007-01-16 16:07:56 +01:00
H. Verbeet 693b6ef876 wined3d: Rewrite shader_glsl_cmp() to properly take the write mask into account. 2007-01-16 16:07:44 +01:00
H. Verbeet 1414d75a3f wined3d: Rewrite shader_glsl_lrp() to properly take the write mask into account, use the GLSL mix instruction. 2007-01-16 16:07:35 +01:00
H. Verbeet e0588e7475 wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_lit(). 2007-01-16 16:07:15 +01:00
H. Verbeet cb5c47f8fe wined3d: Rewrite shader_glsl_mov() to properly take the write mask into account.
In case of writing to an address register round the source.
2007-01-16 16:07:05 +01:00
H. Verbeet 9425aef623 wined3d: Rewrite pshader_glsl_dp2add() to properly take the write mask into account. 2007-01-16 16:06:37 +01:00
H. Verbeet f3a4d35dee wined3d: Rewrite shader_glsl_dot() to properly take the write mask into account. 2007-01-16 16:06:25 +01:00
H. Verbeet b3ff0c3703 wined3d: Rewrite shader_glsl_map2gl() to properly take the write mask into account. 2007-01-16 16:06:11 +01:00
H. Verbeet 7252b4d340 wined3d: Give WINED3DSIO_CRS its own function, properly take the write mask into account. 2007-01-16 16:05:49 +01:00
H. Verbeet b557a8021a wined3d: Move WINED3DSIO_SGE & WINED3DSIO_SLT from shader_glsl_map2gl() to shader_glsl_compare() where they belong.
Properly take the write mask into account
2007-01-16 16:04:18 +01:00
H. Verbeet e0f0bf1d08 wined3d: Rewrite shader_glsl_mad() to properly take the write mask into account. 2007-01-16 16:03:59 +01:00
H. Verbeet b0fd23e844 wined3d: Rewrite shader_glsl_arith() to properly take the write mask into account. 2007-01-16 16:03:50 +01:00
H. Verbeet 4452120007 wined3d: Rewrite shader_glsl_sincos() to properly take the write mask into account.
The write mask can only be one of .x, .y, .xy
2007-01-16 16:03:38 +01:00
H. Verbeet dc0d2a27f1 wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_get_register_name(). 2007-01-16 16:03:25 +01:00
H. Verbeet b8bc92dc7b wined3d: Pass a mask to shader_glsl_add_src_param(). 2007-01-16 16:03:15 +01:00