Commit Graph

564 Commits

Author SHA1 Message Date
Henri Verbeet
3687677427 wined3d: Recognize the SM4 lt opcode. 2010-01-07 09:26:30 +01:00
Henri Verbeet
6d5aca61f3 wined3d: Recognize the SM4 iadd opcode. 2010-01-07 09:26:25 +01:00
Henri Verbeet
22939f9d29 wined3d: Recognize the SM4 emit opcode. 2010-01-07 09:26:20 +01:00
Henri Verbeet
c57c76b78e wined3d: Recognize the SM4 ige opcode. 2010-01-07 09:26:08 +01:00
Henri Verbeet
b548e387ae wined3d: Move shader input/output signatures to IWineD3DBaseShaderClass. 2009-12-31 12:12:16 +01:00
Henri Verbeet
b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Henri Verbeet
d2ad2df637 wined3d: Remove a few redundant assignments. 2009-12-09 13:50:48 +01:00
Francois Gouget
060934c557 wined3d: Don't define nameless structs or unions.
Fixes compilation on systems that don't support nameless unions or structs.
2009-12-07 14:18:25 +01:00
Stefan Dösinger
0e77a381ea wined3d: Create clip coords only if they are used.
If GL vertex shader clipping is supported (GLSL or NVvp), we currently
always calculate clipping results in the shader. They're gracefully
discarded by opengl, but we need 6 constants / uniforms to calculate
unused values.
2009-11-12 15:18:00 +01:00
Henri Verbeet
111307dfba wined3d: Get rid of the GL_SUPPORT macro. 2009-10-29 13:09:33 +01:00
Henri Verbeet
48e03bc189 wined3d: Introduce a separate structure for various OpenGL implementation limits. 2009-10-29 13:09:27 +01:00
Henri Verbeet
eeb54b9922 wined3d: Keep better track of where we're using wined3d contexts.
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00
Stefan Dösinger
0c72464abf wined3d: Use the native constant limit for fitting private constants. 2009-10-26 11:42:36 +01:00
Stefan Dösinger
9ee6508132 wined3d: Remove dead code. 2009-10-26 11:42:29 +01:00
Stefan Dösinger
f15fc8f41c wined3d: Take native constants into account when reporting ARB limits. 2009-10-26 11:42:20 +01:00
Henri Verbeet
8d2512317f wined3d: Free the blitter private data in arbfp_blit_free() (Valgrind). 2009-10-22 10:46:15 +02:00
Henri Verbeet
6be41fd59a wined3d: Get rid of GL_LIMITS. 2009-10-22 10:46:05 +02:00
Henri Verbeet
55047f811a wined3d: Fix some GLINFO_LOCATION abuse. 2009-10-22 10:45:57 +02:00
Stefan Dösinger
122ed40c2b wined3d: Use ARB constant limits in ARB. 2009-10-20 14:46:16 +02:00
Stefan Dösinger
2d802af4d9 wined3d: Make shader specific constants accessible via GL_LIMITS. 2009-10-20 14:46:08 +02:00
Stefan Dösinger
8a68f418db wined3d: Don't reserve clipping constants needlessly. 2009-10-08 12:03:50 +02:00
Stefan Dösinger
ed2860f789 wined3d: Split the clip_parameters[2] array. 2009-10-08 12:03:42 +02:00
Stefan Dösinger
7f6ae94c0a wined3d: Don't write to result.color in arb_add_sRGB_correction.
add_sRGB_correction and the generate_pshader function generate the same MOV.
There's no need to do it in two places.
2009-10-08 12:03:30 +02:00
Stefan Dösinger
dc45657f2c wined3d: Fix vs_2_0 sgn.
vs_2_0's sgn has two extra parameters - temporary registers for the
instruction. This patch fixes the crash of the d3d9:visual test on windows and
properly handles the vs_2_0 version of sgn.
2009-10-02 12:36:59 +02:00
Stefan Dösinger
404aecb8da wined3d: Test if result.clip[] works correctly.
The Mac Nvidia driver doesn't implement the result.clip part of
GL_NV_vertex_program2_option correctly. It complains about a syntax
error if "result.clip[0]" is used. "result.clip" compiles correctly, but
supports only one clipplane, and running the shader results in severe
rendering bugs.
2009-09-28 17:33:07 +02:00
Henri Verbeet
f88c6e5ce5 wined3d: Move common shader fields to IWineD3DBaseShaderClass. 2009-09-25 15:14:35 +02:00
Henri Verbeet
9880cd7504 wined3d: Make some variables static. 2009-09-15 14:32:36 -05:00
Henri Verbeet
f8a3a5fd49 wined3d: Check the correct debug channel in shader_arb_load_constantsF(). 2009-09-08 13:06:07 +02:00
Henri Verbeet
f928d6ec87 wined3d: Fix shader_arb_load_constantsF(). 2009-09-08 13:06:01 +02:00
Stefan Dösinger
d6547c535b wined3d: Only generate the clipplane emulation KIL if a clipplane is used.
The KIL is quite expensive because it forces drivers to disable early Z
discard. It is cheaper to generate and switch between two shaders.
2009-09-08 13:03:03 +02:00
Henri Verbeet
4cdb1c9211 wined3d: Print a warning when an ARB program exceeds the native resource limits. 2009-09-02 11:25:58 +02:00
Henri Verbeet
055906e2a9 wined3d: Properly check for ARB program compile errors. 2009-09-02 11:25:58 +02:00
Henri Verbeet
560d63548d wined3d: Remove trailing spaces. 2009-08-27 11:45:37 +02:00
Stefan Dösinger
3cd91a451d wined3d: Use 50 chars for register names in texm3x3* functions. 2009-08-19 17:28:08 +02:00
Henri Verbeet
d900491310 wined3d: Replace find_clip_texcoord() with a generic function for finding a free input register. 2009-08-17 13:57:50 +02:00
Henri Verbeet
f7918b978f wined3d: Make the "luminanceparams" shader_reg_maps member a bitmap. 2009-08-12 13:22:50 +02:00
Henri Verbeet
95bb4c0486 wined3d: Make the "bumpmat" shader_reg_maps member a bitmap. 2009-08-12 13:22:44 +02:00
Henri Verbeet
270f57e755 wined3d: Make the "address" shader_reg_maps member a bitmap. 2009-08-12 13:22:30 +02:00
Henri Verbeet
6fa9fa15da wined3d: Make the "temporary" shader_reg_maps member a bitmap. 2009-08-11 12:36:20 +02:00
Henri Verbeet
50853e295b wined3d: Make the "texcoord" shader_reg_maps member a bitmap. 2009-08-11 12:36:16 +02:00
Francois Gouget
e74efb5487 Assorted spelling fixes. 2009-08-11 12:35:38 +02:00
Henri Verbeet
8d746c31ba wined3d: Properly handle negative loop step in shader_glsl_loop(). 2009-08-10 13:52:37 +02:00
Stefan Dösinger
14eedc5be7 wined3d: Watch out about higher constants when clamping ps 1.x consts.
ps 1.x supports only 8 constants, so the shader load code dirtifies the
first 8 on a shader switch. However, the constant load code reloaded all dirty
consts with clamping. That potentially left constants > 8 clamped.
2009-08-07 14:56:33 +02:00
Henri Verbeet
3bf0ad4528 wined3d: Explicitly pass the context to the shader_select() handler. 2009-08-07 12:11:06 +02:00
Henri Verbeet
4c1b3de936 wined3d: Call the shader_load_np2fixup_constants() handler directly from inside the shader backend. 2009-08-06 17:26:30 +02:00
Henri Verbeet
03686cb6bd wined3d: Explicitly pass the context to the shader_load_constants() handlers. 2009-08-06 17:26:30 +02:00
Henri Verbeet
a7251f0f4e wined3d: Track render_offscreen in the context.
This makes sure the relevant states in FindContext() are actually marked dirty
when needed.
2009-08-06 17:26:30 +02:00
Stefan Dösinger
2e9362d0fb wined3d: ARB clipplane init needs the helper constant. 2009-08-05 11:19:14 +02:00
Henri Verbeet
da1e5573da wined3d: Rename WineD3DContext to struct wined3d_context. 2009-08-03 15:01:48 +02:00
Henri Verbeet
be536ebe2f wined3d: Get rid of activeContext. 2009-07-24 13:10:57 +02:00
Henri Verbeet
ee4d18cc83 wined3d: Pass NULL to ActivateContext() when we don't need a specific target.
Once we keep track of the wined3d context for each thread,
lastActiveRenderTarget won't do what we want here.
2009-07-21 14:22:44 +02:00
Stefan Dösinger
cd7f43b00d wined3d: Don't activate a context unless we need one. 2009-07-20 12:23:07 +02:00
Henri Verbeet
43e6686a78 wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info. 2009-07-17 11:22:07 +02:00
Stefan Dösinger
9d14dcab68 wined3d: Use the unmodified source in MOVA.
The code removed by this patch was a leftover from the time when we tried to
emulate MOVA with a plain ARL, which only supports one source in plain ARB.
This breaks the more sophisticated MOVA and 4 component ADDR register we have
now however.
2009-07-16 11:15:45 +02:00
Stefan Dösinger
387d337a70 wined3d: EXP and EXPP are scalar operations. 2009-07-15 13:17:02 +02:00
Stefan Dösinger
2bfdff198c wined3d: Check the correct constant limit. 2009-07-10 13:07:33 +02:00
Henri Verbeet
483d552e21 wined3d: Allow shader_buffer_init() to fail. 2009-07-09 11:38:02 +02:00
Henri Verbeet
40b411958b wined3d: Rename "SHADER_BUFFER" to something sane. 2009-07-09 11:37:58 +02:00
Henri Verbeet
32fd8f2130 wined3d: checkGLcall() doesn't need a \n. 2009-07-07 11:50:22 +02:00
Henri Verbeet
2ac34bf231 wined3d: Add some missing float suffixes.
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Tobias Jakobi
0caebe5f51 wined3d: Force NP2 constant reload in shader_arb_select. 2009-07-02 11:56:57 +02:00
Tobias Jakobi
ef280280c2 wined3d: Implement shader_arb_load_np2fixup_constants. 2009-07-02 11:56:51 +02:00
Tobias Jakobi
e29babbf6d wined3d: Add NP2 fixup code to shader_hw_sample (ARB). 2009-07-02 11:56:45 +02:00
Tobias Jakobi
034fa4268c wined3d: Add NP2 fixup code to shader_arb_generate_pshader. 2009-07-02 11:56:39 +02:00
Tobias Jakobi
ec30e9a85e wined3d: Add arb_ps_np2fixup_info structure and improve structure packing for arb_ps_compiled_shader. 2009-07-02 11:56:33 +02:00
Stefan Dösinger
c82da7d975 wined3d: Don't dirtify too many shader constants.
If we have start = 4, count = 3, the highest dirty constant is the one with index 6. start + count gives 7,
so it already includes the zero-based array correction. Don't add an additional 1.

