Commit Graph

2943 Commits

Author SHA1 Message Date
Henri Verbeet d8a4cc6648 wined3d: Remove IWineD3DVertexDeclarationImpl_GetDeclaration().
It's never used.
2009-03-27 15:51:25 +01:00
Henri Verbeet d7c7c76850 wined3d: Use separate structures for ddraw style strided data and wined3d's internal stream info. 2009-03-27 15:51:25 +01:00
Henri Verbeet 5390628e6f wined3d: Make sure the format actually exists in init_format_texture_info(). 2009-03-27 15:51:24 +01:00
Henri Verbeet 837f163662 wined3d: Create a separate function for setting a format's GL texture info. 2009-03-27 15:50:24 +01:00
Henri Verbeet b8f25ef6f2 wined3d: Create a separate function for setting format fixups. 2009-03-27 15:50:16 +01:00
Henri Verbeet 7874a6b74b wined3d: Create a separate function for checking a format's FBO compatibility. 2009-03-27 15:50:08 +01:00
Henri Verbeet 1407bd6b1a wined3d: Create a separate function for setting basic format info. 2009-03-27 11:23:41 +01:00
Henri Verbeet c0c1c42288 wined3d: Pass the number of components to glVertexBlendARB(). 2009-03-26 14:48:16 +01:00
Henri Verbeet 663e5a6a4c wined3d: Simplify the "transformed" check in state_lighting().
It doesn't really matter if lighting is enabled or not if we don't have
position data.
2009-03-26 14:48:10 +01:00
Henri Verbeet a7d6128547 wined3d: Simplify IWineD3DDeviceImpl_ProcessVertices(). 2009-03-26 14:48:04 +01:00
Henri Verbeet c1a42ff024 wined3d: Simplify remove_vbos(). 2009-03-26 14:47:58 +01:00
Henri Verbeet 6afd97cc9f wined3d: Remove unused attributes from WineDirect3DVertexStridedData.
These are essentially unused, and mostly just complicate the code.
2009-03-26 14:47:52 +01:00
Henri Verbeet 25b60e168a wined3d: Do the ffp_valid check before even trying to use the element. 2009-03-25 11:12:55 +01:00
Henri Verbeet 4469fbd43d wined3d: Don't use rtInternal for surfaces that are on a swapchain.
These surfaces won't be attached to an FBO anyway, so avoid the cost of a
potential format conversion when blitting from a non-RT surface. This is
mostly an issue for ddraw applications with 16 bit render targets.
2009-03-25 11:12:49 +01:00
Henri Verbeet 899df56ebe wined3d: Add a more convenient way to check if a surface is on a swapchain.
This won't help if we actually need the swapchain, of course.
2009-03-25 11:12:40 +01:00
Henri Verbeet 42e31a4242 wined3d: Fix a few sign compare warnings. 2009-03-25 11:12:30 +01:00
Henri Verbeet 59c5962828 wined3d: Make the texunit field in struct stb_const_desc unsigned. 2009-03-25 11:12:13 +01:00
Henri Verbeet 771fe7fd8a wined3d: Implement WINED3DTSS_TCI_SPHEREMAP. 2009-03-25 11:12:07 +01:00
Henri Verbeet 3234a4af2d wined3d: Reduce the number of checkGLcall's in tex_coordindex() a bit. 2009-03-25 11:12:02 +01:00
Henri Verbeet 61cd872fa7 wined3d: Print a FIXME in tex_coordindex() when NV_TEXGEN_REFLECTION isn't supported. 2009-03-25 11:11:57 +01:00
Henri Verbeet f63313fe3e wined3d: Fix the indentation in tex_coordindex().
The indentation here is pretty horrible. Also removes a couple of fairly
useless comments.
2009-03-25 11:11:32 +01:00
Henri Verbeet 8255dde127 wined3d: Print a warning when the stage isn't mapped to a valid texture unit in tex_coordindex(). 2009-03-25 11:11:24 +01:00
Henri Verbeet afc5744e70 wined3d: Pass format_desc to set_shader().
This should be the last unnecessary getFormatDescEntry() call.
2009-03-24 12:57:45 +01:00
Henri Verbeet dd1f0d9c48 wined3d: Pass format_desc to getColorBits() and getDepthStencilBits(). 2009-03-24 12:57:38 +01:00
Henri Verbeet a02d801888 wined3d: Pass format_desc to the Check*Capability() function.
Rather than looking it up all the time.
2009-03-24 12:57:31 +01:00
Henri Verbeet b7744f8158 wined3d: Remove the bytesPerPixel field from IWineD3DSurfaceImpl and IWineD3DVolumeImpl.
We can use the information from format_desc instead.
2009-03-24 12:57:21 +01:00
Henri Verbeet a56a143461 wined3d: Set the byte count for WINED3DFMT_UNKNOWN to 0.
As far as I can tell nothing depends on this being 1, and there's some code
that checks for WINED3DFMT_UNKNOWN and uses 0 for the byte count in that case.
2009-03-24 12:57:12 +01:00
Henri Verbeet 8ce2506aa8 wined3d: Try to make Coverity shut up (CID 863, 905).
Comparing gl_shaders against NULL after potentially dereferencing it a few
lines earlier probably confuses Coverity. Checking num_gl_shaders instead
should avoid this.
2009-03-24 12:56:19 +01:00
Henri Verbeet 1f4e7b27ed wined3d: Set the currently active context to NULL when it's destroyed.
This should make us crash when trying to use the "currently active" context
after it has been destroyed, rather than messing around with freed memory.
2009-03-23 14:08:02 +01:00
Henri Verbeet 89721c2173 wined3d: Compare the actual formats. 2009-03-23 14:08:02 +01:00
Henri Verbeet 24a4503d61 wined3d: Unload resources on Uninit3D().
This should prevent destroying GL objects without a GL context. Eg. when a ddraw
surface has a GL texture and is released after a call to Uninit3D().
2009-03-23 14:07:48 +01:00
Roderick Colenbrander 4544efc972 wined3d: Add a classic WGL pixel format backend as not all OpenGL implementations support WGL_ARB_pixel_format.
This should help for instance VirtualBox.
2009-03-23 13:25:50 +01:00
Roderick Colenbrander 9181ddcd16 wined3d: Add WGL_ARB_pixel_format detection.
Right now we assume that the extension is there but this isn't always
the case. The next patch in this series will add a
non-WGL_ARB_pixel_format codepath to help VirtualBox and others.
2009-03-23 13:25:17 +01:00
Henri Verbeet 2dc7fc2916 wined3d: Remove the format field from IWineD3DResourceClass. 2009-03-13 11:29:19 +01:00
Henri Verbeet a56e3a102b wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry(). 2009-03-13 11:29:10 +01:00
Henri Verbeet 53bf5c2658 wined3d: Add fields from StaticPixelFormatDesc to struct GlPixelFormatDesc.
The idea here is that we should lookup format information in struct
GlPixelFormatDesc, while StaticPixelFormatDesc and GlPixelFormatDescTemplate
will only be used to build the table.
2009-03-13 11:29:01 +01:00
Henri Verbeet fbfc7c9742 wined3d: Remove the width and height fields from IWineD3DTextureImpl. 2009-03-13 11:28:55 +01:00
Henri Verbeet a3657c164d wined3d: Remove some redundant fields from struct glDescriptor. 2009-03-13 11:28:50 +01:00
Henri Verbeet a139683a60 wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl. 2009-03-13 11:28:45 +01:00
Henri Verbeet e56a4cb799 wined3d: Also change the resource's format desc in IWineD3DBaseSurfaceImpl_SetFormat(). 2009-03-13 11:28:40 +01:00
Henri Verbeet e3bcc7544c wined3d: Remove the shader_color_fixup field from IWineD3DBaseTextureClass.
This is redundant now.
2009-03-12 13:09:55 +01:00
Henri Verbeet 1dcf222ab2 wined3d: Get rid of some calls to getFormatDescEntry().
Use the format description stored in the resource instead.
2009-03-12 13:09:55 +01:00
Henri Verbeet 38178541b0 wined3d: Store a pointer to the format description in the resource.
The goal is to eventually use a pointer to the format description in most
places where we currently use WINED3DFORMAT. IWineD3DSurfaceImpl for example
has copies of several fields from the format description, but also needs to
lookup the format description itself in several places.
2009-03-12 13:09:55 +01:00
Henri Verbeet 81075d2db3 wined3d: Remove a redundant check.
This is redundant now, InitAdapters() will only be called once for each
IWineD3DImpl object, as pointed out by Allan Tong.
2009-03-12 13:09:55 +01:00
Henri Verbeet e4ea7976a5 wined3d: Remove an unused field. 2009-03-12 13:09:55 +01:00
Henri Verbeet 2219749ae9 wined3d: Explicitly pass the texUnitMap to shader_glsl_load_vsamplers() and shader_glsl_load_psamplers().
The general idea here is to reduce dependencies on the entire stateblock, and
pass the real dependencies explicitly. This should make it clearer what
context a shader really needs.
2009-03-12 13:09:55 +01:00
Henri Verbeet 40d4f9b7ec wined3d: Don't leak WineD3DAdapter.cfgs. 2009-03-11 13:03:32 +01:00
Henri Verbeet ddae14169b wined3d: Get rid of the PUSH1 macro. 2009-03-11 13:03:32 +01:00
Henri Verbeet 2cc43393f0 wined3d: The adapters array should be owned by IWineD3DImpl. 2009-03-11 13:03:32 +01:00
Henri Verbeet 3644a7f6d7 wined3d: Free the logo path when we're done with it. 2009-03-11 13:03:32 +01:00