Commit graph

3416 commits

Author SHA1 Message Date
Tobias Jakobi
05c4d0a8b0 wined3d: Fix comments about NP2 fixup. 2009-07-02 11:57:01 +02:00
Tobias Jakobi
0caebe5f51 wined3d: Force NP2 constant reload in shader_arb_select. 2009-07-02 11:56:57 +02:00
Tobias Jakobi
ef280280c2 wined3d: Implement shader_arb_load_np2fixup_constants. 2009-07-02 11:56:51 +02:00
Tobias Jakobi
e29babbf6d wined3d: Add NP2 fixup code to shader_hw_sample (ARB). 2009-07-02 11:56:45 +02:00
Tobias Jakobi
034fa4268c wined3d: Add NP2 fixup code to shader_arb_generate_pshader. 2009-07-02 11:56:39 +02:00
Tobias Jakobi
ec30e9a85e wined3d: Add arb_ps_np2fixup_info structure and improve structure packing for arb_ps_compiled_shader. 2009-07-02 11:56:33 +02:00
Tobias Jakobi
2d532a1597 wined3d: Add ps_arb_max_local_constants. 2009-07-02 11:56:27 +02:00
Stefan Dösinger
c82da7d975 wined3d: Don't dirtify too many shader constants.
If we have start = 4, count = 3, the highest dirty constant is the one with index 6. start + count gives 7,
so it already includes the zero-based array correction. Don't add an additional 1.

