Commit Graph

776 Commits

Author SHA1 Message Date
Henri Verbeet e4cb3b5081 wined3d: Recognize the SM4 or opcode. 2015-02-11 23:05:17 +09:00
Henri Verbeet 3225fea30c wined3d: Recognize the SM4 ne opcode. 2015-02-11 23:05:13 +09:00
Henri Verbeet 8506da62e0 wined3d: Implement WINED3DSIH_SQRT in the GLSL shader backend. 2015-02-11 23:05:08 +09:00
Matteo Bruni 74b4516bfa wined3d: Only consider POSITION0 PS inputs as vpos. 2015-02-09 22:05:41 +09:00
Matteo Bruni 96b48191c0 wined3d: Only copy POSITION0 output semantics into gl_Position. 2015-02-09 22:05:35 +09:00
Matteo Bruni d360a51f3c wined3d: Use the core version of the shader object functions. 2015-01-23 12:02:37 +01:00
Henri Verbeet 2912e2938e wined3d: Handle the SM4 SV_POSITION pixel shader input semantic in the GLSL shader backend.
This is (mostly) equivalent to the vPos register in SM3.
2015-01-19 14:31:38 +01:00
Henri Verbeet 2e5abc156a wined3d: Implement WINED3DSIH_SAMPLE in the GLSL shader backend. 2015-01-19 14:31:32 +01:00
Henri Verbeet 60d44af34e wined3d: Merge shader_glsl_load_vsamplers() and shader_glsl_load_psamplers(). 2015-01-15 17:24:45 +01:00
Henri Verbeet c6232e1d11 wined3d: Create GL sampler objects for wined3d sampler objects. 2015-01-15 17:24:43 +01:00
Henri Verbeet 5c3d52468c wined3d: Take the resource data type into account in shader_glsl_gen_sample_code(). 2014-12-03 11:14:27 +01:00
Henri Verbeet 3aa9fe6bef wined3d: Record the data type of shader resources. 2014-12-03 11:14:25 +01:00
Henri Verbeet f5cef43738 wined3d: Store resource types instead of sampler types in struct wined3d_shader_reg_maps.
The difference doesn't really matter for SM1-3 since resources and samplers
are always tied together, but in SM4 they're separate.
2014-12-03 11:14:21 +01:00
Stefan Dösinger c9b10beb36 wined3d: Vertex fog uses the absolute eye position z. 2014-11-27 13:27:13 +01:00
Henri Verbeet 8c18ebf66a wined3d: Recognize the SM4 uge opcode. 2014-11-17 19:30:37 +09:00
Henri Verbeet 8681999eee wined3d: Explicitly convert the condition to bool shader_glsl_if().
In SM4 shaders the condition is likely to be an integer instead of a bool
uniform like in SM3.
2014-11-17 19:30:35 +09:00
Matteo Bruni e789fadd56 wined3d: Don't replicate shader limits values for each shader. 2014-10-16 21:23:26 +09:00
Matteo Bruni 33627f02aa wined3d: Store bool uniforms location in the GLSL shader structures. 2014-08-28 15:30:26 +02:00
Henri Verbeet b005ad6f90 wined3d: Use rendertarget views for color output instead of surfaces. 2014-08-21 12:24:42 +02:00
Henri Verbeet 80bca9bc9c wined3d: Add constant buffer support to the GLSL shader backend. 2014-08-04 14:23:29 +02:00
Henri Verbeet fa312a32b2 wined3d: Add format information for WINED3DFMT_R8_UNORM. 2014-06-13 10:11:59 +02:00
Henri Verbeet 7b8aa8606c wined3d: Recognize the SM4 ishl opcode. 2014-05-20 09:44:25 +02:00
Henri Verbeet 3555eab8b9 wined3d: Recognize the SM4 dp2 opcode. 2014-05-20 09:44:21 +02:00
Henri Verbeet c81d3b7336 wined3d: Recognize the SM4 discard opcode. 2014-05-20 09:44:17 +02:00
Henri Verbeet 0eebe0515f wined3d: Fix a couple of string declarations. 2014-05-02 13:45:10 +02:00
Henri Verbeet 14e3f71c75 wined3d: Bump ps_1x_max_value.
Shader model 4 hardware should generally have real floats for everything, and
FLT_MAX matches the value from the Windows drivers for that kind of hardware.
OpenGL requires at least 2^10 for colors, and 2^32 for other floats.
2014-05-02 13:45:04 +02:00
Henri Verbeet 23eed88fde wined3d: Implement support for per-stage texture stage constants.
This patch is loosely based on an earlier patch by Christian Costa.
2014-04-23 15:00:43 +02:00
Jonathan Liu 91c5cf33ad wined3d: Avoid wined3d_ftoa buffer overflow. 2014-01-14 12:31:37 +01:00
Henri Verbeet d412eb568e wined3d: Introduce a common GLSL handler for scalar instructions. 2014-01-09 15:50:30 +01:00
Henri Verbeet 27dc41d0dc wined3d: Fix the source swizzle for WINED3DSIH_LOG and WINED3DSIH_LOGP. 2013-12-12 12:08:09 +01:00
Henri Verbeet c8852c3ee3 wined3d: Fix the source swizzle for WINED3DSIH_EXPP. 2013-12-11 15:15:01 +01:00
Henri Verbeet 6e9acca1f4 wined3d: Fix the source swizzle for WINED3DSIH_EXP. 2013-12-11 15:14:58 +01:00
Henri Verbeet c228ffbaf0 wined3d: Unify shader binding points. 2013-10-10 10:44:53 +02:00
Henri Verbeet 079b6d4c11 wined3d: Unify the shader state IDs. 2013-10-09 11:11:07 +02:00
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