Commit Graph

669 Commits

Author SHA1 Message Date
Henri Verbeet 457037f4de wined3d: Fix the value of HIGHEST_TRANSFORMSTATE.
The highest transform state should be 511.
2009-01-02 11:52:02 +01:00
Henri Verbeet 3920d42f71 wined3d: Convert some BOOLs to bitfields in struct SAVEDSTATES. 2008-12-31 12:26:57 +01:00
Henri Verbeet 29a0d06518 wined3d: Convert some BOOLs to bitfields in struct IWineD3DDeviceImpl.
Also fills a 3 byte hole.
2008-12-31 12:26:33 +01:00
Henri Verbeet 3f12f59aa4 wined3d: Convert some BOOLs to bitfields in struct WineD3DContext.
Also happens to fill two 3 byte holes.
2008-12-31 12:26:23 +01:00
Henri Verbeet 813c7ed202 wined3d: Remove an unused field from the device. 2008-12-31 12:26:02 +01:00
Henri Verbeet 2b926db50d wined3d: Make use_vs() and use_ps() work on a stateblock instead of a device.
Most callers work on a stateblock rather than a device, and the main fields
we check (vertexShader and pixelShader) are part of the stateblock as well.
2008-12-31 12:25:56 +01:00
Henri Verbeet 6f5af4047f wined3d: Get rid of the glname field in struct SHADER_OPCODE.
It's only used for shader_hw_map2gl() and vshader_hw_rsq_rcp(), and we
can handle those the same way we handle the GLSL equivalents.
2008-12-30 11:36:35 +01:00
Maarten Lankhorst 4eca43e702 winex11.drv/wined3d: Fix tsx11 calling convention. 2008-12-23 12:51:44 +01:00
Henri Verbeet 4a19d893e5 wined3d: Only apply shader constants that changed.
This improves performance a bit for applications that use a lot of
shaders with a lot of constants.
2008-12-20 11:11:45 +01:00
Stefan Dösinger 690cbe76ac wined3d: Make pixelshaders disable fog properly.
This is a first step towards cleaning up the fog mess. The fog
parameter is added to the pixelshader compile args structure. That way
multiple pshaders are compiled for different fog settings, and the
pixel shader can remove the fog line if fog is not enabled. That way
we don't need special fog start and end settings, and this allows us
to implement EXP and EXP2 fog in the future too.
2008-12-19 17:17:16 +01:00
Stefan Dösinger 61e581abb4 wined3d: Pass the ps_compile_args structures to the shader generation code. 2008-12-19 17:16:39 +01:00
Henri Verbeet d099dde7a9 wined3d: Track shader constants in the shader backend. 2008-12-18 13:17:02 +01:00
Henri Verbeet 73823ef5f6 wined3d: Remove the shader_cleanup() method from the shader backend. 2008-12-17 14:02:24 +01:00
Henri Verbeet 4adb342327 wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice. 2008-12-17 14:02:03 +01:00
Stefan Dösinger 31da3c0578 wined3d: Emulate GL_EXT_fog_coord. 2008-12-16 14:34:11 +01:00
Stefan Dösinger 0dc0444c14 wined3d: Reinstall the G16R16F format surface load fixup.
We cannot remove this because we still have to load the surface as
RGB. The shader may take care of setting the blue channel to 1.0 now,
but we still get the red and green channels loaded incorrectly if we
don't insert a blue channel before loading.
2008-12-16 14:32:11 +01:00
Stefan Dösinger 199a3468bf wined3d: Fake GL_ARB_multitexture. 2008-12-16 14:31:25 +01:00
Henri Verbeet f3743fb402 wined3d: Shaders will never have a NULL function. 2008-12-16 12:52:04 +01:00
Henri Verbeet 8553665cb1 wined3d: Move the shader version to reg_maps. 2008-12-15 14:00:26 +01:00
Henri Verbeet 7d29aecd6f wined3d: Use a simpler way to calculate the number of texture levels.
It's probably slightly faster too.
2008-12-12 11:40:39 +01:00
Henri Verbeet 70ed814b95 wined3d: Get rid of the textureDimensions field in the state block. 2008-12-12 11:40:32 +01:00
Henri Verbeet f36c377d0e wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not the specific type. 2008-12-12 11:40:26 +01:00
Henri Verbeet fb475c7c29 wined3d: Don't reparse the entire shader just to update the sampler types. 2008-12-12 11:40:20 +01:00
Stefan Dösinger f2f90b6965 wined3d: Fix ARG_UNUSED and use it properly.
That bug was uncovered by Henri's change of the bitfield sizes.
2008-12-11 14:07:31 +01:00
Stefan Dösinger 4916cd5478 wined3d: Don't load INT and BOOL constants needlessly. 2008-12-11 14:06:04 +01:00
Henri Verbeet 8124f5e14a wined3d: shader_trace_init() shouldn't have side effects.
This moves setting baseShader.hex_version and baseShader.functionLength to
shader_get_registers_used(), where it's more appropriate.
2008-12-11 12:14:50 +01:00
Henri Verbeet 4aa00e8a21 wined3d: Rename texture_stage_op.color_correction to texture_stage_op.color_fixup.
This is consistent with other uses of struct color_fixup_desc.
2008-12-10 10:50:24 +01:00
Henri Verbeet 50a87e23e7 wined3d: Fix the IWineD3DVertexShader and IWineD3DPixelShader IUnknown methods.
IWineD3DVertexShader isn't supposed to implement IWineD3DPixelShader.
2008-12-09 11:27:32 +01:00
Henri Verbeet 4997bee1bf wined3d: Add functions to initialize and free shader buffers. 2008-12-09 11:27:13 +01:00
Henri Verbeet 5ad3bbabda wined3d: Avoid disabling numbered arrays if we're going to enable them afterwards anyway. 2008-12-08 12:28:31 +01:00
Henri Verbeet a13df0e4ef wined3d: Explicitly pass the version and instruction table to shader_get_opcode(). 2008-12-05 11:59:02 +01:00
Henri Verbeet 74acbf9c16 wined3d: Get rid of vcheckGLcall.
Everywhere it's used a regular checkGLcall will do just as well.
2008-12-04 12:00:29 +01:00
Stefan Dösinger e04556bb16 wined3d: Fix D3DFMT_R32F, R16F, G16R16F, ... in the pixel shader.
This allows us to drop the load time conversion and the clear
readback hack and replaces it with a color fixup in the fixed
function pipeline replacement.
2008-12-04 12:00:15 +01:00
Henri Verbeet 89139b7589 wined3d: Make shader texture format fixups more generic.
Based on a patch by Stefan Dösinger. This is more flexible, and allows
the shader backend implementation to be simpler, since it doesn't have
to know about specific formats. The next patch makes use of this.
2008-12-04 11:59:58 +01:00
Henri Verbeet 9f2fa8ba25 wined3d: Remove sampled_format from IWineD3DBaseShaderClass, it isn't used anywhere. 2008-12-04 11:59:14 +01:00
Henri Verbeet b451048eb7 wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Alexandre Julliard 6800d3dbb7 wined3d: Fix some macros definitions to make them proper C statements. 2008-12-03 10:03:45 +01:00
Henri Verbeet 5284fce1ac wined3d: Disable checkGLcall when WINE_NO_DEBUG_MSGS is specified. 2008-12-03 09:49:14 +01:00
Henri Verbeet 70968e69ac wined3d: Use a bitmask to store which bool and int constants are set.
Note that constants_set was never actually NULL for
shader_glsl_load_constantsB() and shader_glsl_load_constantsI().
2008-12-03 09:49:10 +01:00
Henri Verbeet 0ae60765de wined3d: Make functions static where possible. 2008-12-03 09:47:35 +01:00
Henri Verbeet 2acf8d7947 wined3d: Rename resource functions to reflect that they're not COM functions. 2008-12-03 09:47:26 +01:00
Henri Verbeet 4d60b6633c wined3d: Rename basetexture functions to reflect that they're not COM functions. 2008-12-03 09:47:16 +01:00
Henri Verbeet 92b93172df wined3d: Remove some unused code. 2008-12-02 14:04:40 +01:00
Henri Verbeet 5532c990b6 wined3d: Const correctness fixes. 2008-12-02 14:04:15 +01:00
Henri Verbeet 7c0cb8c0c3 wined3d: Const correctness fixes for state.c. 2008-12-02 14:04:08 +01:00
Henri Verbeet 50ebf26894 wined3d: Const correctness fixes for directx.c. 2008-12-01 12:45:10 +01:00
Henri Verbeet c7880e8916 wined3d: Make minMipLookup_noFilter and magLookup_noFilter const.
Note that minMipLookup and magLookup aren't particularly safe to use,
they're global arrays initialized from IWineD3DImpl_FillGLCaps(). The same
goes for the other global dynamic lookup tables.
2008-11-28 12:53:57 +01:00
Henri Verbeet fecfddfb3a wined3d: Const correctness fixes for glsl_shader.c. 2008-11-26 12:05:21 +01:00
Henri Verbeet d8f6e63541 wined3d: Const correctness fixes for arb_program_shader.c. 2008-11-26 12:05:14 +01:00
Henri Verbeet cfb3bea895 wined3d: Make the SHADER_OPCODE_ARG parameter to shader handlers const. 2008-11-26 12:05:06 +01:00