Commit Graph

618 Commits

Author SHA1 Message Date
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
Henri Verbeet e12f5ff08a wined3d: Pass a wined3d_state structure to find_ps_compile_args(). 2010-09-29 12:22:39 +02:00
Henri Verbeet 8d5a25bbec wined3d: Pass a wined3d_state structure to find_vs_compile_args(). 2010-09-29 12:22:36 +02:00
Henri Verbeet 9224751a13 wined3d: Pass a wined3d_state structure to use_vs(). 2010-09-28 17:33:17 +02:00
Henri Verbeet b37ce45d6c wined3d: Move pixel shader constants to wined3d_state. 2010-09-20 13:48:13 +02:00
Henri Verbeet 33dfb9539c wined3d: Move the pixel shader to wined3d_state. 2010-09-20 13:48:13 +02:00
Henri Verbeet 8a148cc7c5 wined3d: Move vertex shader constants to wined3d_state. 2010-09-20 13:48:12 +02:00
Henri Verbeet dd4aea36c9 wined3d: Move the vertex shader to wined3d_state. 2010-09-20 13:48:12 +02:00
Henri Verbeet d728d5f0ec wined3d: Move texture bindings to wined3d_state. 2010-09-18 13:05:49 +02:00
Henri Verbeet 5a3a4ac77a wined3d: Remove IWineD3DBaseTexture::GetTextureDimensions() from the public wined3d interface. 2010-09-18 13:05:44 +02:00
Henri Verbeet 5b3c1a2082 wined3d: Move texture states to wined3d_state. 2010-09-16 10:12:17 -05:00
Henri Verbeet b68d257710 wined3d: Get rid of redundant comparisons against NULL / 0. 2010-09-14 09:43:33 -05:00
Henri Verbeet 2af746b96e wined3d: Check the GLSL info log for all shaders. 2010-08-25 11:57:24 +02:00
Stefan Dösinger 79666d2b6d wined3d: Don't return a value from a void function. 2010-08-23 13:37:03 +02:00
Henri Verbeet 37c8632811 wined3d: Make some lookup tables const. 2010-08-04 13:24:24 +02:00
Henri Verbeet 4936e71828 wined3d: Clamp vertex shader outputs.
To avoid having to interpolate infinities over fragments.
2010-07-29 17:33:35 +02:00
Henri Verbeet 2114a36936 wined3d: Unify vertex shader output handling between shader models. 2010-07-29 17:33:35 +02:00
Henri Verbeet ea2bb2a904 wined3d: Invalid NP2 fixup info is an internal error. 2010-07-28 12:22:52 +02:00
Henri Verbeet 0d25da0c0d wined3d: Properly take both input and output masks into account in handle_ps3_input(). 2010-07-28 12:22:50 +02:00
Henri Verbeet ce39714228 wined3d: Check for unread registers in a more logical way in handle_ps3_input().
~0U always >= (in_count + 2).
2010-07-28 12:22:40 +02:00
Francois Gouget 620087c545 wined3d: Remove spaces after '\n's. 2010-06-24 10:33:46 +02:00
Rico Schüller c223e73bbb wined3d: Improve fglrx glsl spam filter. 2010-06-15 19:58:30 +02:00
Henri Verbeet 6f57aabc0a wined3d: Handle a zero source value for WINED3DSIH_POW. 2010-05-27 14:46:43 +02:00
Henri Verbeet e8ac9bbd7f wined3d: Get rid of GLINFO_LOCATION. 2010-05-25 13:29:00 +02:00
Henri Verbeet 79145e215b wined3d: Add support for shadow samplers. 2010-05-17 13:19:53 +02:00
Henri Verbeet 49e076eabd wined3d: Separate context acquisition and state application. 2010-05-04 13:14:59 +02:00
Henri Verbeet f09b8e454d wined3d: Avoid some needless depth buffer copies.
If an application switches between render targets of a different size, but
with the same depth/stencil surface it'll typically clear the depth/stencil
surface before drawing. However, in case of the smaller render target that
wouldn't be a full clear, so we'd have to do a depth copy if we also switched
between onscreen and offscreen rendering. Keeping track of which part of the
depth/stencil surface is current for onscreen/offscreen allows us to avoid
most of these kinds of copies. The current scheme requires the current/dirty
rectangle to have an origin at (0,0). This could be extended to an arbitrary
rectangle, but the bookkeeping becomes somewhat more complex in that case, and
it's not clear that there would be much of a benefit at this point.
2010-04-29 10:19:39 -05:00
Alexandre Julliard fdfabd53f1 wined3d: Avoid a compiler warning on old gcc. 2010-04-26 07:18:18 -05:00
Henri Verbeet 1c403e44b5 wined3d: Store the current render target as an IWineD3DSurfaceImpl pointer in the context. 2010-04-22 11:28:12 +02:00
Henri Verbeet c7a1848656 wined3d: Store render targets as IWineD3DSurfaceImpl pointers in the device. 2010-04-20 11:14:30 +02:00
Henri Verbeet 4cd69b8a09 wined3d: Simplify the generated GLSL for NRM. 2010-03-19 14:31:40 +01:00
Henri Verbeet 18ec2525a4 wined3d: Store the swapchain instead of the surface in the context. 2010-03-16 11:44:44 +01:00
Roderick Colenbrander 922ad80f42 wined3d: Rename yuv to complex in order to prepare for 8-bit palette fixups using the same code. 2010-03-03 12:53:41 +01:00
Henri Verbeet 576ea95803 wined3d: Remove the unused device type parameter from the shader backend's get_caps() function. 2010-02-04 13:39:27 +01:00
Henri Verbeet c43c2a2845 wined3d: Use the absolute source value in shader_glsl_rsq(). 2010-02-01 14:16:26 +01:00
Henri Verbeet adf4ca2e23 wined3d: Handle a zero source value for WINED3DSIH_RSQ. 2010-02-01 14:16:22 +01:00
Henri Verbeet ef82681d59 wined3d: Handle a zero source value for WINED3DSIH_RCP. 2010-02-01 14:16:18 +01:00
Henri Verbeet 4a8f93bade wined3d: Handle a zero source value for WINED3DSIH_LOG. 2010-02-01 14:16:15 +01:00
Henri Verbeet bef792f5ff wined3d: Handle zero-length vectors for WINED3DSIH_NRM.
Unfortunately there's no reliable way to generate infinity in GLSL, but a
sufficiently large value will probably do. The important part of the patch is
that we don't generate NaN, because that will keep propagating through the
entire shader.
2010-02-01 14:16:11 +01:00
Henri Verbeet 9f21f2c2f2 wined3d: Dump the GLSL shader source on link failure.
Mostly to help Mesa developers diagnose bug reports involving GLSL compile
failures, but it's convenient in general to have the source all in one place.
2010-01-29 13:30:06 +01:00
Henri Verbeet 705f96fa39 wined3d: Get rid of some unnecessary casts to specific shader types. 2010-01-26 12:08:13 +01:00
Henri Verbeet 3d112b6525 wined3d: Add support for EXT_gpu_shader4 provided sampling functions with explicit derivatives. 2010-01-25 12:58:59 +01:00
Henri Verbeet f71e84d89c wined3d: Store a pointer to the GL info in the shader context. 2010-01-25 12:58:52 +01:00
Henri Verbeet c78cce8845 wined3d: Use the correct GLSL functions for sampling Rect textures with explicit derivatives.
Also kill the obsolete comment.
2010-01-25 12:58:48 +01:00
Henri Verbeet 5f4ff65fb4 wined3d: Use the GLSL round() function when available. 2010-01-25 12:58:43 +01:00
Henri Verbeet 46cefd312c wined3d: Recognize the SM4 cut opcode. 2010-01-07 09:26:54 +01:00
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
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