Henri Verbeet
c697bdc3a1
wined3d: Remove some code that doesn't make a whole lot of sense.
...
The "instr" parameter to shader_glsl_gen_modifier() is actually a source
parameter, so comparing against WINED3DSIO_TEXKILL is just silly.
2009-04-02 16:28:29 +02:00
Henri Verbeet
c3a01b315e
wined3d: Use a more reasonable name for "SHADER_OPCODE_ARG".
2009-04-01 14:24:19 +02:00
Henri Verbeet
ec43489e10
wined3d: Don't use the opcode_token field in the GLSL backend.
...
The idea is that we want to prevent backends from parsing the tokens
themselves, which is pretty much a requirement for adding SM4 support.
2009-04-01 14:23:56 +02:00
Tobias Jakobi
38239be58c
wined3d: GLSL: Implement texrect coord fixup.
2009-03-31 12:40:21 +02:00
Henri Verbeet
42e31a4242
wined3d: Fix a few sign compare warnings.
2009-03-25 11:12:30 +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
67da604eca
wined3d: Get rid of a few stack buffers.
2009-03-10 12:07:02 +01:00
Henri Verbeet
1fa83c95de
wined3d: Don't call shader_glsl_append_dst() from shader_glsl_texldl().
...
shader_glsl_gen_sample_code() already takes care of adding the destination.
2009-03-10 12:06:47 +01:00
Henri Verbeet
695c69f6a0
wined3d: Use shader_glsl_get_write_mask_size() to calculate the write mask size.
2009-03-09 14:39:48 +01:00
Henri Verbeet
4ff5736edf
wined3d: Don't compare texUnitMap entries to -1.
2009-03-09 14:39:34 +01:00
Henri Verbeet
703ef0de02
wined3d: Use flags for shader_glsl_get_sample_function().
...
Having three BOOL parameters looks a bit awkward.
2009-03-04 12:07:20 +01:00
Stefan Dösinger
8781174a98
wined3d: Create a common sampling function in GLSL.
...
This way the individual instruction handlers don't have to bother about the
color correction, and there's now a single place to implement fixup dependent
sampling writemask selection.
2009-02-27 13:14:46 +01:00
Stefan Dösinger
d7a6859960
wined3d: Make shader_glsl_get_sample_function aware of *Lod functions.
2009-02-27 13:14:33 +01:00
Stefan Dösinger
5cf764aec2
wined3d: Put the color_correction calls into the instruction handlers.
...
The color correction cannot be done behind the back of the individual
instruction handlers because it might conflict with the instruction's
color modifications and the D3D provided writemask.
2009-02-27 13:14:23 +01:00
Francois Gouget
83d18602d8
wined3d: Add a trailing '\n' to shader_addline() calls.
2009-02-12 17:53:35 +01:00
Stefan Dösinger
66778ed9ec
wined3d: Implement EXP and EXP2 fog in GLSL.
2009-02-11 12:21:51 +01:00
Stefan Dösinger
693d9ded47
wined3d: Properly set the fog frag coord according to the FOGTABLEMODE.
...
This also fixes the test that an earlier patch broke, so the todo_wine can be
removed again.
2009-02-11 12:21:44 +01:00
Stefan Dösinger
8dcd51286d
WineD3D: Put vertex shader duplication infrastructure in place.
2009-02-11 12:21:25 +01:00
Michael Stefaniuc
118c75a8c7
wined3d: Remove superfluous pointer casts.
2009-02-03 12:40:14 +01:00
Stefan Dösinger
3c3272dc41
wined3d: Don't single-allocate new gl shaders.
2009-01-20 12:45:09 +01:00
Henri Verbeet
5d875906c1
wined3d: Remove some superfluous pointer casts.
2009-01-20 12:34:05 +01:00
Stefan Dösinger
7c21147dcd
wined3d: Remove the pixelshader fogstart/fogend optimization.
2009-01-12 13:01:49 +01:00
Henri Verbeet
6791e6b752
wined3d: Simplify handling of swizzled attributes.
...
This should also be a little bit faster.
2009-01-08 13:21:43 +01:00
Henri Verbeet
3c14b3936f
wined3d: Don't bother with the GLSL info log if nobody's looking.
2009-01-03 14:55:30 +01:00
Henri Verbeet
2e0212e998
wined3d: Fix the line number for some fglrx spam.
...
We added a #version line a while ago, so the line number for the
warning changed.
2009-01-03 14:55:30 +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
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
7d92b54a97
wined3d: Use the ps_compile_args struct in glsl.
2008-12-19 17:17:04 +01:00
Stefan Dösinger
30d542c3dd
wined3d: Make use of the ps_compile_args structure in glsl_shader.
...
Only a first step, many more occasions need fixing. This is an easy
one though.
2008-12-19 17:16:50 +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
8553665cb1
wined3d: Move the shader version to reg_maps.
2008-12-15 14:00:26 +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
b409061337
wined3d: Make some constant arrays also static.
...
As pointed out by Dan Kegel.
2008-12-10 10:50:37 +01:00
Henri Verbeet
4997bee1bf
wined3d: Add functions to initialize and free shader buffers.
2008-12-09 11:27:13 +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
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
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
Andrew Talbot
89509eb628
wined3d: Sign-compare warnings fix.
2008-12-01 14:25:52 +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
Henri Verbeet
eb78c2a082
wined3d: Const correctness fixes for utils.c.
2008-11-26 12:04:56 +01:00
Stefan Dösinger
2f98fce9cf
wined3d: Put the ps compile parameters into the glsl program hashmap.
...
This avoids the double search for a pixel shader. The pixel shader
compilation parameter structure is recorded in the GLSL program
hashmap, together with the WineD3D pixel shader.
2008-11-25 13:07:23 +01:00
Stefan Dösinger
0bf32b12f5
wined3d: Add the ability to duplicate GL pixel shaders.
...
Some stateblock parameters have to be compiled into the GL pixel
shader code, like lines for pixelformat fixups. This leads to problems
when applications switch those settings, requiring a recompilation of
the shader. This patch enables wined3d to have multiple GL shaders for
a D3D shader(pixel shaders only so far) to handle this more
efficiently.
2008-11-25 13:07:03 +01:00
Stefan Dösinger
aed9305c78
wined3d: Store shader IDs in the vs and ps impl structures.
2008-11-25 13:06:45 +01:00
Stefan Dösinger
dd8905543b
wined3d: Pass some stateblock values around directly.
...
This was suggested by Ivan quite a while ago, and we need it to better
handle conflicting texture format corrections and similar stateblock
value changes which until now required a recompilation of the entire
shader
2008-11-25 13:06:35 +01:00
Stefan Dösinger
ff767f4984
wined3d: Make the shader backend call CompileShader.
...
A number of considerations contribute to this:
1) The shader backend knows best which shader(s) it needs. GLSL needs
both, arb only one
2) The shader backend may pass some parameters to the compilation
code(e.g. which pixel format fixup to use)
3) The structures used in (2) are different in vs and ps, so a
baseshader::Compile won't work
4) The structures in (2) are wined3d-private structures, so
having a public method in the vtable won't work(its a bad idea
anyway).
2008-11-25 13:06:23 +01:00
Stefan Dösinger
620a423b22
wined3d: Kill the GL_ATI_envmap_bumpmap code.
...
GL_ATI_envmap_bumpmap provides two things: Signed V8U8 pixel formats,
and bump mapping. The extension is only supported on fglrx, and this
driver also supports GL_ARB_fragment_program. Thus the bump mapping
code is never used on any driver out there. Furthermore, if it is
used, it tends to crash the driver
The signed pixel format is used, as it can be used by pixel shaders or
the ARBfp replacement. However, the format is broken in fglrx, and
negative values are clamped to 0.0. This results in test
failures. WineD3D has an alternative codepath using scale+bias to
enable V8U8 using a standard signed RGB which works correctly on
fglrx.
2008-11-04 11:41:14 +01:00
Henri Verbeet
dfde4c91e0
wined3d: vertexshader should never be NULL in generate_param_reorder_function() (LLVM/Clang).
2008-11-03 11:49:41 +01:00
Henri Verbeet
795c4a77aa
wined3d: Handle projected cube textures.
2008-10-29 11:52:11 +01:00
Henri Verbeet
b33ddbde6a
wined3d: Support some more texture types for GLSL depth blts.
2008-10-28 12:33:36 +01:00
Henri Verbeet
437b342424
wined3d: Pass explicit texcoords to depth blt.
2008-10-28 12:33:27 +01:00
Henri Verbeet
57401fcab2
wined3d: Pass the texture type to the shader depth blt function.
2008-10-28 12:33:18 +01:00
Tobias Jakobi
e79d89ff40
wined3d: Fix some typos.
2008-10-21 11:53:40 +02:00
Henri Verbeet
bf187ed1e0
wined3d: Set the sampler only once in shader_glsl_select_depth_blt().
...
It (obviously) never changes.
2008-10-20 12:23:26 +02:00
Alexandre Julliard
6cfef95ce7
wined3d: Convert source files to utf-8.
2008-10-18 19:21:20 +02:00
Henri Verbeet
3643d59d5b
wined3d: Make sure some variables are always initialized.
2008-10-09 12:14:26 +02:00
Henri Verbeet
5ba40c3d58
wined3d: Make some more GLSL functions private to the backend.
2008-09-24 12:53:23 +02:00
Henri Verbeet
2e76954097
wined3d: Move part of the shader instruction table to the backend.
2008-09-24 12:53:05 +02:00
Henri Verbeet
e2bc8dfe3b
wined3d: Use shader_glsl_log() in some more places.
2008-09-23 12:25:32 +02:00
Henri Verbeet
c2178eb64f
wined3d: Make some GLSL structs and functions private to the backend.
2008-09-16 22:33:35 +02:00
Henri Verbeet
4987ffff1f
wined3d: Correct a comment.
2008-09-10 12:03:48 +02:00
Stefan Dösinger
af8d268a39
wined3d: Handle projected textures properly in arbfp and atifs.
...
GL_ARB_fragment_program and GL_ATI_fragment_shader can disable
projected textures properly, and they can also handle
D3DTTFF_PROJECTED | D3DTTFF_COUNT3 properly.
2008-08-28 11:24:49 +02:00
Stefan Dösinger
c38b2fe09e
wined3d: Filter out more spam.
2008-08-21 13:34:23 +02:00
Stefan Dösinger
bfe7067973
wined3d: Ask the ffp/shader/blit implementation about format support.
...
If a format is not supported natively by opengl, a shader may be able
to convert it. Up to now, CheckDeviceFormat had magic knowldge which
GL extensions lead to which supported format. This patch adds
functions that allow CheckDeviceFormat to ask the actual
implementation for its capabilities.
2008-08-20 12:26:02 +02:00
Francois Gouget
a793888a28
Assorted spelling fixes.
2008-08-04 13:04:48 +02:00
Stefan Dösinger
bc4435e406
wined3d: Use a hashmap to store the ffp shaders.
2008-07-31 13:01:50 +02:00
Stefan Dösinger
726d9d47af
wined3d: ATI2N support using GL_EXT_texture_compression_rgtc.
2008-07-24 11:56:42 +02:00
Stefan Dösinger
dc25a86cc5
wined3d: Support ATI's D3DFMT_ATI2N format.
...
This is an ATI specific format designed for compressed normal maps,
and quite a few games check for its existence. While it is an
ATI-specific "extension" in d3d9, it is a core part of
D3D10(DXGI_FORMAT_BC5), and supported on Geforce 8 cards.
2008-07-24 11:56:24 +02:00
Stefan Dösinger
e4078fb0ba
wined3d: Set ffp caps in the ffp backend, not the shader backend.
2008-07-11 14:32:53 +02:00
Stefan Dösinger
c48195e417
wined3d: Move shader_fragment_enable to the fragment pipeline implementation.
...
It isn't related to the shader backend any longer. The nvts_enable in
the ffp code isn't quite right as well, it should be moved away once
there is a dedicated nvts fragment pipeline replacement
2008-07-11 14:32:37 +02:00
H. Verbeet
b37cc08721
wined3d: Don't call shader_select() in depth_blt().
...
Calling shader_select() from inside depth_blt() isn't necessarily
safe. shader_select() assumes CompileShader() has been called for the
current shaders, but that depends on STATE_VSHADER / STATE_PIXELSHADER
being applied. That isn't always true when depth_blt() gets called,
with the result that sometimes GLSL programs could be created with no
shader objects attached.
2008-07-10 20:33:29 +02:00
H. Verbeet
54ae3ebfd4
wined3d: Destroy depth_blt resources in the backend's destructor.
...
No need to expose this in the interface.
2008-07-10 12:17:06 +02:00
H. Verbeet
a85a5ffb1b
wined3d: Store the glsl program lookup table in the backend's private data.
2008-07-09 10:42:57 +02:00
Stefan Dösinger
3a2743f25d
wined3d: Remove the state table from the shader backend.
2008-07-08 21:08:54 +02:00
Stefan Dösinger
2d7cdc3ec2
wined3d: Remove the DLL load init function.
2008-07-08 21:08:54 +02:00
H. Verbeet
a637fda7bf
wined3d: Store the current GLSL program in the backend's private data.
2008-07-08 10:47:30 +02:00
Andrew Talbot
6ced8a3f55
wined3d: Remove unneeded address-of operators from function names.
2008-07-07 12:32:39 +02:00
H. Verbeet
d76de4eede
wined3d: Specify the GLSL language version our shaders are written to.
...
This prevents some driver warnings when using language features from
1.20, like "first class arrays".
2008-07-01 12:26:05 +02:00
Francois Gouget
756b401f8d
wined3d: Add a trailing '\n' to a couple of shader_addline() calls.
2008-06-26 21:08:35 +02:00
H. Verbeet
a6fa6a4a31
wined3d: Use gl_Color and gl_SecondaryColor to support more varyings in SM3.0 shaders.
...
SM3.0 requires 10 4 component float varyings for passing stuff between
vertex and pixel shaders. GF7 and earlier report 8 generic varyings +
gl_Color and gl_SecondaryColor in GLSL. This patch allows us to use
gl_Color and gl_SecondaryColor to get 2 extra varyings, which some
games, like C&C3 with highest gfx settings, require.
2008-06-19 11:47:52 +02:00
Stefan Dösinger
cd7825c893
wined3d: Hardcode local constants with glUniform4fvARB.
2008-06-03 11:13:59 +02:00
Stefan Dösinger
e4413f2012
wined3d: Give local constants a shader type prefix.
2008-06-03 11:13:09 +02:00
Stefan Dösinger
9b25935757
wined3d: Fix DP2ADD in GLSL.
...
DP2ADD returns a scalar, and fglrx (correctly) complains that it can't
assign that to a 3 component vector.
2008-04-24 22:09:47 +02:00
Stefan Dösinger
bcb0f7cc22
wined3d: More fglrx spam.
2008-04-24 22:09:21 +02:00
Stefan Dösinger
e3bd5b6dcd
wined3d: Use the shader backend to enable / disable atifs and nvts.
...
The previous logic assumed that if NVTS or ATIFS are available they
will be used. This happens to be true for NVTS, but ATIFS is only used
if neither ARBFP nor GLSL are supported. This breaks fixed function
fragment processing on ATI r300 and newer cards
2008-04-24 11:37:17 +02:00
Austin English
c531e2abdb
Spelling fixes.
2008-04-23 12:31:07 +02:00
Austin English
6e59cd2c34
Spelling fixes.
2008-04-22 12:20:12 +02:00
Stefan Dösinger
b1d8af7926
wined3d: Update copyright lines.
2008-04-02 20:22:42 +02:00
Stefan Dösinger
a440051016
wined3d: Add a shader DLL init callback.
2008-03-25 19:49:17 +01:00
Stefan Dösinger
ac57b4e2f5
wined3d: Free shader private data on reset.
...
Since the shader backend implementations might track opengl resources in
their private data inform them about reset calls. For example, the atifs
backend keeps track of the replacement shaders, which are lost during an
opengl context recreation.
2008-03-25 19:48:14 +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
6d5f562dcf
wined3d: Move the shader backend selection into a separate function.
2008-03-25 19:36:13 +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
Francois Gouget
304b415284
Assorted spelling fixes.
2008-03-19 11:21:27 +01:00
Stefan Dösinger
8a3ef776f4
wined3d: gl_FragCoord isn't exact.
2008-03-07 11:01:07 +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
f912f18b13
wined3d: Move shader model private data into its own structure.
2008-02-26 11:31:39 +01:00
Stefan Dösinger
b1e1df5117
wined3d: Extend out anti-spam database a bit.
2008-02-18 13:34:01 +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
3d2aa7afa0
wined3d: De-Statify depth blit opengl resources.
2008-02-05 12:33:15 +01:00
Stefan Dösinger
4d0a609452
wined3d: Reset the shader state on shader_*_destroy.
2008-01-14 15:20:51 +01:00
Alexandre Julliard
9636c7fa0e
wined3d: Use unsigned int instead of size_t for the glsl mask size.
2008-01-07 17:17:27 +01:00
Stefan Dösinger
88f746ab0e
wined3d: Filter out some shader compilation spam.
2007-12-18 14:07:12 +01:00
Stefan Dösinger
8e036d6487
wined3d: Correct a pixel shader version comparison.
2007-12-18 13:23:09 +01:00
Francois Gouget
5f7a9cea38
Assorted spelling fixes.
2007-12-07 16:35:32 +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
0f39b29da0
wined3d: mov to a0.x does a floor(), not a round to nearest.
2007-12-03 13:43:54 +01:00
Stefan Dösinger
3fd0916654
wined3d: Make the code aware of GL_ARB_texture_rectangle.
2007-11-29 13:36:37 +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
c66a3be49b
wined3d: Work around nvidia beta driver bug.
2007-11-28 13:40:28 +01:00
Stefan Dösinger
afb06a1184
wined3d: Bool constants aren't vectors.
2007-11-21 12:18:09 +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
9f41a359b6
wined3d: Partially revert "Get rid of the conditionals in shader_glsl".
2007-11-14 11:58:22 +01:00
Stefan Dösinger
ed7e520926
wined3d: Get rid of a few Nvidiaisms in glsl shaders.
2007-11-14 11:51:38 +01:00
Stefan Dösinger
edb78187a9
wined3d: Hardcode local constants into the shader if possible.
2007-11-14 11:51:26 +01:00
Francois Gouget
81a5701ca9
Assorted spelling fixes.
2007-11-09 13:07:12 +01:00
Stefan Dösinger
9fb70b99db
wined3d: Load GLSL sampler uniforms at shader link time.
2007-11-09 12:32:11 +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
Stefan Dösinger
98b291192f
wined3d: Get rid of the conditionals in shader_glsl_compare.
2007-11-08 12:17:54 +01:00
Stefan Dösinger
0183f3e305
wined3d: Avoid NOP additions.
2007-11-08 12:03:46 +01:00
Stefan Dösinger
6209b36acb
wined3d: mov to a0.x does a floor(), not a round to nearest.
2007-11-08 11:55:31 +01:00
Stefan Dösinger
468309e055
wined3d: Get rid of the conditionals in the glsl lit implementation.
2007-11-08 11:55:08 +01:00
Stefan Dösinger
aafcae4752
wined3d: Remove the conditional from texdepth.
2007-11-08 11:54:28 +01:00
Stefan Dösinger
1b23dd1ba1
wined3d: Implement the varying map.
2007-11-07 12:08:32 +01:00
Stefan Dösinger
409103f801
wined3d: Install a varying map.
2007-11-07 12:08:24 +01:00
Stefan Dösinger
3febe738ab
wined3d: Handle ps 3.0 varyings in a different way.
2007-11-06 13:34:57 +01:00
Stefan Dösinger
0615c8e454
wined3d: Pixel Shader varying indexing.
2007-11-06 13:34:40 +01:00
Stefan Dösinger
9a9dfc76cb
wined3d: Make pixel shader input an array.
2007-11-06 13:34:32 +01:00
Stefan Dösinger
672ed031ce
wined3d: Only glBindAttribLocation used attributes.
2007-11-06 13:34:26 +01:00
Stefan Dösinger
8f3accc718
wined3d: Care for the inverted y coords in dsy.
2007-10-22 15:59:04 +02:00
Stefan Dösinger
3f16f02940
wined3d: Nested loop support.
2007-10-04 12:03:59 +02:00
Stefan Dösinger
3c6d97278f
wined3d: Implement the vFace register.
2007-10-04 12:03:51 +02:00
Stefan Dösinger
3d3369a77c
wined3d: d3d ignores the sign of the input value in the log instruction.
2007-10-03 11:03:12 +02:00
Stefan Dösinger
6dc11616d5
wined3d: Take care against overwriting a source register in cmp.
2007-10-03 11:02:56 +02:00
Stefan Dösinger
9c6cdda147
wined3d: Reverse the position fixup if the pshader is reading vpos.
2007-10-03 11:02:48 +02:00
Francois Gouget
b2bc712323
Assorted spelling fixes.
2007-09-27 20:12:53 +02:00
Stefan Dösinger
6313e0ffff
wined3d: SRGB write correction emulation.
2007-09-24 13:30:30 +02:00
Stefan Dösinger
2b2c9199e8
wined3d: Unify pixel format correction.
2007-09-24 13:30:21 +02:00
Stefan Dösinger
1c4a15d2cd
wined3d: Recompile glsl pixelshaders if the sampler format changes.
2007-09-24 13:30:08 +02:00
Stefan Dösinger
10f25e0104
wined3d: Add signed format conversion for glsl.
2007-09-24 13:29:54 +02:00
Stefan Dösinger
d684c9c1a5
wined3d: Fix a typo in shader_glsl_cross.
2007-09-20 15:52:54 +02:00
Stefan Dösinger
02114ac21f
wined3d: The D3DSI_COISSUE flag changes the behavior of cnd.
2007-09-14 14:26:26 +02:00
Stefan Dösinger
8273cfdf01
wined3d: Fix texdp3tex in glsl.
2007-09-14 14:26:17 +02:00
Stefan Dösinger
7248354067
wined3d: Pixel shader 1.x constants are clamped to [-1;1].
2007-09-14 14:23:45 +02:00
Stefan Dösinger
bc69315f78
wined3d: texm3x3(v)spec normalizes the normal vector.
2007-09-13 11:38:46 +02:00
Stefan Dösinger
5ab9d85c39
wined3d: Implement texbeml.
2007-09-12 12:10:03 +02:00
Stefan Dösinger
422e0ba1cc
wined3d: texkill ignores the .w only in ps 1.x.
2007-09-11 13:48:08 +02:00
Stefan Dösinger
8656713366
wined3d: Implement texldb.
2007-09-11 13:47:58 +02:00
Stefan Dösinger
a006d2568b
wined3d: Fix texdepth instruction.
2007-09-11 13:47:49 +02:00
Stefan Dösinger
33ecb1db1a
wined3d: The temp vars are tmp0 and tmp1.
2007-08-31 12:08:57 +02:00
Stefan Dösinger
e7cbb340dc
wined3d: Remove stateblock::set.*.
2007-08-13 11:36:43 +02:00
H. Verbeet
1c14c180b7
wined3d: Implement dsx & dsy shader instructions.
2007-07-03 12:32:52 +02:00
Stefan Dösinger
a1f83aae8e
wined3d: rsq and rcp use the .w component if no swizzle is given.
2007-07-03 12:29:34 +02:00
H. Verbeet
973496d5e4
wined3d: Cleanup shader_glsl_load_psamplers().
2007-07-02 13:36:26 +02:00
H. Verbeet
1d4042cee1
wined3d: Implement texldl.
2007-06-28 11:01:15 +02:00
Michael Stefaniuc
0326da9dd5
wined3d: Remove superfluous casts of void pointers to other pointer types.
2007-06-27 12:53:37 +02:00
H. Verbeet
3ad03206ab
wined3d: Rename max_samplers to max_fragment_samplers.
2007-06-26 11:56:57 +02:00
H. Verbeet
2e786e09bb
wined3d: Use texture2D to sample in pshader_glsl_texdp3tex().
2007-06-21 13:10:32 +02:00
H. Verbeet
8311ff32a3
wined3d: Take the texUnitMap into account when loading shader_glsl_load_psamplers().
2007-06-13 11:23:06 +02:00
Stefan Dösinger
a460a2df43
wined3d: Store the gl information in a per adapter structure and initialize it only once.
2007-06-11 13:51:06 +02:00
H. Verbeet
c3c5724789
wined3d: WINED3DSIO_POW should use the absolute value of the first source register.
2007-05-11 13:24:15 +02:00
H. Verbeet
89245248c7
wined3d: Handle the ps_3_0 vPos field.
2007-05-04 13:41:54 +02:00
H. Verbeet
a79654d339
wined3d: Fix some swizzles on scalars.
2007-04-13 12:56:06 +02:00
Fabian Bieler
0ce39d5869
wined3d: Fix GLSL cnd instruction.
...
According to MSDN the cnd instruction should translate:
dst = src0 > 0.5 ? src1 : src2;
2007-04-05 10:55:00 +02:00
Fabian Bieler
91df230624
wined3d: Fix GLSL cnd instruction for INF and NAN arguments.
2007-04-04 21:26:30 +02:00
Fabian Bieler
2843b0f929
wined3d: Fix GLSL cmp instruction for INF and NAN arguments.
2007-04-04 21:26:23 +02:00
Fabian Bieler
333de16fb6
wined3d: Implement support for projective textures in ps 2.0 and later.
2007-03-29 21:15:29 +02:00
Stefan Dösinger
bee084503b
wined3d: Implement bem shader instruction.
2007-03-27 12:30:38 +02:00
Fabian Bieler
97967d3671
wined3d: Fix glsl texbem instruction for projective textures.
2007-03-23 12:31:35 +01:00
Fabian Bieler
4b3ac837aa
wined3d: Implemented bump map transform for texbem in GLSL with native signed textures.
2007-03-23 12:31:27 +01:00
Stefan Huehner
4d1d01f266
Mark several functions as static.
2007-03-13 13:35:12 +01:00
H. Verbeet
30ee071eb9
wined3d: Disable vertex shaders when transformed vertices are used.
2007-03-13 11:55:55 +01:00
H. Verbeet
25cd1c4d28
wined3d: gl_FogFragCoord is a scalar.
2007-03-05 12:06:45 +01:00
H. Verbeet
19d223cade
wined3d: Store multiple constant indices per list entry.
2007-02-28 13:35:34 +01:00
H. Verbeet
2c85e5e8a3
wined3d: Store GLSL programs in a hash table rather than a linked list.
2007-02-28 13:35:23 +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
Francois Gouget
536e738552
Assorted spelling fixes.
2007-02-14 21:03:57 +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
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
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
H. Verbeet
efed4c33c2
wined3d: gl_FragDepth is a float, so fixup the write mask.
2007-01-19 12:29:11 +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
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
H. Verbeet
1bfc08e081
wined3d: Rename shader_glsl_add_dst() to shader_glsl_add_dst_old(), add shader_glsl_append_dst().
2007-01-16 16:02:41 +01:00
H. Verbeet
b28bd67fd9
wined3d: Fixup the write mask for gl_FogFragCoord and gl_PointSize.
...
gl_FogFragCoord and gl_PointSize are floats rather than vec4s in GLSL,
so they shouldn't have a destination swizzle, and the write mask we
return should consist of only the first component.
2007-01-16 16:02:21 +01:00
H. Verbeet
16cf41413b
wined3d: Return the (binary) write mask from shader_glsl_add_dst_param().
2007-01-16 16:02:13 +01:00
H. Verbeet
9f4f02b5fb
wined3d: Split shader_glsl_add_param() in shader_glsl_add_src_param() and shader_glsl_add_dst_param().
2007-01-16 16:02:06 +01:00
H. Verbeet
aa4d88d6f8
wined3d: Add a comment about D3D write masks and GLSL destination swizzles.
2007-01-16 16:01:55 +01:00
Christoph Bumiller
d905795503
wined3d: Sampler variables wrongly named 'shader'.
2007-01-03 11:01:26 +01:00
Alexandre Julliard
d46d7d13ab
Revert "wined3d: Simplify the get_write_mask and get_swizzle functions."
...
This reverts commit a9f658f6a6
.
2007-01-02 13:21:47 +01:00
H. Verbeet
a9f658f6a6
wined3d: Simplify the get_write_mask and get_swizzle functions.
2006-12-29 20:56:16 +01:00
H. Verbeet
0fae42da50
wined3d: Cleanup shader_glsl_get_input_register_swizzle().
2006-12-29 20:55:51 +01:00
H. Verbeet
2b9a63b5d1
wined3d: Cleanup shader_glsl_get_output_register_swizzle().
2006-12-29 20:55:25 +01:00