Additionally to the inefficiency of looking at one extra constant, this causes problems if the driver
rejects loading 257 constants on the initial load. In this case no constant is loaded if
GL_EXT_gpu_program_parameters is used.
2009-07-01 13:14:34 +02:00
Henri Verbeet
40bc47901c wined3d: Use flags for driver quirks. 2009-07-01 11:41:44 +02:00
Stefan Dösinger
d4312ebb16 wined3d: Add the vertex shader footer in the main function. 2009-06-29 12:28:40 +02:00
Stefan Dösinger
5befed21f6 wined3d: Write the vshader footer in a separate function. 2009-06-29 12:28:31 +02:00
Stefan Dösinger
5859d87754 wined3d: Implement function calls with NV exts. 2009-06-29 12:28:21 +02:00
Stefan Dösinger
031401a070 wined3d: ARB*p is already on after a depth blit. 2009-06-29 12:28:13 +02:00
Stefan Dösinger
9d63585352 wined3d: Don't disable ARBfp if the replacement pipeline is used.
If the replacement pipeline is used, ARBfp is always on. Disabling it
can break shaders or the replacement pipeline, because the shader and
ffp code assumes the extension is on.
2009-06-29 12:28:06 +02:00
Henri Verbeet
7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Stefan Dösinger
d1cd08b7b3 wined3d: Honor WINED3DSPSM_NOT in ARB. 2009-06-26 12:02:29 +02:00
Stefan Dösinger
8fb1e2acfb wined3d: Jump to the else branch if cond is false, not endif. 2009-06-26 12:02:18 +02:00
Stefan Dösinger
a07b50c94c wined3d: Support writemasks on texkill in ARB. 2009-06-26 12:02:12 +02:00
Stefan Dösinger
3a327908de wined3d: Initialize the used clip planes even if no clip emulation is used. 2009-06-26 12:02:07 +02:00
Stefan Dösinger
4d86eac60a wined3d: Unclamp vertex colors for 3.0 shaders in ARB if needed. 2009-06-26 12:02:01 +02:00
Stefan Dösinger
f69fb5c011 wined3d: POW and LOG operate on the absolute value. 2009-06-26 12:01:54 +02:00
Stefan Dösinger
bd14b6e2b4 wined3d: IFC requires GL_NV_fragment_program2. 2009-06-26 12:01:44 +02:00
Stefan Dösinger
d4854b636c wined3d: Beware of double negations. 2009-06-26 12:01:36 +02:00
Henri Verbeet
f98c6e3cff wined3d: Allow the existence of other shader types in get_loop_control_const(). 2009-06-24 11:28:50 +02:00
Henri Verbeet
943ed4e1e9 wined3d: Eliminate a redundant local variable in get_loop_control_const(). 2009-06-24 11:28:45 +02:00
Henri Verbeet
aec6d319fa wined3d: Avoid a redundant copy. 2009-06-24 11:28:38 +02:00
Henri Verbeet
fd8ebebe56 wined3d: Use a proper structure for "loop_control". 2009-06-24 11:28:33 +02:00
Henri Verbeet
4caf43ddb7 wined3d: Add some missing GL locking documentation to arb_program_shader.c. 2009-06-24 11:28:27 +02:00
Austin English
a4f2d3d18e wined3d: Fix a compiler warning. 2009-06-24 11:25:09 +02:00
Stefan Dösinger
e0ec956b3d wined3d: Fix pixelshader ifc.
The NVfp2 control flow uses the D3D syntax, and doesn't need the inversed
branch condition we're using in the vertex shader.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
444b7ac7e5 wined3d: Use a local parameter for the position fixup.
I don't like that I have to do this because the posFixup is in all
vertex programs, so its at the same position and could be loaded
globally.  Unfortunately, there are only 256 env parameters usually,
which makes it impossible for any shader to use c256, even if it does
not use indirect addressing, and so we can't claim 256 constant
support.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
7ffd10da28 wined3d: Find the clip texcoord before compiling.
The best is to put this together with the rest of the shader_arb_priv initialization.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
e64d48371f wined3d: Add a function to control use of NV_vp2 clipplanes.
I find it helpful for debugging to have this controlled at a central place,
without having to disable the entire GL extension or manually find all the
places where GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION) controls clipplane use. It
is useful for debugging the emulation code on NV cards and for debugging mac
driver issues.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
85af0b2943 wined3d: Don't emulate clipplanes with ffp vp and fix a wrong if condition.
b2f09fd204 accidentally got the
device->vs_clipping check wrong. The FFP replacement should emulate
clipping if GL can't do this natively with vertex shaders, not the
other way. Also don't emulate clipping if we're using fixed function
vertex processing because (a) clipping is always supported by GL in
this case, and (b), fragment.texcoord[7] is undefined. (Or in the
worst case set to something bad by the app).
2009-06-23 15:53:00 +02:00
Henri Verbeet
114b5bdefb wined3d: Fix a comment.
This was actually broken by 122af07a30.
2009-06-23 11:48:10 +02:00
Gerald Pfeifer
569b448e13 wined3d: Fix logical condition in find_clip_texcoord(). 2009-06-22 13:25:27 +02:00
Stefan Dösinger
3845b37a21 wined3d: Advertise SM 3.0 in ARB if the extensions are available. 2009-06-22 11:27:11 +02:00
Stefan Dösinger
e211a0b4a4 wined3d: Enable Shader Model 2.0 in ARB.
If the needed constants are available, we can support all vs_2_0 and ps_2_0
requirements with the plain ARB extensions. We cannot however, run SM 2.0a or
SM 2.0b.
2009-06-22 11:27:05 +02:00
Stefan Dösinger
e1c6b73e2d wined3d: Make the ARB index offset work with emulated MOVA. 2009-06-22 11:26:57 +02:00
Stefan Dösinger
77820d5ea5 wined3d: XXXC CC doesn't work even with NV_FP2 on. 2009-06-22 11:26:50 +02:00
Stefan Dösinger
26d17fe04c wined3d: Implement MRTs in ARB. 2009-06-22 11:26:43 +02:00
Stefan Dösinger
bb8bcf5878 wined3d: Reload the first 8 constants on a 1.x and != 1.x ps switch.
ps 1.x constants are clamped to [-1;1], constants in >= 2.0 pshaders
are not. This means we have to reload constants when switching between
those shader types in ARB. In GLSL this is not a concern because
constants are tied to program objects and are reloaded on a shader
change anyway.
2009-06-22 11:26:33 +02:00
Stefan Dösinger
2364ce08e5 d3d9: Add a SGN test. 2009-06-22 11:26:14 +02:00
Stefan Doesinger
b2f09fd204 wined3d: Emulate clipplanes in ARB if the NV extensions are not available.
This patch tries to find a free texture coordinate to load up to 4 clip
coordinates into the pixel shader, and uses KIL to throw away fragments
that are cut by a clipplane. If no free texture coordinate is found,
clipping is not done. If more than 4 clipplanes are used, only the first
4 are actually enabled. That should be pretty rare though.
2009-06-19 14:54:00 +02:00
Stefan Doesinger
7baf7c6518 wined3d: Implement vertex texture fetch in ARB. 2009-06-19 14:53:50 +02:00
Stefan Doesinger
f1e97cdfbc wined3d: Don't run out of varyings because of clipplanes. 2009-06-19 14:53:43 +02:00
Stefan Doesinger
b53b5909ff wined3d: Handle SM 3.0 varyings in ARB. 2009-06-19 14:53:20 +02:00
Stefan Doesinger
3aaa530ca9 wined3d: Properly load the y correction. 2009-06-18 15:17:26 +02:00
Stefan Doesinger
c9ef1ed28c wined3d: Deal with instructions that do not support _SAT. 2009-06-17 12:24:43 +02:00
Stefan Doesinger
a7b605af64 wined3d: Implement D3DSPDM_PARTIALPRECISION support. 2009-06-17 12:24:35 +02:00
Stefan Doesinger
dfd338de77 wined3d: Add modifier support to tex and friends. 2009-06-17 12:20:54 +02:00
Stefan Doesinger
7856c1c26f wined3d: Fix texm3x3pad.
The register number is already in the name we got from get_register_name,
don't add it twice.
2009-06-17 12:20:48 +02:00
Stefan Doesinger
58c3a0c832 wined3d: Implement vpos and vface. 2009-06-17 12:19:31 +02:00
Stefan Doesinger
ae600fe0c8 wined3d: Implement texldl in ARB. 2009-06-17 12:19:15 +02:00
Stefan Doesinger
4830a29101 wined3d: Implement texldd in ARB. 2009-06-16 13:57:34 +02:00
Stefan Doesinger
2f6a713805 wined3d: Use flags instead of bools to control shader_hw_sample. 2009-06-16 13:57:30 +02:00
Stefan Doesinger
e608ef856e wined3d: Implement IFC in ARB. 2009-06-16 13:57:20 +02:00
Stefan Doesinger
dfefbcd00d wined3d: Implement break and breakc. 2009-06-16 13:57:15 +02:00
Stefan Doesinger
c220bafa2c wined3d: Unroll loops in ARB if needed.
This is needed to allow us to claim vs_2_0 support with plain
GL_ARB_vertex_program. vs_2_0 allows loops without breaks.
2009-06-16 13:57:04 +02:00
Stefan Dösinger
258d99d289 wined3d: Implement dsy in ARB. 2009-06-10 11:52:15 +02:00
Stefan Dösinger
51cdc9d361 wined3d: Implement loops with the NV extensions. 2009-06-10 11:52:01 +02:00
Stefan Dösinger
298bd3c50d wined3d: Store the bumpmap ARB constants in ARB structures. 2009-06-10 11:51:49 +02:00
Henri Verbeet
a44f84fdf7 wined3d: Add a proper enum value for "no extension".
This would allow an extension check for ARB_COLOR_BUFFER_FLOAT to work.
2009-06-04 12:19:02 +02:00
Henri Verbeet
ad6279de9f wined3d: Replace the wined3d hash table with the generic red-black tree. 2009-06-03 11:40:14 +02:00
Stefan Dösinger
2afcb794f2 wined3d: Implement clipplanes in the ARB backend.
Using GL_NV_vertex_program2_option so far. If we're really desparate we can
handle some cases without the extension by using a custom varying and texkill
in the fragment program.
2009-06-02 12:09:54 +02:00
Stefan Dösinger
dfc9141458 wined3d: Use condition code for sRGB write correction if available.
This gives a small performance improvement. Don't enable NVfp for it though,
because the NVfp penalty is bigger than the gain from this patch. But if NVfp
is enabled anyway, make use of it.
2009-06-02 12:09:38 +02:00
Stefan Dösinger
7e1100d0e4 wined3d: Handle LRP in vertex shaders.
The ARB "LRP" instruction is a fragment program only instruction. It is
however valid in vs_2_0+ vertex shaders, so we have to emulate it.
2009-06-02 12:09:26 +02:00
Stefan Dösinger
38076e08ca wined3d: Add a comment about texbem and X2D. 2009-06-01 16:16:00 +02:00
Stefan Dösinger
de12f880ce wined3d: Don't enable the NV frag extensions if we don't need them.
Enabling the NV extensions occupies a temp register for some reason. Avoid
needlessly enabling it.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
5a07bacd36 wined3d: Write result.color in one mov.
Otherwise the Nvidia assembler needs one temp reg.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
050735be79 wined3d: Revert "WineD3D: use CMP instead of SLT and SGE in sRGB correction".
This reverts patch ba35760f9f.

