Commit Graph

510 Commits

Author SHA1 Message Date
Stefan Dösinger a440051016 wined3d: Add a shader DLL init callback. 2008-03-25 19:49:17 +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 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 51a8162330 wined3d: Check pixel formats of the same pixel type. 2008-03-21 15:19:05 +01:00
Roderick Colenbrander d44c295651 wined3d: Check the render target capabilities of a resource type. 2008-03-17 11:42:19 +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 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 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
Stefan Dösinger 8c758a62e8 wined3d: Remove VBFLAG_LOAD. 2008-02-28 20:10:40 +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 825506d5ff wined3d: General cross format blitting infrastrucutre, R32F->R16F blits. 2008-02-26 11:31:19 +01:00
Stefan Dösinger 81de2fa10a wined3d: Add a test for the vFace register. 2008-02-15 09:40:03 +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 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 a0f2e6e55e wined3d: Move some UnLoad code to the base texture class. 2008-02-05 12:32:58 +01:00
Austin English 3471f841a1 wined3d: Spelling fixes. 2008-01-18 12:53:33 +01:00
Stefan Dösinger 09bf3d5aea wined3d: Keep track of shaders. 2008-01-14 15:20:42 +01:00
Stefan Dösinger e59ddb0ab1 wined3d: Add a new IWineD3DResource::UnLoad method. 2008-01-14 15:10:17 +01:00
Alexander Dorofeyev f5aaabd1f2 wined3d: Rewrite IWineD3DSurfaceImpl_BltOverride colorfill codepath. 2007-12-21 13:58:13 +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 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 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 df77e28854 wined3d: Implement D3DFMT_G16R16. 2007-12-18 14:08:18 +01:00
Stefan Dösinger 7f10ee453a wined3d: Use the adapter to read the display mode. 2007-12-11 12:14:35 +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 9bc6200ece wined3d: Add a method for querying the gl drawable size of rendertarget. 2007-12-04 14:32:39 +01:00
Stefan Dösinger 3cc253c557 wined3d: Enabling too many lights is silently ignored.
I'm resending this patch because my reply to Henri's concern came too late. 
Henri noted that I am enabling lights that do not exist. Existing tests show 
that if no light is assigned to the index, LightEnable creates a light with a 
set of default parameters, so the tests should be fine.

From 9ee4c61805b50886f79e87d744b52f27b7b00b4e Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan@codeweavers.com>
Date: Thu, 29 Nov 2007 13:22:47 +0100
Subject: [PATCH] WineD3D: Enabling too many lights is silently ignored

This patch adds tests for all d3d versions that show that Windows
pretends that enabling more lights than supported succeeds. D3D_OK is
returned, and the light is reported as enabled.

What is not tested in this patch is the rendering output of this
situation, thus the FIXME is still written.
2007-12-03 13:44:07 +01:00
Stefan Dösinger d09cbcec91 wined3d: Activate GL_ARB_texture_rectangle. 2007-11-29 13:36:55 +01:00
Alexandre Julliard 57d1548b51 wined3d: Add printf format checking to the shader_addline function and fix resulting warnings. 2007-11-28 13:40:29 +01:00
Stefan Dösinger 959212304d wined3d: Track vertex declaration changes on vertex shaders.
If an attribute has type D3DDECLTYPE_D3DCOLOR, the red and blue channels
are swizzled in the shader. Since the attribute is stored in the vertex
declaration and not the vertex shader, it can change by setting a new
vertex declaration. If this happens, we have to recompile the shader
with the swizzling of that specific attribute turned on or off.
2007-11-21 12:18:02 +01:00
Stefan Dösinger cfc5725760 wined3d: Move glsl shader destruction to the glsl shader backend. 2007-11-21 12:06:27 +01:00
Stefan Dösinger 1fc1fe3c6e wined3d: Use standard wine lists for the resource list. 2007-11-20 13:10:46 +01:00
Stefan Dösinger 7a97d4e2ec wined3d: Free the shader function when freeing the shader. 2007-11-20 13:02:07 +01:00
Stefan Dösinger bd97580683 wined3d: Move IUnknown functions to IWineD3DBaseShader. 2007-11-20 12:53:07 +01:00
Stefan Dösinger f13bb40671 wined3d: Do not call PreLoad in surface_download_data. 2007-11-16 13:23:02 +01:00
Stefan Dösinger 26f7eae9cf wined3d: Non power of two texture fixes. 2007-11-14 11:59:21 +01:00
Stefan Dösinger e4f8a2da2b wined3d: Depth stencil fixes. 2007-11-14 11:58:36 +01:00
Stefan Dösinger edb78187a9 wined3d: Hardcode local constants into the shader if possible. 2007-11-14 11:51:26 +01:00
Stefan Dösinger 6fd4f8f699 wined3d: Store integer uniform locations. 2007-11-09 12:32:02 +01:00
Stefan Dösinger bfec6c352d wined3d: Store the special uniforms' locations in the linked program. 2007-11-09 12:31:54 +01:00