Commit Graph

771 Commits

Author SHA1 Message Date
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
Henri Verbeet c525cf381d wined3d: Move "vs_clipping" to the shader caps. 2013-01-21 12:51:22 +01:00
Henri Verbeet 0e0e3b76f5 wined3d: Move "ffp_proj_control" to the fragment caps. 2013-01-21 12:51:21 +01:00
Henri Verbeet 78984cf46c wined3d: Get rid of ENTER_GL / LEAVE_GL. 2012-12-11 12:03:39 +01:00
Frédéric Delanoy a6db668895 wined3d: Add some 'fall through' comments (coverity). 2012-11-30 11:42:24 +01:00
Henri Verbeet 7f62678c16 d3d10core: Implement d3d10_device_DrawIndexedInstanced(). 2012-11-27 16:54:57 +01:00
Henri Verbeet eefe6346a9 wined3d: Properly handle scalar destinations in shader_glsl_conditional_move().
In particular, we modify dst.write_mask in the code further down in order to
mask out unused channels, but the writemask is ignored for scalar registers.
Since all that code is redundant anyway for scalar destinations, we can just
reuse the special case for scalar src0.
2012-11-27 16:54:50 +01:00
Henri Verbeet 9a27b0ad71 wined3d: Add support for geometry shaders to the GLSL shader backend. 2012-11-15 12:19:36 +01:00
Henri Verbeet 0a7b32e3f0 wined3d: Handle relative addresses in the common code in shader_glsl_get_register_name(). 2012-11-12 12:15:30 +01:00
Henri Verbeet 10d46bc042 wined3d: Add support for GLSL based fixed function fragment shaders. 2012-11-12 12:15:25 +01:00
Henri Verbeet 986f4cb9b1 wined3d: Introduce a separate function for generating the sRGB write GLSL code. 2012-11-09 11:30:25 +01:00
Henri Verbeet f6d05fbae6 wined3d: Introduce a separate function for generating the fixed function fog GLSL code. 2012-11-09 11:30:22 +01:00
Henri Verbeet 02250bb1bd wined3d: Introduce a separate function for initializing ps uniform locations. 2012-11-08 15:37:48 +01:00
Henri Verbeet c9f4cfc96a wined3d: Introduce a separate function for initializing vs uniform locations. 2012-11-08 15:37:48 +01:00
Henri Verbeet e8b0de1e14 wined3d: Use more consistent names for the various bumpenv uniforms. 2012-11-07 11:57:29 +01:00
Henri Verbeet 9b118257c4 wined3d: Introduce a separate structure for the ps specific fields in struct glsl_shader_prog_link. 2012-11-07 11:57:27 +01:00
Henri Verbeet ffd5e3eb81 wined3d: Introduce a separate structure for the vs specific fields in struct glsl_shader_prog_link. 2012-11-06 16:02:34 +01:00
Henri Verbeet b8bb2a4f85 wined3d: Use the shader object ids as program key. 2012-11-06 16:02:34 +01:00
Henri Verbeet 0e856abf6d wined3d: Enable or disable the fragment pipe in shader_select(). 2012-11-05 11:30:33 +01:00
Henri Verbeet 5059da9e32 wined3d: Don't depend on device internals in fragment_pipeline.alloc_private().
In particular, device->shader_backend and device->shader_priv aren't
initialized yet when the fragment pipe is initialized.
2012-10-29 10:47:03 +01:00
Henri Verbeet 17e33e9b27 wined3d: Make the shader backend responsible for controlling the fixed function fragment pipe. 2012-10-25 11:48:31 +02:00
Henri Verbeet 81ae7f606b wined3d: Explicitly check the shader type in shader_generate_glsl_declarations(). 2012-10-23 12:11:13 +02:00
Henri Verbeet c490fb37cf wined3d: Implement WINED3DSIH_MOVC in the GLSL shader backend. 2012-10-22 11:44:22 +02:00
Henri Verbeet 7a437c29f3 wined3d: Merge a couple of shader type specific blocks in shader_generate_glsl_declarations(). 2012-10-22 11:44:20 +02:00
Henri Verbeet b96b4c63ee wined3d: Use shader_glsl_get_prefix() in shader_glsl_gen_sample_code(). 2012-10-22 11:44:02 +02:00
Henri Verbeet 6beb7dc1a8 wined3d: Merge most of the code for shader_glsl_cmp() and shader_glsl_cnd(). 2012-10-18 22:32:19 +02:00
Henri Verbeet b72ab48ed8 wined3d: Implement WINED3DSIH_ROUND_NI in the GLSL shader backend. 2012-10-18 22:32:14 +02:00
Henri Verbeet 0c1dd7f7d1 wined3d: Explicitly check the shader type in shader_glsl_load_constantsF(). 2012-10-18 22:32:09 +02:00
Henri Verbeet 7365f9e6af wined3d: Explicitly check the shader type in shader_glsl_get_register_name(). 2012-10-18 22:32:03 +02:00
Henri Verbeet e31945b8aa wined3d: Implement WINED3DSIH_USHR in the GLSL shader backend. 2012-10-18 19:20:12 +02:00
Henri Verbeet 5ca5409b81 wined3d: Implement WINED3DSIH_UDIV in the GLSL shader backend. 2012-10-18 19:20:06 +02:00
Henri Verbeet cc0b1bb03f wined3d: Explcitly check the shader type in shader_glsl_get_sample_function(). 2012-10-18 19:20:01 +02:00
Henri Verbeet e832978adb wined3d: Explicitly check the shader type in shader_glsl_gen_sample_code(). 2012-10-18 19:19:54 +02:00
Henri Verbeet 6c3595fba8 wined3d: Handle WINED3DSPR_PRIMID in the GLSL shader backend. 2012-10-17 11:45:01 +02:00
Henri Verbeet 347dda068f wined3d: Explicitly check the shader type in shader_glsl_mov(). 2012-10-16 11:36:40 +02:00
Henri Verbeet 82a44af259 wined3d: Explicitly check the shader type in shader_glsl_texldl(). 2012-10-16 11:36:34 +02:00
Henri Verbeet 5626e165ff wined3d: Introduce a structure for shader register indices. 2012-10-15 13:31:07 +02:00
Henri Verbeet 21361d5237 wined3d: Use the correct relative address for constant buffers in the GLSL shader backend. 2012-10-15 13:31:06 +02:00
Henri Verbeet 2324ce6efb wined3d: Implement WINED3DSIH_IMUL in the GLSL shader backend. 2012-10-12 13:21:33 +02:00
Henri Verbeet ad1a1ee4fe wined3d: Implement WINED3DSIH_UTOF in the GLSL shader backend. 2012-10-12 13:21:28 +02:00
Henri Verbeet b7cd93240d wined3d: Implement WINED3DSIH_ITOF in the GLSL shader backend. 2012-10-12 13:21:22 +02:00
Henri Verbeet d48a0bc427 wined3d: Implement WINED3DSIH_FTOI in the GLSL shader backend. 2012-10-12 13:21:17 +02:00
Henri Verbeet f8e1550ebb wined3d: Implement WINED3DSIH_LT in the GLSL shader backend. 2012-10-11 18:51:04 +02:00
Henri Verbeet 842f75ee75 wined3d: Implement WINED3DSIH_IGE in the GLSL shader backend. 2012-10-11 18:51:00 +02:00
Henri Verbeet 819e5fa623 wined3d: Implement WINED3DSIH_GE in the GLSL shader backend. 2012-10-11 18:50:56 +02:00
Henri Verbeet 09f5f59229 wined3d: Implement WINED3DSIH_EQ in the GLSL shader backend. 2012-10-11 18:50:53 +02:00
Henri Verbeet 4c4b224330 wined3d: Implement WINED3DSIH_XOR in the GLSL shader backend. 2012-10-11 18:50:46 +02:00
Henri Verbeet 8f915156b9 wined3d: Implement SM4 WINED3DSIH_SINCOS in the GLSL shader backend. 2012-10-10 10:33:18 +02:00
Henri Verbeet e34acc2251 wined3d: Implement SM4 loops in the GLSL shader backend. 2012-10-10 10:33:14 +02:00
Henri Verbeet 6e4ecdf854 wined3d: Implement WINED3DSIH_IADD in the GLSL shader backend. 2012-10-10 10:33:09 +02:00
Henri Verbeet f9c181bf74 wined3d: Implement WINED3DSIH_DIV in the GLSL shader backend. 2012-10-10 10:33:05 +02:00
Henri Verbeet 2b46c4046a wined3d: Implement WINED3DSIH_BREAKP in the GLSL shader backend. 2012-10-10 10:32:58 +02:00
Henri Verbeet 0931522795 wined3d: Implement WINED3DSIH_AND in the GLSL shader backend. 2012-10-08 11:28:41 +02:00
Henri Verbeet 4d39cb56fc wined3d: Handle WINED3DSPR_CONSTBUFFER registers in the GLSL shader backend. 2012-10-03 11:19:42 +02:00
Henri Verbeet 6d948e1a8c wined3d: Recognize the SM4 dcl_constantBuffer opcode. 2012-10-01 23:08:00 +02:00
Henri Verbeet e13a589bfc wined3d: Set more accurate limits for SM4 shaders. 2012-09-28 11:26:44 +02:00
Henri Verbeet aa9daa285e wined3d: Unify GLSL input / output variable naming. 2012-09-28 11:26:40 +02:00
Henri Verbeet 49f9d39493 wined3d: Introduce a separate function to retrieve the GLSL variable prefix. 2012-09-27 13:10:54 +02:00
Henri Verbeet 1ff07a7d68 wined3d: Take the data type of registers into account in the GLSL shader backend. 2012-09-25 11:19:15 +02:00
Henri Verbeet eb4d20ef31 wined3d: Take the data type of immediates into account in shader_glsl_get_register_name(). 2012-09-24 09:58:09 +02:00
Henri Verbeet f298b96972 wined3d: Simplify shader_glsl_destroy() control flow a bit. 2012-09-21 10:53:13 +02:00
Henri Verbeet 00cdf1aaf1 wined3d: Merge the glsl_vshader_private and glsl_pshader_private structures. 2012-09-19 23:55:01 +02:00
Henri Verbeet fb989f1d1e wined3d: Implement version checks for geometry shaders. 2012-09-19 13:04:56 +02:00
Henri Verbeet 0932129993 wined3d: Implement WINED3DSIH_EMIT in the GLSL shader backend. 2012-09-18 10:18:57 +02:00
Henri Verbeet c982e5f64b wined3d: Implement WINED3DSIH_CUT in the GLSL shader backend. 2012-09-17 12:28:50 +02:00
Henri Verbeet a67ee02a48 wined3d: Recognize the SM4 dcl_outputTopology opcode. 2012-09-17 12:28:40 +02:00
Henri Verbeet 0fbb98424c wined3d: Recognize the SM4 dcl_inputPrimitive opcode. 2012-09-17 12:28:36 +02:00
Henri Verbeet d574d639a4 wined3d: Recognize the SM4 dcl_maxOutputVertexCount opcode. 2012-09-17 12:28:28 +02:00
Henri Verbeet a7bad0bde5 wined3d: Just handle all instructions in the shader backend. 2012-09-14 15:43:28 +02:00
Matteo Bruni d37f8ea866 wined3d: Use BOOL instead of char in shader_load_constants(). 2012-08-21 11:45:55 +02:00
Henri Verbeet c11c2e2dbb wined3d: Get rid of the d3d_caps debug channel. 2012-06-22 16:14:26 +02:00
Francois Gouget 19ba80e7c2 wined3d: We must include Wine's port.h before using NAN. 2012-06-01 17:41:52 +02:00