Commit Graph

446 Commits

Author SHA1 Message Date
Henri Verbeet
dcc969c32c wined3d: Get rid of dst_fbo.
As a result we can get rid of a couple of other things as well.
2011-08-01 11:16:08 +02:00
Stefan Dösinger
41f9ca2abf wined3d: Restore the call to context_validate_onscreen_formats.
This got lost accidentally in d321959dd7.
2011-07-28 11:29:52 +02:00
Henri Verbeet
c2ede1d4c8 wined3d: Only invalidate state for the current context in swapchain_blit(). 2011-07-27 11:51:50 +02:00
Henri Verbeet
68d692f49c wined3d: Get rid of the redundant state_table parameter to context_invalidate_state(). 2011-07-27 11:51:46 +02:00
Henri Verbeet
b09b7e323c wined3d: Store a pointer to the state table in the context. 2011-07-25 11:59:15 +02:00
Henri Verbeet
43d2515da5 wined3d: Use the "rts" variable in context_apply_clear_state(). 2011-07-25 11:59:04 +02:00
Henri Verbeet
e5036e365e wined3d: Use gl_info from the context in context_apply_clear_state(). 2011-07-25 11:58:59 +02:00
Stefan Dösinger
f99a2748e4 wined3d: Don't apply and invalidate the framebuffer when clearing the device's fb. 2011-07-20 19:23:05 +02:00
Henri Verbeet
e4d2d78500 wined3d: Pass a wined3d_state pointer to state handlers.
Instead of an entire stateblock. This is mainly useful is we ever want to call
state handlers on state not stored in a stateblock.
2011-07-14 14:11:25 +02:00
Henri Verbeet
9375a87c86 wined3d: Make the context and device parameters to find_draw_buffers_mask() const. 2011-07-14 14:11:21 +02:00
Henri Verbeet
fcf4303e1a wined3d: Store a pointer to the framebuffer state in struct wined3d_state. 2011-07-14 14:11:07 +02:00
Henri Verbeet
590505c0a4 wined3d: Make context_create() work if the window is already destroyed. 2011-07-06 11:14:16 +02:00
Stefan Dösinger
718c614937 wined3d: Pass a struct wined3d_fb_state * to context_apply_clear_state. 2011-07-05 17:33:56 +02:00
Stefan Dösinger
cd96c59d91 wined3d: Track framebuffer changes. 2011-07-05 17:33:43 +02:00
Stefan Dösinger
d321959dd7 wined3d: Move FBO application into a state handler. 2011-07-05 17:33:35 +02:00
Stefan Dösinger
1aa85c96a9 wined3d: Rename the rt mask generation functions. 2011-07-05 17:33:22 +02:00
Henri Verbeet
c20b23eb00 wined3d: Make the surface parameter to context_surface_update() const. 2011-07-01 14:39:35 +02:00
Henri Verbeet
2257a70e37 wined3d: Make the device parameter to context_resource_unloaded() const. 2011-07-01 14:39:35 +02:00
Henri Verbeet
6894d8022a wined3d: Make the device parameter to context_resource_released() const. 2011-07-01 14:39:35 +02:00
Henri Verbeet
53b99dde14 wined3d: Make the device and surface parameters to context_enum_surface_fbo_entries() const. 2011-07-01 14:39:35 +02:00
Henri Verbeet
b3b1d20562 wined3d: Make the context parameter to context_check_fbo_status() const. 2011-07-01 14:39:35 +02:00
Henri Verbeet
a8de1272da wined3d: Make the context parameter to context_attach_depth_stencil_fbo() const. 2011-06-29 10:08:44 -05:00
Henri Verbeet
0bae611bf5 wined3d: Make the context parameter to context_create_fbo_entry() const. 2011-06-29 10:08:39 -05:00
Henri Verbeet
560d5188b7 wined3d: Make the rts and ds parameters to context_validate_rt_config() const. 2011-06-28 10:18:30 -05:00
Henri Verbeet
64bf19d07b wined3d: Make the generate_rt_mask_no_fbo() parameters const. 2011-06-28 10:18:26 -05:00
Henri Verbeet
b9721600dc wined3d: Make the target parameter to generate_rt_mask_from_surface() const. 2011-06-28 10:18:20 -05:00
Henri Verbeet
4725d4bb99 wined3d: Make the depth_stencil parameter to context_validate_onscreen_formats() const. 2011-06-28 10:18:15 -05:00
Stefan Dösinger
5e97e22951 wined3d: Separate stream sources and vertex declaration.
Changing the stream sources does not require a reapplication of the
vertex declaration. Even setting a NULL vertex buffer doesn't make
attributes disappear - it just causes a segfault on Windows.
2011-06-27 16:43:24 -05:00
Stefan Dösinger
9ed6dc9144 wined3d: Don't set FBO attachment filtering to GL_NEAREST.
The min and mag filters should not have any effect when rendering to
textures. This code was once needed to work around a bug in the Nvidia
driver. Changing the texture filter states is expensive and makes it
harder to apply the FBO state only when needed.
2011-06-27 16:43:08 -05:00
Henri Verbeet
c4da128b8f wined3d: Make the device and target parameters to FindContext() const. 2011-06-23 09:47:34 +02:00
Matteo Bruni
32787ec0dd wined3d: Fix draw buffers tracking. 2011-06-22 15:21:43 +02:00
Matteo Bruni
0919ac3b51 wined3d: Fix context_apply_draw_buffers() with backbuffer ORM. 2011-06-22 15:21:36 +02:00
Matteo Bruni
5b67bd4fb2 wined3d: Fix context_apply_blit_state(). 2011-06-22 15:21:27 +02:00
Stefan Dösinger
663fac5bcd wined3d: Set last_was_blit to FALSE in the if condition that checks for it. 2011-06-10 10:45:38 +02:00
Stefan Dösinger
7b39005256 wined3d: Don't check the FBO status if FIXMEs are off. 2011-06-10 10:45:35 +02:00
Matteo Bruni
c23a5443c1 wined3d: Simplify context_apply_draw_buffers() a bit. 2011-06-07 18:12:03 +02:00
Matteo Bruni
002674e49d wined3d: Fix glDrawBuffers() optimization. 2011-06-07 18:12:01 +02:00
Henri Verbeet
84ce0020f4 wined3d: Rename Context_MarkStateDirty() to context_invalidate_state(). 2011-06-06 16:18:48 +02:00
Henri Verbeet
c8f26a1345 wined3d: Rename IWineD3DDeviceImpl_MarkStateDirty() to device_invalidate_state(). 2011-06-06 16:18:41 +02:00
Stefan Dösinger
5b9daccc66 wined3d: Call context_apply_draw_buffers under the GL lock. 2011-05-27 17:53:37 +02:00
Stefan Dösinger
dda91ac02a wined3d: Call frag_pipe->enable_extension under the GL lock. 2011-05-26 16:41:14 +02:00
Henri Verbeet
019f6a8534 wined3d: Mask out writes to unused render targets.
Outputs not written by the pixel shader are undefined in GL, but in D3D the
render target is unmodified.
2011-05-25 11:49:23 +02:00
Henri Verbeet
6d31039034 wined3d: Rename IWineD3DDeviceImpl_FindTexUnitMap() to device_update_tex_unit_map(). 2011-05-25 11:48:38 +02:00
Henri Verbeet
6d6402afef wined3d: Get rid of the mostly unused SRGB_BOTH enum value. 2011-05-19 10:08:02 +02:00
Henri Verbeet
aba42d1fa5 wined3d: Introduce a separate structure for framebuffer state. 2011-05-19 10:07:57 +02:00
Henri Verbeet
0e0e5c3e38 wined3d: Get rid of the IWineD3DDevice typedefs. 2011-05-17 10:06:23 +02:00
Henri Verbeet
8d4ca1f815 wined3d: Remove COM from the device implementation. 2011-05-17 10:06:18 +02:00
Stefan Dösinger
20b147bfeb wined3d: Consistently store format bitcounts in BYTEs. 2011-05-16 16:35:30 +02:00
Francois Gouget
5920de5ffb Assorted spelling and case fixes. 2011-05-09 12:09:27 +02:00
Henri Verbeet
0cbdd10c58 wined3d: Get rid of the WineD3D_PixelFormat typedef. 2011-05-06 14:23:46 +02:00
Adam Martinson
f912e55610 wined3d: Fix an oops/crash in context_destroy_gl_resources().
Introduced by 96b150929b.
2011-05-02 12:54:25 +02:00
Henri Verbeet
c4b73c4550 wined3d: Get rid of the IWineD3DSurface typedefs. 2011-04-29 16:52:13 +02:00
Henri Verbeet
82e39ced7f wined3d: Make sure we release the correct DC in context_update_window(). 2011-04-22 10:44:16 +02:00
Matteo Bruni
a3c12c5be4 wined3d: Fallback to our private window when context activation fails otherwise. 2011-04-20 16:31:48 +02:00
Matteo Bruni
edebabc2ec wined3d: Add two functions for GL context activation/restore. 2011-04-20 16:31:45 +02:00
Henri Verbeet
d30da7ae39 wined3d: Get rid of the IWineD3DSwapChain typedefs. 2011-04-14 17:13:57 +02:00
Henri Verbeet
84103460bd wined3d: Check FBO completeness after the read / draw buffers are specified.
Unless the driver implements ARB_ES2_compatibility / GL4.1, FBO completeness
depends on what read / draw buffers are set.
2011-04-11 11:50:51 +02:00
Henri Verbeet
8e12b2e61e wined3d: Set the read buffer to GL_NONE for draws and clears on an FBO.
For the benefit of depth-only draws and clears, that would otherwise fail FBO
completeness, unless the driver supports ARB_ES2_compatibility.
2011-04-11 11:50:48 +02:00
Henri Verbeet
2f3c147ab2 wined3d: Only set draw buffers that are explicitly specified in context_apply_draw_buffers().
Anything that isn't explicitly specified is set to GL_NONE by
glDrawBuffersARB().
2011-04-11 11:50:44 +02:00
Henri Verbeet
bf99c0248f wined3d: Explicitly handle 0 rt_count right at the start of context_apply_draw_buffers().
It's trivial, and allows the rest of the code to assume at least 1 render
target is present.
2011-04-11 11:50:40 +02:00
Henri Verbeet
99bfd81714 wined3d: Allow depth and stencil clears on surfaces other than the current depth / stencil buffer. 2011-04-06 12:05:06 +02:00
Henri Verbeet
0ce17ea27e wined3d: Don't bother setting a depth render buffer for WINED3DFMT_NULL render targets. 2011-04-05 11:13:39 +02:00
Matteo Bruni
77face22d5 wined3d: Get rid of context_validate.
It should not be needed anymore, now the wined3d context is implicitly
validated on GL context activation. The check itself wasn't reliable
because of some threading issues and it also brought a small performance hit.
2011-04-04 12:25:56 +02:00
Matteo Bruni
06ef87ceb1 wined3d: Better handle some instances when we can't make the required GL context current. 2011-04-01 11:50:20 +02:00
Matteo Bruni
0322114cd6 wined3d: Fix an error message. 2011-04-01 11:50:05 +02:00
Henri Verbeet
692aa004d0 wined3d: Rename "numContexts" to "context_count". 2011-03-31 12:37:47 +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
fd8e18bd2b wined3d: Remove COM from the texture implementation. 2011-03-28 17:08:52 +02:00
Stefan Dösinger
82f6410bfc wined3d: Disable the depth stencil if it is smaller than the primary color buffer.
This way we get correct behavior if the application has depth and stencil related tests
disabled. If we attach the depth stencil GL limits the framebuffer size to the smallest
surface, making some parts of the framebuffer inaccessible.
2011-03-16 16:31:53 +01:00
Henri Verbeet
1bff3599ce wined3d: Don't invalidate STATE_VDECL in context_set_render_offscreen().
This used to be invalidated to update the vertex shader position fixup
uniform, but this is handled by STATE_VIEWPORT now. Any performance impact
from this will be minimal, since in practice there are enough other things
invalidating STATE_VDECL that it's close to being invalidated for every draw
anyway.
2011-03-11 11:40:56 +01:00
Henri Verbeet
ac9c592ca9 wined3d: Store all the resource desc information in struct wined3d_resource. 2011-03-09 12:29:17 +01:00
Henri Verbeet
75c8e9f7b4 wined3d: Use EXT_texture_sRGB_decode to avoid sRGB texture duplication. 2011-03-03 17:47:13 +01:00
Henri Verbeet
09c3537ad0 wined3d: Retrieve the GL texture through a function. 2011-03-03 17:47:13 +01:00
Henri Verbeet
d523dee76b wined3d: Retrieve the surface's texture name through a function. 2011-03-02 12:50:59 +01:00
Henri Verbeet
1de6adfbae wined3d: Make IWineD3DResourceImpl an independent structure. 2011-03-01 13:21:59 +01:00
Henri Verbeet
c964134a59 wined3d: Add support for the NULL format. 2011-01-27 14:13:55 +01:00
Henri Verbeet
2469597e2a wined3d: Verify we have at least one framebuffer attachment before doing clears or draws. 2011-01-27 14:13:39 +01:00
Henri Verbeet
227efbbf65 wined3d: Store a pointer to an array of IWineD3DSwapChainImpl pointers in the device. 2011-01-20 12:19:04 +01:00
Henri Verbeet
6f95f05aaf wined3d: Move swapchain context retrieval to swapchain.c. 2011-01-20 12:18:58 +01:00
Henri Verbeet
f250ee66a3 wined3d: Pass an IWineD3DSwapChainImpl pointer to findThreadContextForSwapChain(). 2011-01-19 12:22:41 +01:00
Henri Verbeet
b439fa9d8f wined3d: Pass an IWineD3DSwapChainImpl pointer to swapchain_create_context_for_thread(). 2011-01-19 12:22:38 +01:00
Henri Verbeet
2ceb2a8cdd wined3d: Pass an IWineD3DResourceImpl pointer to context_resource_unloaded(). 2011-01-18 12:31:58 +01:00
Henri Verbeet
c28d6f38af wined3d: Pass an IWineD3DResourceImpl pointer to context_resource_released(). 2011-01-17 13:22:06 +01:00
Matteo Bruni
ef0f358813 wined3d: Don't call glPointParameter with a random context. 2011-01-07 15:01:38 +01:00
Andrew Nguyen
12880784fe wined3d: Handle the swapchain presentation interval with wglSwapIntervalEXT. 2010-12-27 15:39:41 +01:00
Henri Verbeet
00550613e7 wined3d: Remove a redundant parameter to enable_extension(). 2010-12-02 11:54:03 +01:00
Henri Verbeet
f92a0667d7 wined3d: Remove a unused parameter to shader_dirtifyable_constants(). 2010-12-02 11:53:57 +01:00
Henri Verbeet
efb185dcd5 wined3d: Rename the wined3d_format "Flags" field to "flags". 2010-11-12 15:43:08 +01:00
Henri Verbeet
1fa19d8e42 wined3d: Take the location into account in context_apply_fbo_state_blit(). 2010-11-11 13:11:26 +01:00
Michael Stefaniuc
1183383a6f wined3d: Fix some checkGLcall() messages. 2010-11-05 17:15:34 +01:00
Henri Verbeet
7414ebc975 wined3d: Don't flip the coordinate system in set_blit_dimension(). 2010-10-29 14:33:57 +02:00
Henri Verbeet
53f2765445 wined3d: Remove a FIXME in context_apply_blit_state().
There are some legitimate cases for this codepath, for example when blitting
to a render target with fixups or a color key.
2010-10-19 13:50:17 +02:00
Henri Verbeet
bc2db78c3a wined3d: Explicitly document some more consequences of GL locking policy.
The basic rule is that you can't call anything that takes the user32 / gdi32
lock while under the GL (winex11) lock. As a consequence, you can't call
anything like context_acquire() or context_destroy() either.
2010-09-03 11:05:10 +02:00
Henri Verbeet
3a7f08a56f wined3d: Rename wined3d_format_desc to wined3d_format. 2010-08-31 14:23:47 +02:00
Henri Verbeet
9363ea55ee wined3d: Simply use context_apply_draw_buffers() in context_apply_clear_state(). 2010-08-30 11:26:45 +02:00
Henri Verbeet
08101957ba wined3d: Explicitly pass render targets to context_apply_draw_buffers().
This avoids the special handling for blits.
2010-08-30 11:26:45 +02:00
Henri Verbeet
b233e7b301 wined3d: Rename the "format" field in wined3d_format_desc to "id". 2010-08-26 12:41:44 +02:00
Henri Verbeet
3fd66bc650 wined3d: Make some lookup tables const. 2010-08-23 12:04:36 +02:00
Henri Verbeet
368e5eb87a wined3d: Avoid IWineD3DSurface_GetContainer(). 2010-08-17 11:55:32 +02:00