Additionally to the inefficiency of looking at one extra constant, this causes problems if the driver
rejects loading 257 constants on the initial load. In this case no constant is loaded if
GL_EXT_gpu_program_parameters is used.
2009-07-01 13:14:34 +02:00
Henri Verbeet
40bc47901c wined3d: Use flags for driver quirks. 2009-07-01 11:41:44 +02:00
Henri Verbeet
c475789bb6 wined3d: Move the driver_quirk structure to directx.c. 2009-07-01 11:41:38 +02:00
Henri Verbeet
50419daa11 wined3d: Try to activate the original context for queries. 2009-07-01 11:41:33 +02:00
Henri Verbeet
ca69ec0e85 wined3d: Recognize geometry shaders in shader_trace_init(). 2009-07-01 11:41:27 +02:00
Henri Verbeet
5df58b7f89 wined3d: Replace "pshader" checks with explicit type checks in shader_get_registers_used(). 2009-07-01 11:41:21 +02:00
Henri Verbeet
1911adcea5 wined3d: Consolidate "color0_mov" handling a bit. 2009-06-30 12:55:45 +02:00
Henri Verbeet
02a0614aa1 wined3d: Use dst_param.reg.idx to index reg_maps->texcoord_mask. 2009-06-30 12:55:40 +02:00
Henri Verbeet
03702e1de3 wined3d: Remove some redundant pshader checks. 2009-06-30 12:55:24 +02:00
Henri Verbeet
592361be38 wined3d: Pass the shader type to shader_record_register_usage(). 2009-06-30 12:55:19 +02:00
Henri Verbeet
5b6877ee62 wined3d: Remove shader_is_version_token(). 2009-06-30 12:55:11 +02:00
Henri Verbeet
4075e45d81 wined3d: Add a WARN to IWineD3DDeviceImpl_SetFrontBackBuffers() about potentially being called without a GL context. 2009-06-29 12:30:37 +02:00
Henri Verbeet
f57967c983 wined3d: Always check the result of wglMakeCurrent(). 2009-06-29 12:30:28 +02:00
Henri Verbeet
40565211fb wined3d: Prevent GL calls from DestroyContext() if we failed to make the GL context current.
This can happen if the window is destroyed before the device is released.
2009-06-29 12:30:24 +02:00
Henri Verbeet
6df3f23bca wined3d: Add some missing GL locking to init_format_fbo_compat_info(). 2009-06-29 12:30:18 +02:00
Stefan Dösinger
d5e2c14225 wined3d: Add a NOP ret handler to GLSL. 2009-06-29 12:28:49 +02:00
Stefan Dösinger
d4312ebb16 wined3d: Add the vertex shader footer in the main function. 2009-06-29 12:28:40 +02:00
Stefan Dösinger
5befed21f6 wined3d: Write the vshader footer in a separate function. 2009-06-29 12:28:31 +02:00
Stefan Dösinger
5859d87754 wined3d: Implement function calls with NV exts. 2009-06-29 12:28:21 +02:00
Stefan Dösinger
031401a070 wined3d: ARB*p is already on after a depth blit. 2009-06-29 12:28:13 +02:00
Stefan Dösinger
9d63585352 wined3d: Don't disable ARBfp if the replacement pipeline is used.
If the replacement pipeline is used, ARBfp is always on. Disabling it
can break shaders or the replacement pipeline, because the shader and
ffp code assumes the extension is on.
2009-06-29 12:28:06 +02:00
Stefan Dösinger
1f8761219b wined3d: Only update the screen when the frontbuffer was changed.
There is no need to copy the frontbuffer to the screen when the backbuffer was
modified...
2009-06-29 12:27:55 +02:00
Francois Gouget
5aac7fe783 wined3d: Add a trailing '\n' to a FIXME() trace. 2009-06-26 14:40:21 +02:00
Henri Verbeet
7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Henri Verbeet
626baad817 wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette(). 2009-06-26 12:05:00 +02:00
Henri Verbeet
1b306c25e2 wined3d: Make sure we have an active GL context before calling surface_remove_pbo(). 2009-06-26 12:04:57 +02:00
Henri Verbeet
db5b126da6 wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad(). 2009-06-26 12:04:53 +02:00
Henri Verbeet
181442a6a2 wined3d: Make sure queries have an active GL context. 2009-06-26 12:04:48 +02:00
Stefan Dösinger
d1cd08b7b3 wined3d: Honor WINED3DSPSM_NOT in ARB. 2009-06-26 12:02:29 +02:00
Stefan Dösinger
8fb1e2acfb wined3d: Jump to the else branch if cond is false, not endif. 2009-06-26 12:02:18 +02:00
Stefan Dösinger
a07b50c94c wined3d: Support writemasks on texkill in ARB. 2009-06-26 12:02:12 +02:00
Stefan Dösinger
3a327908de wined3d: Initialize the used clip planes even if no clip emulation is used. 2009-06-26 12:02:07 +02:00
Stefan Dösinger
4d86eac60a wined3d: Unclamp vertex colors for 3.0 shaders in ARB if needed. 2009-06-26 12:02:01 +02:00
Stefan Dösinger
f69fb5c011 wined3d: POW and LOG operate on the absolute value. 2009-06-26 12:01:54 +02:00
Stefan Dösinger
bd14b6e2b4 wined3d: IFC requires GL_NV_fragment_program2. 2009-06-26 12:01:44 +02:00
Stefan Dösinger
d4854b636c wined3d: Beware of double negations. 2009-06-26 12:01:36 +02:00
Tobias Jakobi
a9f912466b wined3d: Force NP2 fixup constant reloading in shader_glsl_select. 2009-06-25 14:34:13 +02:00
Tobias Jakobi
ef7f769be6 wined3d: Enable constant packing for NP2 texcoord fixup.
Previously every texture that was flagged for NP2 fixup used a vec2
uniform in the shader to store texture dimensions.  Turns out that the
GLSL compilers just maps vec2 to vec4, so essentially wasting 2
floats. The new code only uses vec4 uniforms but packs dimensions info
of 2 textures into a single uniform.
2009-06-25 14:34:13 +02:00
Tobias Jakobi
7906774339 wined3d: Add ps_np2fixup_info structure. 2009-06-25 14:34:13 +02:00
Henri Verbeet
4a137815db wined3d: Make sure we have an active GL context in IWineD3DDeviceImpl_SetCursorProperties(). 2009-06-25 11:47:34 +02:00
Henri Verbeet
5dcbc40581 wined3d: Make sure we have an active GL context in context_resource_released(). 2009-06-25 11:47:28 +02:00
Henri Verbeet
94cd8656ea wined3d: Make context_resource_released() responsible for activating a different GL context.
In case lastActiveRenderTarget is destroyed.
2009-06-25 11:47:24 +02:00
Henri Verbeet
964f4b0157 wined3d: Make sure we have an active GL context in buffer_PreLoad(). 2009-06-25 11:47:16 +02:00