Commit Graph

970 Commits

Author SHA1 Message Date
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
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
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
Matteo Bruni 2d810bdc89 wined3d: Clamp fog coordinate in the vertex shader. 2012-03-09 17:25:57 +01:00
Henri Verbeet 56a4680b69 wined3d: Complain when the hardware may not be able to run a shader. 2012-02-06 10:19:30 -06:00
Henri Verbeet bee9adbd05 wined3d: Get rid of the WINED3DDECLUSAGE typedef. 2012-01-19 11:56:47 +01:00
Henri Verbeet 7f7bc520b6 wined3d: Get rid of the WINED3DTEXTURETRANSFORMFLAGS typedef. 2012-01-10 10:47:30 +01:00
Henri Verbeet 43fcbcb36e wined3d: Get rid of the WINED3DTEXTURESTAGESTATETYPE typedef. 2012-01-10 10:47:27 +01:00
Henri Verbeet 66d453ce5c wined3d: Don't declare more varyings than required by the shader model. 2011-12-06 15:50:58 +01:00
Henri Verbeet ab73f20e38 wined3d: Use proper texcoord masks for GLSL texm3x3spec / texm3x3vspec. 2011-11-29 13:23:04 +01:00
Henri Verbeet 14cf780fde wined3d: Recognize the SM4 xor opcode. 2011-11-22 10:52:33 +01:00
Henri Verbeet d695dd3af4 wined3d: Recognize the SM4 ushr opcode. 2011-11-22 10:52:29 +01:00
Henri Verbeet 9afff037e5 wined3d: Recognize the SM4 udiv opcode. 2011-11-22 10:52:25 +01:00
Henri Verbeet e2d099a14d wined3d: Recognize the SM4 round_ni opcode. 2011-11-21 11:00:50 +01:00
Henri Verbeet 829e28cb4d wined3d: Recognize the SM4 ge opcode. 2011-11-21 11:00:46 +01:00
Henri Verbeet af11214562 wined3d: Recognize the SM4 eq opcode. 2011-11-21 11:00:42 +01:00
Henri Verbeet 563edce2fa wined3d: Get rid of the WINED3DSHADER_PARAM_SRCMOD_TYPE typedef. 2011-11-15 16:09:09 +01:00
Henri Verbeet 13efdc6a37 wined3d: Introduce a "state" variable in shader_glsl_load_constants(). 2011-11-14 15:25:22 +01:00
Henri Verbeet adf7c33023 wined3d: Get rid of the COMPARISON_TYPE typedef. 2011-11-09 11:34:32 +01:00
Henri Verbeet 323a95418e wined3d: Get rid of the WINED3DSAMPLER_TEXTURE_TYPE typedef. 2011-11-09 11:34:24 +01:00
Andrew Talbot e0cd19d88d wined3d: Remove extraneous braces from switch statements. 2011-11-07 11:54:25 +01:00
Henri Verbeet b49e08aa8d wined3d: Get rid of the local_constant typedef. 2011-10-31 23:52:59 +01:00
Matteo Bruni 5f2c6b3c82 wined3d: Enable SM4 support in the GLSL shader backend when possible. 2011-10-26 12:41:34 +02:00
Matteo Bruni 7254f5e661 wined3d: Return only the shader major version. 2011-10-26 12:41:34 +02:00
Henri Verbeet 7aac0159a9 wined3d: Move the ARB shader program constant handling to the backend where it belongs. 2011-10-26 12:41:33 +02:00
Stefan Dösinger ec0ac720bf wined3d: Make sure that lit doesn't return NaN. 2011-09-12 10:09:34 +02:00
Henri Verbeet 74b418c9e0 wined3d: Don't print the GLSL info log by default on fglrx. 2011-09-05 10:56:46 +02:00
Henri Verbeet 7d46943067 wined3d: Make some parameters to get_glsl_program_entry() const. 2011-08-23 16:53:52 +02:00
Henri Verbeet 3b3470b151 wined3d: Make the shader parameter to shader_glsl_generate_vshader() const. 2011-08-23 16:53:52 +02:00
Henri Verbeet f75675031f wined3d: Make the shader parameter to shader_glsl_generate_pshader() const. 2011-08-23 16:53:52 +02:00
Henri Verbeet 68b9071329 wined3d: Make the shader and ctx_priv parameters to shader_generate_glsl_declarations() const. 2011-07-25 11:59:11 +02:00
Henri Verbeet 6a046eddd7 wined3d: Get rid of the vpos_uniform field from the wined3d_pixel_shader structure. 2011-07-25 11:59:07 +02:00
Henri Verbeet dbcbf0c45b wined3d: Make the heap parameter to update_heap_entry() const. 2011-07-22 12:57:20 +02:00
Henri Verbeet 959874c2d8 wined3d: Make the tex_unit_map parameter to shader_glsl_load_vsamplers() const. 2011-07-22 12:57:19 +02:00
Henri Verbeet 86dd8476db wined3d: Make the tex_unit_map parameter to shader_glsl_load_psamplers() const. 2011-07-22 12:57:19 +02:00
Henri Verbeet 12be5afd92 wined3d: Get rid of the glsl_sample_function_t typedef. 2011-06-29 10:08:34 -05:00
Henri Verbeet 8fa44dd76d wined3d: Get rid of the glsl_src_param_t typedef. 2011-06-29 10:08:28 -05:00
Henri Verbeet 3f62b618c4 wined3d: Get rid of the glsl_dst_param_t typedef. 2011-06-29 10:08:19 -05:00
Henri Verbeet 5a26da1d19 wined3d: Make the wined3d_shader_context shader pointer const. 2011-06-23 09:47:34 +02:00
Henri Verbeet c51db63ba4 wined3d: Require ARB_shader_texture_lod for SM3. 2011-06-16 11:16:26 +02:00
Henri Verbeet 95bd0ec61c wined3d: Just enable ARB_shader_texture_lod if it's available. 2011-06-07 14:18:34 +02:00
Henri Verbeet aba42d1fa5 wined3d: Introduce a separate structure for framebuffer state. 2011-05-19 10:07:57 +02:00
Henri Verbeet d52ae4b63f wined3d: Get rid of the glsl_program_key_t typedef. 2011-05-17 10:06:34 +02:00
Henri Verbeet 0e0e5c3e38 wined3d: Get rid of the IWineD3DDevice typedefs. 2011-05-17 10:06:23 +02:00
Stefan Dösinger a549b8f090 wined3d: Fix a few MSVC data loss warnings. 2011-05-13 17:05:27 +02:00
Francois Gouget 5920de5ffb Assorted spelling and case fixes. 2011-05-09 12:09:27 +02:00
Henri Verbeet 86b0c6bd7b wined3d: Rename "shader_backend_t" to "wined3d_shader_backend_ops".
This makes it more consistent with the other call table names in wined3d.
2011-05-05 11:45:22 +02:00
Henri Verbeet a05841bd1a wined3d: Rename "pCaps" to "caps". 2011-04-27 11:50:29 +02:00
Henri Verbeet 3f0120241b wined3d: Enable SM3 if ARB_shader_texture_lod is supported. 2011-04-26 10:46:52 +02:00
Henri Verbeet 9d0e17e9ea wined3d: Either set SM3 for both vertex and fragment shaders or for neither. 2011-04-26 10:46:45 +02:00
Henri Verbeet 8fe80e18b2 wined3d: Get rid of the IWineD3DBaseShader typedefs. 2011-03-31 12:37:47 +02:00
Henri Verbeet f8f83ff2f7 wined3d: Remove COM from the shader implementation. 2011-03-31 12:37:46 +02:00
Henri Verbeet 5555d904be wined3d: Get rid of IWineD3DBaseShaderClass. 2011-03-31 12:37:46 +02:00
Henri Verbeet 99bed5d41d wined3d: Get rid of IWineD3DPixelShaderImpl. 2011-03-30 12:18:20 +02:00
Henri Verbeet dab01d435e wined3d: Get rid of IWineD3DVertexShaderImpl. 2011-03-30 12:18:09 +02:00
Henri Verbeet 3d4fe0b750 wined3d: Get rid of IWineD3DPixelShader. 2011-03-30 12:18:03 +02:00
Henri Verbeet c5bf96c951 wined3d: Get rid of IWineD3DBaseTextureClass. 2011-03-29 12:34:40 +02:00
Henri Verbeet eb5bfad18d wined3d: Get rid of the IWineD3DBaseTexture typedefs. 2011-03-28 17:08:52 +02:00
Henri Verbeet ac9c592ca9 wined3d: Store all the resource desc information in struct wined3d_resource. 2011-03-09 12:29:17 +01:00
Matteo Bruni 75386a99b4 wined3d: Make clip planes independent from offscreen/onscreen drawing. 2011-02-15 17:24:26 +01:00
Henri Verbeet 4c30b82c83 wined3d: Just fail if the texture type is not supported in create_glsl_blt_shader() (LLVM/Clang).
Changing the texture type has no effect at this point, and it wouldn't work
properly anyway.
2011-02-01 12:01:10 +01:00
Henri Verbeet 96d225d4dd wined3d: Get rid of the IWineD3DStateBlockImpl typedef. 2011-01-31 12:25:05 +01:00
Henri Verbeet 91ac0c37b1 wined3d: Disable vertex shader output clamping.
It looks like NV50+ hardware gets you infinities and NaN's in D3D as well for
most things, so we should only need special handling for pow and nrm.
2011-01-25 12:32:38 +01:00
Henri Verbeet a50546e563 wined3d: Use dot() instead of length() in shader_glsl_nrm().
As Eric Anholt pointed out, using length() here is suboptimal. It essentially
translates into "inversesqrt(dot(x, x));", but needs to handle the case of
zero-length vectors, much like nrm.
2011-01-24 14:43:26 +01:00
Henri Verbeet 7bc7caf423 wined3d: Pass an IWineD3DBaseTextureImpl array to pixelshader_update_samplers(). 2010-12-16 11:50:09 +01:00
Henri Verbeet bd2e7aedcf wined3d: Store an IWineD3DBaseShaderImpl pointer in wined3d_shader_context. 2010-12-15 11:55:22 +01:00
Henri Verbeet 2f36d600ef wined3d: Pass an IWineD3DBaseShaderImpl pointer to shader_generate_main(). 2010-12-15 11:55:19 +01:00
Henri Verbeet c492ec196e wined3d: Pass implementation pointers to get_glsl_program_entry(). 2010-12-15 11:55:13 +01:00
Henri Verbeet d6446c7a97 wined3d: Store implementation pointers in glsl_program_key_t. 2010-12-14 11:38:42 +01:00
Henri Verbeet dd1ba15ec7 wined3d: Store implementation pointers in struct glsl_shader_prog_link. 2010-12-14 11:38:39 +01:00
Henri Verbeet b0bc24eec3 wined3d: Pass implementation pointers to generate_param_reorder_function(). 2010-12-14 11:38:37 +01:00
Henri Verbeet 77beea98b9 wined3d: Avoid some interface pointers in set_glsl_shader_program(). 2010-12-14 11:38:34 +01:00
Henri Verbeet fe2ffe1e6a wined3d: Pass an IWineD3DBaseShaderImpl pointer to shader_destroy(). 2010-12-13 16:24:23 +01:00
Henri Verbeet 97ca0e6863 wined3d: Pass an IWineD3DBaseShaderImpl pointer to shader_generate_glsl_declarations(). 2010-12-13 16:24:19 +01:00
Henri Verbeet b5637a934e wined3d: Store an IWineD3DDeviceImpl pointer in IWineD3DBaseShaderClass. 2010-12-08 11:27:49 +01:00
Henri Verbeet db164a990c wined3d: Rename shader_reg_maps to wined3d_shader_reg_maps.
For consistency with other shader translation structures.
2010-12-07 11:33:23 +01:00
Henri Verbeet e9ff40d918 wined3d: Use local reg_maps variables where possible. 2010-12-06 12:21:31 +01:00
Henri Verbeet f92a0667d7 wined3d: Remove a unused parameter to shader_dirtifyable_constants(). 2010-12-02 11:53:57 +01:00
Henri Verbeet f45aeb4abe wined3d: Pass an IWineD3DDeviceImpl pointer to shader_free_private(). 2010-12-01 11:09:08 +01:00
Henri Verbeet 4a69874938 wined3d: Pass an IWineD3DDeviceImpl pointer to shader_alloc_private(). 2010-12-01 11:09:02 +01:00
Henri Verbeet 77923346da wined3d: Pass an IWineD3DDeviceImpl pointer to shader_update_float_pixel_constants(). 2010-12-01 11:08:57 +01:00
Henri Verbeet 4a6d0da207 wined3d: Pass an IWineD3DDeviceImpl pointer to shader_update_float_vertex_constants(). 2010-12-01 11:08:51 +01:00
Henri Verbeet 7363b0e98a wined3d: Explicitly pass data and gl_info to shader_deselect_depth_blt(). 2010-11-30 10:57:23 +01:00
Henri Verbeet 93a824d744 wined3d: Explicitly pass data and gl_info to shader_select_depth_blt(). 2010-11-30 10:57:17 +01:00
Henri Verbeet e832b57a15 wined3d: Move loop state to wined3d_shader_context. 2010-10-29 14:33:56 +02:00
Henri Verbeet 8a4a76f9a7 wined3d: Move "parse_state" to wined3d_shader_context. 2010-10-29 14:33:56 +02:00
Henri Verbeet 3a41bbdd71 wined3d: Access reg_maps though ins->ctx in shader_glsl_get_register_name().
This is all part of the ongoing work to make the shader backend interface less
dependent on wined3d internals.
2010-10-28 18:18:11 +02:00
Henri Verbeet 1b2f9d29d7 wined3d: Get rid of the posFixup field from the device. 2010-10-26 11:58:12 +02:00
Henri Verbeet 5ef7a8c242 wined3d: Explicitly pass parameters to shader_load_np2fixup_constants(). 2010-10-25 14:29:37 +02:00
Henri Verbeet d508a855c1 wined3d: Recognize the SM4 sqrt opcode. 2010-10-20 18:37:07 +02:00
Henri Verbeet 4eb8fd7960 wined3d: Recognize the SM4 sample_d opcode. 2010-10-14 17:54:52 +02:00
Henri Verbeet 50f6fbadb0 wined3d: Recognize the SM4 ld opcode. 2010-10-13 13:00:30 +02:00
Henri Verbeet 7c6658f970 wined3d: Recognize the SM4 ieq opcode. 2010-10-13 13:00:26 +02:00
Henri Verbeet a9e3058426 wined3d: Recognize the SM4 ftoi opcode. 2010-10-13 13:00:22 +02:00
Henri Verbeet b53d346d35 wined3d: Recognize the SM4 div opcode. 2010-10-13 13:00:17 +02:00
Henri Verbeet ff9c2fcdb2 wined3d: Recognize the SM4 utof opcode. 2010-10-11 17:11:28 +02:00
Henri Verbeet 18d7a73af8 wined3d: Recognize the SM4 sample_l opcode. 2010-10-11 17:11:28 +02:00
Henri Verbeet 407ed1b875 wined3d: Recognize the SM4 sample opcode. 2010-10-11 17:11:28 +02:00
Henri Verbeet b2f520b5f0 wined3d: Recognize the SM4 itof opcode. 2010-10-11 17:11:28 +02:00
Henri Verbeet 1fe1676ae9 wined3d: SM4 immediate constants are typeless. 2010-10-08 15:26:42 +02:00
Henri Verbeet d369136a96 wined3d: Recognize the SM4 imul opcode. 2010-10-08 15:26:33 +02:00
Henri Verbeet 512e6cec2c wined3d: Recognize the SM4 movc opcode. 2010-10-07 15:58:10 +02:00
Henri Verbeet 1330f844f8 wined3d: Recognize the SM4 and opcode. 2010-10-07 15:58:09 +02:00
Matteo Bruni 20010235ad wined3d: Keep track of texture transformation states in compiled pixel shaders. 2010-10-04 15:00:08 +02:00