Henri Verbeet
3e035ddf05
wined3d: Don't leak memory on failure in allocate_shader_constants().
2008-12-12 11:40:44 +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
fef73782ce
WineD3D: Abstract some ATIfs op debug TRACEs.
...
It makes the code more readable and will help us to merge the ALPHAOP
and COLOROP code.
2008-12-11 14:07:21 +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
441f515d08
wined3d: Don't trace the shader if nobody's looking.
2008-12-11 12:14:55 +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
9541c346b3
wined3d: Remove some more unused code.
2008-12-11 12:14:40 +01:00
Henri Verbeet
15d497cb26
wined3d: baseShader.functionLength should be 0 when a NULL pFunction is passed.
2008-12-11 12:14:36 +01:00
Henri Verbeet
a2f259afff
wined3d: Get rid of the "len" variable in shader_trace_init().
2008-12-11 12:14:30 +01:00
Henri Verbeet
b409061337
wined3d: Make some constant arrays also static.
...
As pointed out by Dan Kegel.
2008-12-10 10:50:37 +01:00
Henri Verbeet
bcf0b4b128
wined3d: Compare & copy with the correct clipplane size in IWineD3DStateBlockImpl_Capture().
2008-12-10 10:50:30 +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
4aeaba0d29
wined3d: Use the actual fixup for the stage in gen_ati_shader().
...
This fixes a regression introduced by commit
89139b7589
.
2008-12-10 10:50:18 +01:00
Henri Verbeet
ce4d03318b
wined3d: Fix some spelling errors.
2008-12-09 11:27:51 +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
acbdd807b6
wined3d: Don't leak memory in IWineD3DPixelShaderImpl_GenerateShader().
...
This fixes a regression introduced by commit
0bf32b12f5
.
2008-12-09 11:27:02 +01:00
Henri Verbeet
f1f62fb5ce
wined3d: Remove some unused code.
2008-12-09 11:26:49 +01:00
Andrew Talbot
c3cdc671a4
wined3d: Remove unneeded address-of operators from array names.
2008-12-08 22:03:06 +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
9887d66dad
wined3d: Return early from shader_trace_init() when a NULL pFunction is passed.
...
This is mainly to reduce the size and indentation level of the if-block.
2008-12-08 12:28:27 +01:00
Henri Verbeet
e18629bedd
wined3d: Explicitly pass the shader version to shader_skip_unrecognized().
2008-12-08 12:28:20 +01:00
Henri Verbeet
6e677775ce
wined3d: Explicitly pass the shader version to shader_get_param().
2008-12-08 12:28:17 +01:00
Henri Verbeet
afd5a53bd0
wined3d: Load texture coordinates from the correct streams.
...
This fixes a regression introduced by commit
a2febdd200
.
2008-12-08 12:28:11 +01:00
Henri Verbeet
0c954ef743
wined3d: Explicitly pass the shader version to shader_dump_param() and shader_dump_arr_entry().
2008-12-05 11:59:09 +01:00
Henri Verbeet
71a8a77cf9
wined3d: Explicitly pass the shader version to shader_dump_decl_usage().
2008-12-05 11:59:06 +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
af1bc3d9ed
wined3d: Remove a redundant condition in shader_get_opcode().
2008-12-05 11:58:58 +01:00
Henri Verbeet
a2febdd200
wined3d: Slightly improve drawStridedSlow() performance.
...
This moves a couple of checks outside of the main drawing loop, since
they're not going to change anyway.
2008-12-05 11:58:53 +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
Chris Robinson
7806e4d85a
wined3d: Make sure a context is set for query object generation.
2008-12-03 10:59:49 +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
Alexandre Julliard
9c306e9871
wined3d: Make some functions and variables static.
2008-12-02 15:31:17 +01:00
Andrew Talbot
33e0d1610a
wined3d: Sign-compare warnings fix.
2008-12-02 14:12:39 +01:00
Henri Verbeet
92b93172df
wined3d: Remove some unused code.
2008-12-02 14:04:40 +01:00
Henri Verbeet
89241081f6
wined3d: IWineD3DBaseTexture and IWineD3DResource don't need Vtbl's.
2008-12-02 14:04:27 +01:00
Henri Verbeet
5532c990b6
wined3d: Const correctness fixes.
2008-12-02 14:04:15 +01:00