Stefan Dösinger
0629585c24
wined3d: Work around an ARBFP vs GLSL bug in Mac OS.
2009-05-27 11:57:54 +02:00
Chris Robinson
12799db349
wined3d: Decrement fbo_entry_count when one is removed from the list.
2009-05-25 11:22:25 +02:00
Henri Verbeet
b35e469d9d
wined3d: Document functions that depend on the caller to do GL locking.
2009-05-15 10:25:41 +02:00
Henri Verbeet
e260132701
wined3d: Add missing GL locking to set_blit_dimension() calls.
2009-05-14 11:12:46 +02:00
Henri Verbeet
1070e075e4
wined3d: Add missing GL locking to calls to FBO functions.
2009-05-14 11:12:38 +02:00
Henri Verbeet
b7ac22004f
wined3d: Add missing GL locking to shader_backend_t.shader_select() calls.
2009-05-13 12:01:57 +02:00
Henri Verbeet
7f14ea01c6
wined3d: Add missing GL locking to state table calls.
2009-05-13 12:01:52 +02:00
Henri Verbeet
0d446053da
wined3d: Don't create more than WINED3D_MAX_FBO_ENTRIES FBO entries.
...
This essentially turns the FBO entry list into an LRU cache.
2009-05-12 11:18:15 +02:00
Stefan Dösinger
668328a697
wined3d: Work around a bad crash in fglrx.
2009-05-08 12:16:50 +02:00
Henri Verbeet
42e31a4242
wined3d: Fix a few sign compare warnings.
2009-03-25 11:12:30 +01:00
Henri Verbeet
dd1f0d9c48
wined3d: Pass format_desc to getColorBits() and getDepthStencilBits().
2009-03-24 12:57:38 +01:00
Henri Verbeet
1f4e7b27ed
wined3d: Set the currently active context to NULL when it's destroyed.
...
This should make us crash when trying to use the "currently active" context
after it has been destroyed, rather than messing around with freed memory.
2009-03-23 14:08:02 +01:00
Henri Verbeet
2dc7fc2916
wined3d: Remove the format field from IWineD3DResourceClass.
2009-03-13 11:29:19 +01:00
Henri Verbeet
a56e3a102b
wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry().
2009-03-13 11:29:10 +01:00
Henri Verbeet
4e2c87dd22
wined3d: Handle error conditions better in RemoveContextFromArray().
2009-03-09 14:44:02 +01:00
Stefan Dösinger
4386a827e9
wined3d: Pass the requested srgb flag to PreLoad.
...
Add a new wined3d-internal PreLoad function to textures and surfaces
that takes a parameter specifying wether the rgb or srgb texture
should be loaded.
2009-02-17 12:51:36 +01:00
Stefan Dösinger
365e1f3b07
wined3d: Avoid hooking non-fog glEnable/glDisable calls.
...
This prevents fallout from the GL_EXT_fog_coord emulation. glEnable
and glDisable calls other than those that change GL_FOG are not
hooked. The glEnableWINE and glDisableWINE functions can be used to
add other hooks too if ever needed.
2009-01-12 13:03:47 +01:00
Henri Verbeet
73823ef5f6
wined3d: Remove the shader_cleanup() method from the shader backend.
2008-12-17 14:02:24 +01:00
Stefan Dösinger
31da3c0578
wined3d: Emulate GL_EXT_fog_coord.
2008-12-16 14:34:11 +01:00
Stefan Dösinger
d707f018df
wined3d: Remove some needless initializations.
...
They're not needed, they are handled by the state management anyway.
2008-12-16 14:32:43 +01:00
Stefan Dösinger
199a3468bf
wined3d: Fake GL_ARB_multitexture.
2008-12-16 14:31:25 +01:00
Henri Verbeet
b451048eb7
wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
...
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Andrew Talbot
fdba8b8593
wined3d: Sign-compare warnings fix.
2008-11-21 11:29:12 +01:00
Roderick Colenbrander
e848aed2b8
wined3d: ActivateContext caused a lot of recursive ENTER_GL calls while it is especially dangerous in here as this function can indirectly trigger GDI calls.
2008-10-20 11:38:36 +02:00
Alexandre Julliard
6cfef95ce7
wined3d: Convert source files to utf-8.
2008-10-18 19:21:20 +02:00
Henri Verbeet
723f3656e5
wined3d: Modifying GL_TEXTURE_MIN_FILTER modifies both the MINFILTER and MIPFILTER sampler states.
2008-10-16 12:35:51 +02:00
Henri Verbeet
bd5abfb1e4
wined3d: Remove a redundant local variable in apply_draw_buffer().
2008-10-16 12:35:40 +02:00
Henri Verbeet
231e2c60b5
wined3d: The container is always non-NULL if GetContainer() succeeds.
2008-10-16 12:35:34 +02:00
Henri Verbeet
af6636c21c
wined3d: Don't do GL calls without a context.
2008-10-09 12:14:15 +02:00
Henri Verbeet
0420f17b1f
wined3d: Remove a redundant initialization of cfgs in WineD3D_ChoosePixelFormat.
2008-10-08 12:16:48 +02:00
Henri Verbeet
76de76e508
wined3d: Destroy FBO entries in the context.
2008-09-22 12:20:24 +02:00
Henri Verbeet
459673da1a
wined3d: Make sure update_minfilter and update_magfilter are initialized.
2008-09-22 12:20:18 +02:00
Henri Verbeet
45820046e8
wined3d: Create a FBO for each combination of render targets and depth stencil.
...
The main reason for this change is crappy performance for reconfiguring FBOs.
2008-09-19 11:30:00 +02:00
Henri Verbeet
3a8ab00fe1
wined3d: Get rid of context_set_depth_stencil_fbo().
...
Integrate clearing the depth stencil attachment in context_attach_depth_stencil_fbo().
2008-09-19 11:29:48 +02:00
Henri Verbeet
8f2ed870f1
wined3d: Get rid of context_set_render_target_fbo().
...
Integrate clearing the attachment in context_attach_surface_fbo().
2008-09-19 11:29:39 +02:00
Henri Verbeet
734b31e00b
wined3d: Handle drawbuffers in context_apply_fbo_state() instead of context_set_render_target_fbo().
2008-09-19 11:29:27 +02:00
Henri Verbeet
9533a5cbbf
wined3d: Split off a function for applying an attachment's filter states.
2008-09-19 11:29:18 +02:00
Henri Verbeet
a269236649
wined3d: Move FBO handling functions to context.c.
2008-09-19 11:29:13 +02:00
Stefan Dösinger
c36e033856
wined3d: Fix the pixelformat selection logic.
2008-09-05 11:23:09 +02:00
Henri Verbeet
4b6887b8e3
wined3d: Be more careful when deleting FBOs.
...
Clear all attachments before deleting FBOs. It should be valid to
delete FBOs that still have attachments, but for some reason the
nvidia drivers don't like it. The resulting memory corruption can be
pretty nasty, and this workaround seems clean enough.
2008-09-04 11:14:53 +02:00
Stefan Dösinger
0e2713a1e1
wined3d: Remove unneeded code.
...
The fixed function backend disables the extension. Also messing
with the final combiner shouldn't be needed if nvrc is disabled.
2008-08-27 13:21:24 +02:00
Stefan Dösinger
e110f2c680
wined3d: Don't retry less strict formats if a match was found.
2008-08-25 12:26:26 +02:00
Henri Verbeet
e3507a725f
wined3d: glDeleteFramebuffersEXT() needs a context.
2008-08-25 11:39:10 +02:00
H. Verbeet
05931f4a5a
wined3d: Track FBOs per-context.
...
Although sharing FBOs across contexts is allowed by EXT_framebuffer_object
(issue 76), it causes issues with nVidia drivers. Considering the GL 3 spec
explicitly disallows sharing of FBOs accross contexts (Appendix D), this
patch is probably the right thing to do.
2008-08-22 10:38:59 +02:00
Alexander Dorofeyev
1da8a032af
wined3d: Disable TEXTURE_RECTANGLE in SetupForBlit.
2008-08-21 13:35:23 +02:00
Stefan Dösinger
77204574d1
wined3d: Prefer aux buffer matches over alpha matches.
...
Half Life 2 uses D3DFMT_X8R8G8B8 for the back buffer, but macos
supports aux buffers only on D3DFMT_A8R8G8B8. I think having aux
buffers is more important right now than having a precise alpha
match.
2008-08-21 13:33:09 +02:00
Stefan Dösinger
5d75939b09
wined3d: Keep track of the last used device.
2008-08-20 12:33:25 +02:00
H. Verbeet
2d6d879562
wined3d: Handle CTXUSAGE_BLIT with offscreen targets and FBO ORM.
...
This is mostly for correctness, in practice we should always be able
to avoid using CTXUSAGE_BLIT for offscreen targets when FBO ORM is
used.
2008-08-05 14:09:34 +02:00
H. Verbeet
b685b84e66
wined3d: Apply FBO state in ActivateContext().
...
Fixes some GL errors due to calling glDrawBuffer(GL_BACK) when an FBO
is still active.
2008-08-05 14:09:34 +02:00
H. Verbeet
f037eb8696
wined3d: Move setting the draw buffer to a separate function.
2008-08-04 13:52:09 +02:00