The original patch did not achive its goal, because CMP is a macro that is
expanded to SLT, SGE, MUL, MAD, at least on nvidia hardware. To make matters
worse, it uses a temporary register, and the assembler usually is not clever
enough to find a free temporary from the shader code. If we generate the code
outselves we can pick one of our temps for this job.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
8665ee5906 wined3d: Use Rx registers for sRGB correction if possible.
This removes another reason to declare TA, TB and TC.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
7168b62323 wined3d: Use NRM from GL_NV_fragment_program2 if available. 2009-05-29 11:27:51 +02:00
Stefan Dösinger
d8e219be75 wined3d: Avoid the TMP_COLOR mov in some cases.
Many 2.0 and 3.0 shaders end with a "mov oC0, rx". If sRGB writing is enabled,
the ARB backend writes to a TMP_COLOR temporary, and at the end of the shader
writes the sRGB corrected color to result.color. If oC0 is not partially
rewritten after the mov, we can ignore the mov, not declare TMP_COLOR at all,
and just use the rx register as input for the sRGB correction code. This saves
a temporary and an instruction.
2009-05-29 11:27:44 +02:00
Stefan Dösinger
da7176be2a wined3d: Use DP2A or X2D for dp2add if available. 2009-05-29 11:27:29 +02:00
Stefan Dösinger
e2be741bc0 wined3d: Remove a MESA hack. 2009-05-29 11:27:23 +02:00
Stefan Dösinger
5f723bc44a wined3d: Allocate the proper size for the lconst map. 2009-05-29 11:27:14 +02:00
Henri Verbeet
d37472f27b wined3d: Add missing ActivateContext calls to shader_destroy() implementations. 2009-05-29 11:26:32 +02:00
Stefan Dösinger
e70c80add9 wined3d: Emulate if(bool) in ARB shaders. 2009-05-28 12:46:01 +02:00
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
Stefan Dösinger
6492622350 wined3d: sincos for vertex shaders.
SCS is unfortunately a fragment program only instruction. If we have the NV
extensions we can use SIN and COS. Otherwise we have to approximate sine and
cosine with a taylor series. Luckily we're provided with the necessary
constants by the application.
2009-05-27 11:56:53 +02:00
Stefan Dösinger
2f3faf4526 wined3d: Put some ARB declarations in the right place.
TMP_POS is only used in vertex shaders, declare it in the vshader
specific code. The sRGB constants are only used by pixel shaders, so
move them to the ps specific code, and avoid reading the stateblock.
2009-05-27 11:56:29 +02:00
Stefan Dösinger
f484cbbf91 wined3d: Get rid of Tx hardcoding in texbem. 2009-05-27 11:56:07 +02:00
Stefan Dösinger
da1b8d0c8e wined3d: Replace a few hardcoded Tx registers with proper name getters. 2009-05-27 11:56:01 +02:00
Stefan Dösinger
7fc4279cb8 wined3d: Implement DSX in ARB.
DSY is not that easy because we have to deal with the inverted coordinate
system in onscreen(!) rendering - see GLSL dsy.
2009-05-27 11:55:52 +02:00
Stefan Dösinger
122af07a30 wined3d: Implement SGN in ARB. 2009-05-21 16:17:52 +02:00