Stefan Dösinger
e492dd858e
wined3d: Add a function around the handler table.
...
This reduces the number of methods in the shader backend(the instr
modifiers can be handled in that wrapper) and it will help flow
control emulation in the ARB backend.
2009-05-28 12:45:45 +02:00
Stefan Dösinger
aad92c0780
wined3d: Manage vs_compile_args in the backends.
2009-05-28 12:45:32 +02:00
Stefan Dösinger
814dd42f25
wined3d: Manage ps_compiled_shader in the backends.
2009-05-28 12:45:21 +02:00
Stefan Dösinger
8763f6eac5
wined3d: Make find_gl_vshader backend specific.
2009-05-28 12:45:10 +02:00
Stefan Dösinger
732a9a15d5
wined3d: Remove the forward declaration added in the last patch.
2009-05-28 12:44:59 +02:00
Stefan Dösinger
d0d681c81e
wined3d: Make find_gl_pshader backend private.
2009-05-28 12:44:43 +02:00
Stefan Dösinger
5865d9c01b
wined3d: Store the compile args in the compile context, not the shader.
2009-05-28 12:44:22 +02:00
Henri Verbeet
2ee0d47a49
wined3d: Use strings for shader input/output semantics.
2009-05-27 11:12:12 +02:00
Henri Verbeet
e6efb797c3
wined3d: Make "packed_output" a bitmap.
2009-05-27 11:11:57 +02:00
Henri Verbeet
10fadadc54
wined3d: Use the "input_registers" bitmap for vertex shader attributes as well.
2009-05-27 11:11:53 +02:00
Henri Verbeet
664b17b9ee
wined3d: Make "packed_input" a bitmap.
2009-05-27 11:11:48 +02:00
Henri Verbeet
2153b4d998
wined3d: Split the info log into separate lines.
2009-05-26 13:49:50 +02:00
Stefan Dösinger
7b1d48721d
wined3d: Emulate the 4 component address register in ARB.
2009-05-20 10:55:17 +02:00
Stefan Dösinger
2cb8f42168
wined3d: Support clipplanes with GLSL.
...
This is the Nth attemt to make clipping work with GLSL shaders. The patch now
uses the GLSL quirk table to handle cards that need a custom varying for
gl_ClipPos, and the code is adapted to the changed state table and shader
backend system.
2009-05-18 13:59:16 +02:00
Henri Verbeet
b35e469d9d
wined3d: Document functions that depend on the caller to do GL locking.
2009-05-15 10:25:41 +02:00
Henri Verbeet
12c4af8dd8
wined3d: Add missing GL locking to delete_glsl_program_entry() calls.
2009-05-14 11:12:30 +02:00
Henri Verbeet
b7ac22004f
wined3d: Add missing GL locking to shader_backend_t.shader_select() calls.
2009-05-13 12:01:57 +02:00
Henri Verbeet
59689262e7
wined3d: Add missing GL locking to shader_backend_t.shader_free_private() implementations.
2009-05-13 12:01:48 +02:00
Henri Verbeet
cad271f13d
wined3d: Print the correct limit in a WARN().
2009-05-12 11:18:08 +02:00
Stefan Dösinger
2fd485ae31
winedd: Move shader_*_add_instruction_modifiers into the shader backend.
2009-05-08 12:20:18 +02:00
Henri Verbeet
69cbb57bfd
wined3d: Add support for immediate constants to the GLSL backend.
2009-05-08 12:13:49 +02:00
Henri Verbeet
96005c0fca
wined3d: Pass a struct wined3d_shader_register to shader_is_scalar().
2009-05-08 12:13:46 +02:00
Henri Verbeet
4a18697246
wined3d: Pass a struct wined3d_shader_register to shader_glsl_get_register_name().
2009-05-08 12:13:40 +02:00
Henri Verbeet
448dc84b6e
wined3d: Fix shader_glsl_get_register_name() indentation.
2009-05-08 12:13:33 +02:00
Henri Verbeet
5e473cb17f
wined3d: Group register information into struct wined3d_shader_register.
2009-05-08 12:13:17 +02:00
Henri Verbeet
69861b8fed
wined3d: Increase the size of glsl_src_param_t.param_str.
...
It constains the register name plus potential modifiers, so it should be
larger than reg_name instead of smaller.
2009-05-07 14:44:22 +02:00
Henri Verbeet
65622a052c
wined3d: Create a struct wined3d_shader_version to store version information.
...
The version tokens in SM1-3 and SM4 are similar, but not the same.
2009-05-07 14:44:21 +02:00
Stefan Dösinger
f5e24f7a85
wined3d: Implement texldd.
...
GL_ARB_shader_texture is supported on dx9 ATI cards(and probably dx10
ones too). For Nvidia cards I included a fallback to normal texld.
GL_EXT_gpu_shader4 supports similar texture*Grad GLSL functions, just
with an EXT prefix instead of ARB. For dx9 NV cards we'd have to use
GL_NV_fragment_program2, which supports a texldd equivalent on those
cards.
2009-05-05 14:12:52 +02:00
Henri Verbeet
2a5a6a3439
wined3d: Store the SM 1-3 opcode information tables in the SM 1-3 frontend.
2009-05-05 11:34:28 +02:00
Henri Verbeet
2378108eb9
wined3d: Create a frontend for parsing shaders.
2009-05-04 12:53:08 +02:00
Stefan Dösinger
10ad2e8e03
wined3d: Hardcode local loop control ints into the code in reps.
...
This helps the compiler to unroll the loop and dodges a crash on OSX. It is
similar to what we do in "loop aL, iX" already.
2009-04-29 13:35:54 +02:00
Henri Verbeet
8d4c90496f
wined3d: Store the sampler type in struct shader_reg_maps.
...
Instead of the usage token.
2009-04-29 13:08:01 +02:00
Henri Verbeet
b8b12d2dc2
wined3d: Mask set bool/int constants with bool/int constants read.
2009-04-28 13:10:02 +02:00
Henri Verbeet
e001876163
wined3d: Create a separate function to record register usage.
2009-04-28 13:10:02 +02:00
Stefan Dösinger
7ab6c22f5a
wined3d: Support the full amount of constants in GLSL.
...
This patch advertises all GL reported float uniforms to the D3D app to
reach the 256 constants required by Shader Model 3.0 on dx9 cards. If
the shader does not use indirect addressing, all 256 constants are
declared. The compiler can then figure out which constants are
actually used. This makes shaders work that use high constant indices,
but don't use all 256 constants.
2009-04-27 13:24:00 +02:00
Henri Verbeet
35499d0c3c
wined3d: Handle the opcode specific control shift in the frontend rather than the backend.
2009-04-24 11:52:28 +02:00
Henri Verbeet
fec1fa93cf
wined3d: Handle the swizzle shift in the frontend rather than the backend.
2009-04-22 13:14:14 +02:00
Henri Verbeet
baf2f94b76
wined3d: Get rid of the WINED3DVS_* swizzle constants.
...
They're redundant.
2009-04-22 13:14:09 +02:00
Henri Verbeet
629801bccb
wined3d: Get rid of the token field from struct wined3d_shader_src_param.
2009-04-22 13:14:03 +02:00
Henri Verbeet
88c80635c2
wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_get_swizzle().
2009-04-21 14:00:11 +02:00
Henri Verbeet
612c32ea08
wined3d: Add a separate function for converting swizzles to strings.
2009-04-21 14:00:06 +02:00
Henri Verbeet
db5ab97125
wined3d: Store the source swizzle in struct wined3d_shader_src_param.
2009-04-21 14:00:02 +02:00
Henri Verbeet
7f58b906dd
wined3d: Explicitly pass the source modifier to shader_glsl_gen_modifier().
2009-04-21 13:57:04 +02:00
Francois Gouget
5ef481922f
Assorted spelling fixes.
2009-04-20 15:25:26 +02:00
Henri Verbeet
48a096a638
wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_add_src_param().
2009-04-20 14:13:20 +02:00
Henri Verbeet
c7660c57a0
wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_get_register_name() for the relative addressing token.
2009-04-20 14:13:12 +02:00
Henri Verbeet
915b91757f
wined3d: Store the destination relative addressing token as a struct wined3d_shader_src_param.
2009-04-20 14:13:08 +02:00
Henri Verbeet
0663eb9323
wined3d: Store the source relative addressing token as a struct wined3d_shader_src_param.
2009-04-20 14:13:00 +02:00
Henri Verbeet
d6ee7d59a8
wined3d: Create a relative addressing token for 1.x shaders in the frontend.
...
Rather than handling this in the backends. Note that the ARB backend always
assumes 1.x shaders.
2009-04-20 14:12:52 +02:00
Henri Verbeet
8ac4c98be2
wined3d: Store the source modifiers in struct wined3d_shader_src_param.
2009-04-15 15:57:35 -05:00
Henri Verbeet
b6668b0296
wined3d: Store the register index in struct wined3d_shader_src_param.
2009-04-15 15:57:30 -05:00
Henri Verbeet
4de1dba2c5
wined3d: Store the register type in struct wined3d_shader_src_param.
2009-04-15 15:57:25 -05:00
Henri Verbeet
ff62cab537
wined3d: Introduce struct wined3d_shader_src_param.
2009-04-15 15:57:19 -05:00
Henri Verbeet
463de24e7b
wined3d: Group instruction context information together in struct wined3d_shader_context.
2009-04-15 15:57:13 -05:00
Henri Verbeet
a7e2c2d70c
wined3d: Don't die if a vertex shader has samplers.
...
This fixes a regression introduced by 38239be58c
.
2009-04-15 15:57:00 -05:00
Henri Verbeet
d3fc7dca99
wined3d: Get rid of the "token" field from struct wined3d_shader_dst_param.
2009-04-14 15:25:07 -05:00
Tobias Jakobi
0c2514bd8f
wined3d: Rename some NP2 fixup variables and update comments.
2009-04-13 17:32:11 -05:00
Tobias Jakobi
6e970c5d95
wined3d: glsl: Enable load_np2fixup_constants.
2009-04-10 14:00:58 +02:00
Tobias Jakobi
9b067a6ca5
wined3d: Add load_np2fixup_constants function to shader backend.
2009-04-10 14:00:50 +02:00
Stefan Dösinger
754b5cf2ad
wined3d: Deal with reserved shader constants in the backend.
...
This moves the GLSL and ARB specific reserved constants out of directx.c into
the get_caps methods of the shader backends. That way the number of reserved
constants remains in the backend.
GL_LIMITS({v/p}shader_constantsF) now contains the real number of constants as
advertised by GL instead of some mixture of GL info and backend implementation
specifics. This makes it easier for backends to decide how many constants to
use.
2009-04-10 11:22:55 +02:00
Henri Verbeet
62d9dc2177
wined3d: Store the relative addressing mode in struct wined3d_shader_dst_param.
2009-04-10 10:23:20 +02:00
Henri Verbeet
22e57d025c
wined3d: Store the destination shift in struct wined3d_shader_dst_param.
2009-04-10 10:23:15 +02:00
Henri Verbeet
3a0eb81cea
wined3d: Get rid of a redundant strcat in shader_glsl_get_register_name().
2009-04-09 11:27:29 +02:00
Henri Verbeet
ff58255f4e
wined3d: Explicitly pass parameter properties to shader_glsl_get_register_name().
2009-04-09 11:27:25 +02:00
Henri Verbeet
f3e5e92a18
wined3d: Pass a struct wined3d_shader_dst_param to shader_glsl_get_write_mask().
2009-04-09 11:27:21 +02:00
Henri Verbeet
d299f865f7
wined3d: Add a separate function for converting write masks to strings.
2009-04-09 11:27:17 +02:00
Henri Verbeet
2df49ea8ef
wined3d: Eliminate a useless local variable.
2009-04-08 11:42:24 +02:00
Henri Verbeet
9ec0b09d35
wined3d: Store usage and usage_idx in struct wined3d_shader_semantic.
...
Instead of the usage token.
2009-04-08 11:42:19 +02:00
Henri Verbeet
a1dedbdf58
wined3d: Properly check if input/output varyings are used.
2009-04-08 11:42:12 +02:00
Henri Verbeet
375780a5a8
wined3d: Fix some more 3 space indentation.
2009-04-08 11:42:05 +02:00
Henri Verbeet
d12e489272
wined3d: Store a struct wined3d_shader_dst_param in struct wined3d_shader_semantic.
2009-04-08 11:41:59 +02:00
Henri Verbeet
a4c942f606
wined3d: Simplify shader_glsl_cmp() and shader_glsl_cnd().
2009-04-07 14:22:00 +02:00
Henri Verbeet
a374ba54e5
wined3d: Simplify shader_glsl_color_correction().
2009-04-07 14:21:54 +02:00
Henri Verbeet
0f92bbc6bc
wined3d: Store the register type in struct wined3d_shader_dst_param.
2009-04-07 14:21:49 +02:00
Henri Verbeet
f7f61a58f4
wined3d: Explicitly pass register type and index to shader_is_scalar().
2009-04-07 14:21:44 +02:00
Henri Verbeet
6f66c1ddbd
wined3d: Store the write mask in struct wined3d_shader_dst_param.
2009-04-07 14:21:37 +02:00
Henri Verbeet
f0de1622d0
wined3d: Store the destination modifiers in struct wined3d_shader_dst_param.
2009-04-06 12:57:52 +02:00
Henri Verbeet
decc1cec9d
wined3d: Pass a pointer to struct wined3d_shader_dst_param to shader_glsl_add_dst_param().
2009-04-06 12:57:44 +02:00
Henri Verbeet
72aff27e0e
wined3d: Pass a pointer to struct wined3d_shader_dst_param to shader_glsl_append_dst_ext().
2009-04-06 12:57:37 +02:00
Henri Verbeet
91305b1f49
wined3d: Use a more appropriate mask for masking out the write mask.
2009-04-06 12:57:32 +02:00
Henri Verbeet
1120f0f585
wined3d: Unset the current GLSL program when it's destroyed.
2009-04-06 12:57:27 +02:00
Henri Verbeet
7b62165546
wined3d: Store the register index in struct wined3d_shader_dst_param.
2009-04-03 13:01:44 +02:00
Henri Verbeet
7245cd2b81
wined3d: Add a struct wined3d_shader_dst_param for storing destination parameter information.
2009-04-03 13:01:38 +02:00
Henri Verbeet
04b2e0b19b
wined3d: Remove the opcode field from struct wined3d_shader_instruction.
2009-04-03 13:01:30 +02:00
Henri Verbeet
7bde2792c2
wined3d: Store the source and destination parameter count in struct wined3d_shader_instruction.
2009-04-02 16:28:29 +02:00
Henri Verbeet
44648b2b91
wined3d: Store the instruction handler index in struct wined3d_shader_instruction.
...
This allows us to avoid comparing against WINED3DSIO_*, which is specific to
the bytecode.
2009-04-02 16:28:29 +02:00
Henri Verbeet
fb6547a3e1
wined3d: Compare num_params against 1 in shader_glsl_map2gl().
...
num_params includes the destination parameter, while we're only interested in
source parameters. This doesn't cause problems for any of the instrctions
currently handled by shader_glsl_map2gl() though, since they all happen to
have at least 1 source parameter.
2009-04-02 16:28:29 +02:00
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