Stefan Dösinger
112617f00b
wined3d: Move tex_unit_map and friends into the context.
2013-09-16 13:05:58 +02:00
Stefan Dösinger
d8c43aabf7
wined3d: Move the decoded stream info into the context.
2013-09-12 17:48:14 +02:00
Stefan Dösinger
b4d8b52fa7
wined3d: Pass position_transformed and gl_info to find_ps_compile_args.
2013-09-11 17:09:59 +02:00
Stefan Dösinger
dfeee9077c
wined3d: Pass the swizzle map to find_vs_compile_args.
2013-09-11 17:09:56 +02:00
Henri Verbeet
137590be31
wined3d: Return 1 instead of 0 for max_vertex_blend_matrices in glsl_vertex_pipe_vp_get_caps().
...
It's not necessarily clear to me that one is better than the other here, but
this is what we returned in the old GL fixed function implementation of the
D3D fixed function vertex pipe, and apparently EverQuest depends on this.
This fixes a regression introduced by commit 2014141a25
.
2013-09-06 12:00:09 +02:00
Stefan Dösinger
b73464a413
wined3d: Use the ftoa helper function in the ARB shader backend.
...
This is the ARB equivalent to e0494afa00
.
2013-09-05 17:55:48 +02:00
Henri Verbeet
99092c2700
wined3d: Avoid a couple of useless glGetUniformLocationARB() calls.
2013-09-04 11:36:58 +02:00
Henri Verbeet
ff6ce4c669
wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations.
...
On typical hardware, the clamp() would be an instruction modifier, while the
max() would need an extra instruction.
2013-09-04 11:36:50 +02:00
Henri Verbeet
0d2d847914
wined3d: Don't clamp texture lookups in the GLSL fixed function fragment pipe.
2013-09-03 16:58:17 +02:00
Henri Verbeet
b85c2a74bb
wined3d: Replace the "stateBlock" wined3d_device field with a wined3d_state structure.
2013-08-27 11:50:53 +02:00
Henri Verbeet
8b8e081d5f
wined3d: Keep track of contained indices in struct constant_heap itself.
2013-08-23 10:41:32 +02:00
Henri Verbeet
74faebd68d
wined3d: Store the current GLSL program per-context.
2013-08-23 10:41:28 +02:00
Henri Verbeet
69e1100c0c
wined3d: Handle NP2 fixup updates in shader_load_constants().
2013-08-21 12:13:56 +02:00
Henri Verbeet
62859daf0b
wined3d: Avoid looking up shaders for shader stages that didn't change.
2013-08-21 12:13:56 +02:00
Henri Verbeet
ad147d638c
wined3d: Just update a range of constants in walk_constant_heap().
...
The call overhead from separate calls typically ends up being more expensive
than just updating a few more constants.
2013-08-16 11:55:24 +02:00
Henri Verbeet
37d1e8b79c
wined3d: Try to avoid redundant constant updates.
...
This gives a minor performance improvement. For example, in 3DMark03 Game Test
1 this gives about a 4% improvement, in the Counter Strike: Source stress test
it's about 1%. (NVIDIA GF9600M, Intel T9550, 1024x768).
2013-08-16 11:55:24 +02:00
Henri Verbeet
c1af405054
wined3d: Only set fragment pipe uniforms if they're needed by the shader.
...
In principle the GL driver also checks the location, but it turns out to be
slightly faster to do it ourselves.
2013-08-16 11:55:24 +02:00
Stefan Dösinger
ba61730daa
wined3d: Avoid calculating 1 / (fog_end - fog_start) in the shader.
2013-08-01 20:43:42 +02:00
Matteo Bruni
e2cf98eb76
wined3d: Implement special fog behavior for orthogonal projection matrices.
2013-07-24 11:09:31 -05:00
Matteo Bruni
c9458882a0
wined3d: Fix handling of cnd instruction with coissue flag.
2013-06-26 18:45:37 +02:00
Stefan Dösinger
b648b74191
wined3d: Pass fogstart==fogend to GL in fog table mode.
2013-06-19 20:09:53 +02:00
Henri Verbeet
ffc9f535eb
wined3d: Handle pre-transformed vertices in the GLSL vertex pipe.
...
This also avoids a fallback to drawStridedSlow().
2013-06-14 11:46:31 +02:00
Henri Verbeet
8a7ddfbb53
wined3d: Don't use state_colormat() with the GLSL vertex pipe.
...
None of the code in there should be needed for the GLSL vertex pipe, and the
"untracked materials" counter in particular will trigger an unnecessary
fallback to drawStridedSlow().
2013-06-14 11:46:27 +02:00
Henri Verbeet
e0494afa00
wined3d: Introduce a helper function for printing floats in GLSL shaders.
2013-06-11 11:33:15 +02:00
Henri Verbeet
e8905e360f
wined3d: Don't modify the texcoord mask for "projected" cube textures in shader_glsl_tex().
2013-06-07 11:58:22 +02:00
Henri Verbeet
f52d4044eb
wined3d: Fix a typo in shader_glsl_generate_ffp_fragment_shader().
2013-06-07 11:58:20 +02:00
Henri Verbeet
e4f50de336
wined3d: Get rid of the unused "half" GLSL variable in shader_glsl_ffp_vertex_lighting().
2013-05-31 11:57:40 +02:00
Francois Gouget
49dbf2464f
wined3d: Add a trailing '\n' to a shader_addline() call.
2013-05-30 20:19:33 +02:00
Henri Verbeet
8352d45da5
wined3d: Rename "fogmode" to "wined3d_ffp_ps_fog_mode".
...
This is mostly for consistency with wined3d_ffp_vs_fog_mode.
2013-05-30 10:57:15 +02:00
Henri Verbeet
74c5a22daa
wined3d: Only invalidate the current ffp vertex shader if the light type changed.
...
As opposed to any time a light parameter changed.
2013-05-29 12:12:33 +02:00
Henri Verbeet
bdd97858bf
wined3d: Only write gl_ClipVertex if clipping is enabled in shader_glsl_generate_ffp_vertex_shader().
2013-05-29 12:12:32 +02:00
Henri Verbeet
1c2392ddb0
wined3d: Only write gl_PointSize for point primitives in shader_glsl_generate_ffp_vertex_shader().
2013-05-29 12:12:32 +02:00
Henri Verbeet
2014141a25
wined3d: Add support for GLSL based fixed function vertex shaders.
2013-05-29 12:12:32 +02:00
Stefan Dösinger
6fce4d4547
wined3d: Pass the state and private data to shader_select.
2013-05-14 18:37:08 +02:00
Stefan Dösinger
47f385adf0
wined3d: Add a separate function for disabling shaders.
2013-05-14 18:37:04 +02:00
Stefan Dösinger
036a62a245
wined3d: Explicitly pass the state to shader_load_constants.
2013-05-14 18:36:59 +02:00
Stefan Dösinger
f7580726b0
wined3d: Don't pass the device to gen_ffp_frag_op.
2013-04-25 20:25:08 +02:00
Henri Verbeet
471991eb9a
wined3d: Introduce a wined3d_vertex_pipe_ops structure.
2013-04-25 13:39:56 +02:00
Stefan Dösinger
f663683980
wined3d: Remove leftover texture accesses in GLSL shader generation.
2013-04-22 17:56:05 +02:00
Henri Verbeet
c756496326
wined3d: Rename the device "strided_streams" field to "stream_info".
...
The "strided" in there is mostly historic, it hasn't really been accurate for
a while now.
2013-04-22 15:26:11 +02:00
Henri Verbeet
84219f1964
wined3d: Immediate constants should always have a valid location in shader_glsl_load_constantsF().
2013-04-17 11:36:17 +02:00
Stefan Dösinger
ea69fa943f
wined3d: Enable GL_ARB_texture_rectangle in GLSL ffp fragment shaders.
2013-04-16 17:49:11 +02:00
Henri Verbeet
1a551fe5f9
wined3d: Immediate constants should always have a valid location in shader_glsl_load_constantsB().
2013-04-16 12:14:03 +02:00
Henri Verbeet
302ad29742
wined3d: Constants in constants_set should always have a valid location in shader_glsl_load_constantsB().
2013-04-16 12:14:01 +02:00
Stefan Dösinger
0680b1758d
wined3d: Store ps 1.4 texture types in ps_compile_args.
2013-04-15 17:45:58 +02:00
Stefan Dösinger
547be26d90
wined3d: Use the np2_fixup to find out if a RECT texture is used.
2013-04-15 17:45:54 +02:00
Stefan Dösinger
667f4225b5
wined3d: Put local constants into the shader code again.
...
This is essentially a revert of cd7825c893
,
with proper precision.
2013-04-09 16:33:25 +02:00
Michael Stefaniuc
50a9fb579c
wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
2013-02-06 09:04:41 +01:00
Henri Verbeet
dc21460397
wined3d: Replace "VertexShaderMode" and "PixelShaderMode" with shader model limits.
2013-01-25 11:18:13 +01:00
Henri Verbeet
5ce220eb2f
wined3d: Add sRGB writes to the shader backend and fragment pipe caps.
2013-01-22 12:13:42 +01:00