Commit Graph

757 Commits

Author SHA1 Message Date
Ken Thomases 272873823e wined3d: Track if a context's hdc is private so we never need to restore its pixel format.
This currently only applies to the swapchain backup DC, but it will soon be
used for surfaces created using the WGL_WINE_surface extension.  Also, there
are a couple of cases where ddraw creates private windows and passes them in.
It could be extended to those.
2014-03-24 20:20:13 +01:00
Ken Thomases 57c51710e0 wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().
If we had to restore the pixel format then we know it won't be what we need
when the app calls into wined3d again.  This helps avoid the GetPixelFormat()
in context_acquire().
2014-03-24 20:20:12 +01:00
Ken Thomases ffb357b717 wined3d: Don't call GetPixelFormat() to set a flag that's already set. 2014-03-24 20:20:12 +01:00
Ken Thomases 90d7f3e03f wined3d: Simplify the error path of context_update_window(). 2014-03-24 20:20:11 +01:00
Ken Thomases 03ca2b2932 wined3d: Don't leak the HDC of an invalid context in context_update_window().
If context_set_gl_context() fails, it marks the context as invalid.  It still
has an HDC, though, and context_update_window() would lose the reference to
it.
2014-03-24 20:20:10 +01:00
Ken Thomases 4c4552c5a1 wined3d: Restore the pixel format of the window whose pixel format was actually changed. 2014-02-22 08:41:55 -06:00
Ken Thomases b8569d2f30 wined3d: Make context_update_window() just mark the GL context as needing to be set rather than setting it. 2014-02-22 08:41:51 -06:00
Ken Thomases baa85a097a wined3d: Use a separate flag to track if the GL context needs to be made current.
The new needs_set flag can be cleared after it's been heeded whereas restore_ctx
must not be cleared until the context has been released back to level 0.
2014-02-22 08:41:47 -06:00
Ken Thomases 2d1e67ee68 wined3d: Remove redundant call to context_set_pixel_format() from context_update_window().
It calls context_set_gl_context() just after and that starts with a call to
context_set_pixel_format().  Also, context_update_window() didn't do the
right thing (fall back to swapchain backup DC) if context_set_pixel_format()
fails.
2014-02-22 08:41:42 -06:00
Ken Thomases 088dd7289c wined3d: Call context_enter() before context_update_window() so it records the proper restore state. 2014-02-22 08:41:38 -06:00
Ken Thomases 59226e36b7 wined3d: Don't clear the GL context if it's not the one being destroyed by context_destroy_gl_resources().
The previous code clears the GL context if the context being destroyed is
not valid, even though the current one is some arbitrary, unrelated context.
2014-02-06 17:08:09 +01:00
Stefan Dösinger b81e560531 wined3d: Migrate surfaces to the new location flags. 2014-01-17 18:10:10 +01:00
Henri Verbeet f6b5dc246a wined3d: Get rid of the WINED3DSRGB enum. 2013-11-22 11:37:29 +01:00
Henri Verbeet 7427b72250 wined3d: Get rid of surface_internal_preload(). 2013-11-22 11:37:24 +01:00
Henri Verbeet e0beab8b81 wined3d: Merge texture2d_preload() and texture3d_preload() into wined3d_texture_load(). 2013-11-22 11:37:20 +01:00
Stefan Dösinger 047ce3af6e wined3d: Remove partial surface update support.
This has only ever worked for render targets, and only through the
glDrawPixels codepath, which was removed long ago.
2013-11-20 16:54:39 +01:00
Henri Verbeet 7e8897b7b8 wined3d: Get rid of the redundant texture_name and texture_name_srgb fields in struct wined3d_surface. 2013-11-20 11:28:22 +01:00
Henri Verbeet f4aab54ca1 wined3d: Mark the context valid if making it current on the "backup" window worked. 2013-11-04 11:05:46 +01:00
Henri Verbeet 3ad8989614 wined3d: Introduce a function for safely releasing a DC. 2013-11-04 11:05:43 +01:00
Henri Verbeet c228ffbaf0 wined3d: Unify shader binding points. 2013-10-10 10:44:53 +02:00
Henri Verbeet 8644b62726 wined3d: Move lowest_disabled_stage to the context. 2013-10-07 14:44:35 +02:00
Stefan Dösinger 59e0b841c7 wined3d: Move device_preload_textures into context.c. 2013-09-16 13:06:01 +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 f29c24f2de wined3d: Pass the context to surface_internal_preload. 2013-09-16 13:05:55 +02:00
Stefan Dösinger fe44be5fde wined3d: Pass the context to the internal texture_preload function. 2013-09-16 13:05:52 +02:00
Stefan Dösinger b8eb171b6b wined3d: Explicitly pass the state information to buffer_internal_preload. 2013-09-12 17:48:20 +02:00
Stefan Dösinger d8c43aabf7 wined3d: Move the decoded stream info into the context. 2013-09-12 17:48:14 +02:00
Henri Verbeet b62915dabb wined3d: Replace surface_modify_location(surface, location, FALSE) calls with surface_invalidate_location(). 2013-09-10 11:09:51 +02:00
Stefan Dösinger cd203b38a6 wined3d: Pass the context to the main buffer preload function. 2013-09-09 22:10:01 +02:00
Stefan Dösinger 87f931dc64 wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_get_sysmem(). 2013-09-09 22:10:00 +02:00
Stefan Dösinger 1cf192172e wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_create_buffer_object(). 2013-09-09 22:10:00 +02:00
Henri Verbeet b5e0c5d052 wined3d: Get rid of some leftover comments referring to the GL lock. 2013-09-02 18:02:26 +02:00
Henri Verbeet 53f747de1b wined3d: Move the WINED3D_MAX_FBO_ENTRIES constant to context.c. 2013-08-30 11:18:46 +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 74faebd68d wined3d: Store the current GLSL program per-context. 2013-08-23 10:41:28 +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
Stefan Dösinger a4f009d847 wined3d: Keep GL_UNPACK_CLIENT_STORAGE_APPLE off by default.
This is cleaner than the other way around and avoids side effects in
code that wasn't written with client storage in mind. Contrary to the
original intention, it also means fewer client storage toggle calls.
2013-08-19 18:07:45 +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 a3f59cf618 wined3d: Allow textures as swapchain surfaces. 2013-06-03 11:30:43 +02:00
Henri Verbeet b35045ba25 wined3d: Don't create FBOs in context_bind_fbo().
We can just do this in context_create_fbo_entry() now.
2013-05-27 19:28:52 +02:00
Henri Verbeet 7ca6839c94 wined3d: Also clear context->current_fbo in context_apply_blit_state().
The draw buffer handling code depends on this being current. This fixes a bug
exposed by commit 075fa6547c.
2013-05-27 19:28:47 +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
Matteo Bruni 58dc0346d6 wined3d: Remove some, now unnecessary, glReadBuffer(GL_NONE) calls.
This reverts parts of e4efcea223 and
8e12b2e61e.
2013-04-26 16:28:22 +02:00
Matteo Bruni bda63dd4a9 wined3d: Set GL_NONE for glReadBuffer / glDrawBuffer on FBO initialization. 2013-04-26 16:28:19 +02:00
Stefan Dösinger ac99d53991 wined3d: Move valid_rt_mask to wined3d_d3d_info. 2013-04-25 20:25:10 +02:00
Stefan Dösinger 16e862ba9d wined3d: Add a new structure for d3d limits and other info. 2013-04-25 20:25:07 +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 ee6d17cd54 wined3d: Add support for GL_ARB_debug_output. 2013-04-19 10:43:40 +02:00
Henri Verbeet 5115f55eeb wined3d: Use WGL_ARB_create_context when available. 2013-04-19 10:43:37 +02:00
Matteo Bruni 075fa6547c wined3d: Avoid redundant glDrawBuffer() calls. 2013-04-10 15:46:26 +02:00
Matteo Bruni 46fa0448d9 wined3d: Remove useless glClearxxx calls. 2013-04-10 15:46:14 +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
Stefan Dösinger 1a3f741643 wined3d: Remove draw_primitive_strided. 2013-01-25 11:30:33 +01:00
Henri Verbeet 3e7c800e9c wined3d: Get rid of the user_stream field from wined3d_state.
All remaining uses are equivalent to "device->up_strided". (Which should of
course eventually go away as well.)
2013-01-07 11:12:23 +01:00
Henri Verbeet 78984cf46c wined3d: Get rid of ENTER_GL / LEAVE_GL. 2012-12-11 12:03:39 +01:00
Alexandre Julliard 449deda62f wined3d: Link directly to opengl32. 2012-11-08 15:37:44 +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 d74cb4571b wined3d: Simplify shader selection. 2012-11-05 11:30:32 +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
Matteo Bruni 902049c054 wined3d: Fix pixel format masks. 2012-08-15 12:17:46 +02:00
Henri Verbeet 894d161891 wined3d: Call core GL functions through gl_info.gl_ops as well. 2012-07-25 20:10:08 +02:00
Henri Verbeet af1ba676c8 wined3d: Pass a gl_info structure to fragment_pipeline.enable_extension(). 2012-07-25 20:01:31 +02:00
Alexandre Julliard db25d4022a winex11: Simplify wglSetPixelFormatWINE and export it as a standard extension function. 2012-06-28 13:13:01 +02:00
Francois Gouget 19ba80e7c2 wined3d: We must include Wine's port.h before using NAN. 2012-06-01 17:41:52 +02:00
Henri Verbeet aa71065d9b wined3d: Properly preload index buffers. 2012-05-29 10:44:50 +02:00
Henri Verbeet baff64a27a wined3d: Properly determine the viewport size for front buffer blits in SetupForBlit(). 2012-04-05 11:56:19 +02:00
Matteo Bruni 439097c810 wined3d: Update the correct draw buffers mask. 2012-03-28 15:09:09 +02:00
Henri Verbeet 6a5a098b23 wined3d: Get rid of the WINED3DRESOURCETYPE typedef. 2012-01-18 12:37:38 +01:00
Henri Verbeet f38e94af7c wined3d: Get rid of the WINED3DTRANSFORMSTATETYPE typedef. 2012-01-12 12:37:18 +01:00
Henri Verbeet 43fcbcb36e wined3d: Get rid of the WINED3DTEXTURESTAGESTATETYPE typedef. 2012-01-10 10:47:27 +01:00
Henri Verbeet 3082c1a9de wined3d: Get rid of the WINED3DRENDERSTATETYPE typedef. 2011-12-20 10:11:47 +01:00
Henri Verbeet 94c9b0b4fc wined3d: Get rid of the WINED3DPRESENT_PARAMETERS typedef. 2011-12-02 11:51:29 +01:00
Matteo Bruni 1fd18d7688 wined3d: Make a copy of gl_info for later context_destroy_gl_resources() usage. 2011-11-15 19:37:36 +01:00
Henri Verbeet 81ae0cea7c wined3d: Simplify context_choose_pixel_format().
Simply rank the formats instead of doing multiple passes over the list.
2011-11-09 11:34:19 +01:00
Henri Verbeet 1c91b08220 wined3d: Construct the projection matrix directly in set_blit_dimension().
This saves a needless matrix multiplication and is actually more obvious than
the glOrtho() call.
2011-11-02 12:27:34 +01:00
Henri Verbeet dbfe83baff wined3d: Rename nCfgs to cfg_count. 2011-10-27 19:34:15 +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
Henri Verbeet 89d0d3ffd8 wined3d: Get rid of the device parameter to context_setup_target(). 2011-10-26 12:41:33 +02:00
Henri Verbeet bab2a40f87 wined3d: Make the device parameter to context_apply_clear_state() const. 2011-10-25 16:57:24 +02:00
Henri Verbeet 9b42c657e4 wined3d: Make the device parameter to context_apply_blit_state() const. 2011-10-25 16:57:24 +02:00
Henri Verbeet 284ba950ef wined3d: Make the device parameter to SetupForBlit() const. 2011-10-24 11:16:47 +02:00
Henri Verbeet 96187a54a9 wined3d: Make the context parameter to bind_dummy_textures() const. 2011-10-24 11:16:44 +02:00
Henri Verbeet f28ba9007e wined3d: Make the device parameter to context_choose_pixel_format() const. 2011-10-21 12:09:46 +02:00
Henri Verbeet 25b1130b44 wined3d: Also restore the pixel format in context_restore_gl_context(). 2011-10-17 17:45:02 +02:00
Henri Verbeet cdc9aadf5c wined3d: Don't try to access the swapchain of a destroyed context in context_set_gl_context(). 2011-10-17 17:45:02 +02:00
Henri Verbeet dfea2ab6f4 wined3d: Don't bother updating the context's window in context_destroy_gl_resources().
context_update_window() accesses the swapchain, which may not exist if this is
a destroyed context, and we don't do anything that needs displaying here
anyway.
2011-10-17 17:45:02 +02:00
Henri Verbeet 7ffa768e71 wined3d: Cleanup context_create() error handling a bit. 2011-10-14 13:12:27 +02:00
Henri Verbeet 67b097cd6e wined3d: Get rid of the mostly unused "pfd" variable in context_create(). 2011-10-14 13:12:27 +02:00
Marcus Meissner 7023964865 wined3d: Remove a useless NULL check (Coverity). 2011-08-30 17:27:25 +02:00
Matteo Bruni afeecfd974 wined3d: Rename dummyTextureName variable. 2011-08-29 12:08:19 +02:00
Matteo Bruni 7c6bd2f287 wined3d: Use dummy textures for all the texture targets. 2011-08-29 12:08:19 +02:00
Matteo Bruni 0386b44bad wined3d: Keep track of the current texture type for each texture unit. 2011-08-29 12:08:19 +02:00
Henri Verbeet 641f52ef96 wined3d: Add multisampling support. 2011-08-26 11:28:47 +02:00
Henri Verbeet bd5f948682 wined3d: Get rid of the current multisampling support.
It doesn't really work, and trying to make multisampling work with onscreen
rendering is probably more trouble than it's worth, both for us and the
driver.
2011-08-26 11:28:25 +02:00
Henri Verbeet eec2c634a6 wined3d: Introduce a separate function for attaching depth / stencil renderbuffers. 2011-08-26 11:28:01 +02:00
Henri Verbeet be76133b7b wined3d: Explicitly specify the resource location to context_attach_depth_stencil_fbo(). 2011-08-26 11:27:57 +02:00
Henri Verbeet 9aaf0a30b7 wined3d: Also print an attachment's multisample type in context_check_fbo_status(). 2011-08-26 11:27:53 +02:00
Henri Verbeet 98277e1fc6 wined3d: Simplify context_apply_fbo_state_blit(). 2011-08-26 11:27:39 +02:00
Matteo Bruni f47f9f7c74 wined3d: Store currently active texture in the wined3d context. 2011-08-25 11:31:55 +02:00
Matteo Bruni e53ae83d74 wined3d: Pass around the context instead of gl_info. 2011-08-25 11:31:55 +02:00
Henri Verbeet f65a1ed272 wined3d: Bind the system framebuffer based on the actual location in context_apply_fbo_state().
We can do this now because SFLAG_INDRAWABLE is no longer ambiguous.
2011-08-25 11:31:54 +02:00
Henri Verbeet 47c5711fe2 wined3d: Use draw_binding in context_apply_blit_state(). 2011-08-25 11:31:54 +02:00
Ričardas Barkauskas e110c08cc8 wined3d: Avoid dereferencing null pointer in context_apply_clear_state when calling context_generate_rt_mask_from_surface. 2011-08-24 21:18:37 +02:00
Henri Verbeet e57b20c215 wined3d: Keep track of a surface's "draw location". 2011-08-24 11:58:14 +02:00
Henri Verbeet 9df014b9de wined3d: Rename WineD3D_ChoosePixelFormat() to context_choose_pixel_format(). 2011-08-23 16:53:51 +02:00
Henri Verbeet f8ce77a598 wined3d: Draw buffers are per-framebuffer state. 2011-08-22 16:14:36 +02:00
Henri Verbeet 34b2956e23 wined3d: Merge FindContext() into context_acquire().
This actually fixes a bug. A context's current_rt field may get set to NULL if
that surface gets destroyed or unloaded. In general, the next time that
context is acquired, context_setup_target() will then set everything up again.
However, if a context_acquire() call with a NULL target ends up returning such
a context, context_setup_target() never sets the current_rt field because the
target FindContext() chooses never gets propagated to context_acquire(). This
patch ensures context_setup_target() is never called with a NULL target.
2011-08-22 16:14:36 +02:00
Henri Verbeet 812a314821 wined3d: Get rid of the fglrx point sprite hack.
Fglrx 9.3 is well over 2 years old at this point. I'd strongly encourage
anyone still affected by this to upgrade to the r300g driver.
2011-08-05 09:17:59 +02:00
Henri Verbeet 33fafc6166 wined3d: Get rid of context_bind_fbo() calls outside context.c. 2011-08-01 11:16:12 +02:00
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
Henri Verbeet 0b24db5db5 wined3d: Also store the subresource container type. 2010-08-17 11:55:32 +02:00
Matteo Bruni b6637eb89f wined3d: Remove isInDraw hack from context_setup_target.
It is conceptually wrong and actually broken too (as the comment there
said). Just remove the hack now and properly fix any regression that
may come up later by explicitely acquiring the right context where
needed (so, in surface_internal_preload and its callees).
2010-08-16 17:28:58 +02:00
Matteo Bruni c1450356a7 wined3d: Fix context_apply_clear_state with ORM = backbuffer. 2010-08-16 17:28:58 +02:00
Matteo Bruni e0528084b1 wined3d: Call set_render_offscreen at the end of context_setup_target.
This fixes a regression caused by 20f51c29a9.
2010-08-16 17:28:57 +02:00
Henri Verbeet 5f2fcfdd6b wined3d: Reattach FBO attachments when any of the corresponding surfaces is unloaded. 2010-08-16 13:47:08 +02:00
Henri Verbeet 237f39377f wined3d: Move the draw buffer array to the context. 2010-07-30 11:36:03 +02:00
Matteo Bruni 20f51c29a9 wined3d: Setup target if offscreen rendering setting changed. 2010-07-26 18:38:33 +02:00
Henri Verbeet 943fb2fb57 wined3d: Do RGB <=> sRGB transfers using FBO blits.
Concept based on a patch by Stefan.
2010-07-26 18:38:31 +02:00
Henri Verbeet d374d85055 wined3d: Clear all render targets in an MRT setup. 2010-07-23 11:46:47 +02:00
Stefan Dösinger 6b794cbd64 wined3d: Only perform sRGB write correction on formats that advertise it. 2010-07-22 10:22:26 +02:00
Henri Verbeet 4817a65091 wined3d: Preload resources before FBO setup. 2010-07-22 10:13:30 +02:00
Henri Verbeet f7760656f3 wined3d: Remove LoadLocation() from the public wined3d surface interface. 2010-07-22 10:13:24 +02:00
Henri Verbeet 147f24dd78 wined3d: Remove ModifyLocation() from the public wined3d surface interface. 2010-07-22 10:13:13 +02:00
Rico Schüller 894a150f69 wined3d: Add GL_NV_point_sprite extension. 2010-07-19 15:10:32 +02:00
Henri Verbeet b1abafcf8d wined3d: Also flip the point sprite coordinate origin when rendering offscreen. 2010-06-11 16:22:25 +02:00
Henri Verbeet e8ac9bbd7f wined3d: Get rid of GLINFO_LOCATION. 2010-05-25 13:29:00 +02:00
Henri Verbeet 465e8f66cb wined3d: Explicitly pass the FBO target to context_clean_fbo_attachments().
This should have been part of e01d56f331.
2010-05-19 16:57:59 +02:00
Henri Verbeet 0fe7b45b6c wined3d: Make context_attach_surface_fbo() static. 2010-05-19 16:57:59 +02:00
Henri Verbeet e0d6ca57d7 wined3d: Check for offscreen contexts inside context_validate_onscreen_formats() itself. 2010-05-18 18:42:08 +02:00
Henri Verbeet 4889c33da6 wined3d: Explicitly pass the depth/stencil surface to context_validate_onscreen_formats().
This avoids switching to offscreen rendering in context_apply_blit_state() for
a depth buffer that isn't going to be used anyway. This switch would be
problematic for blits to the frontbuffer, since it's always onscreen. I.e.,
we'd be blitting to the screen, but with offscreen transforms.
2010-05-18 18:42:08 +02:00
Henri Verbeet 96cdab1792 wined3d: context_validate_onscreen_formats() may modify context->render_offscreen.
I merged this by accident in be43c867a5.
2010-05-18 18:42:08 +02:00
Henri Verbeet 7a2debe113 wined3d: Use the FBO cache in swapchain_blit(). 2010-05-06 14:17:30 +02:00
Henri Verbeet 3345146d0b wined3d: Use the FBO cache in stretch_rect_fbo(). 2010-05-06 14:17:24 +02:00
Henri Verbeet 9982a46296 wined3d: Use the FBO cache in context_apply_blit_state(). 2010-05-06 14:16:44 +02:00
Henri Verbeet ed75f5ca7a wined3d: Setup the FBO for the correct target in context_apply_clear_state(). 2010-05-05 10:37:40 +02:00
Henri Verbeet 4056f4bf99 wined3d: Explicitly pass the render target and depth/stencil surfaces to the FBO management functions. 2010-05-05 10:37:34 +02:00
Henri Verbeet e01d56f331 wined3d: Explicitly pass the FBO target to the FBO management functions. 2010-05-05 10:37:28 +02:00
Henri Verbeet 4fd3050b98 wined3d: Move draw buffer setup code out of context_apply_fbo_entry(). 2010-05-05 10:37:24 +02:00
Stefan Dösinger e7066a90e1 wined3d: Don't grab the implicit depth stencil format in the wrong place.
This format is now explicitly passed to create_context.
2010-05-04 13:15:00 +02:00
Henri Verbeet ff6cf84c40 wined3d: Attach the surfaces from the fbo_entry instead of the ones from the device.
Currently these are always the same, but that doesn't make it right.
2010-05-04 13:14:59 +02:00
Henri Verbeet 49e076eabd wined3d: Separate context acquisition and state application. 2010-05-04 13:14:59 +02:00
Henri Verbeet be43c867a5 wined3d: Split context_apply_state() into separate functions for each usage. 2010-05-04 13:14:59 +02:00
Henri Verbeet d977e91b11 wined3d: Store back buffer surfaces as IWineD3DSurfaceImpl pointers in the swapchain. 2010-04-27 12:02:14 -05:00
Henri Verbeet 62acb2fdbc wined3d: Store the front buffer surface as an IWineD3DSurfaceImpl pointer in the swapchain. 2010-04-27 12:01:59 -05:00
Henri Verbeet d1ea48b971 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_internal_preload(). 2010-04-26 09:04:35 -05:00
Henri Verbeet 6b34b8e6d1 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_acquire(). 2010-04-22 11:28:17 +02: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 95fb8eaa14 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_setup_target(). 2010-04-22 11:28:06 +02:00
Henri Verbeet 1b26ccde91 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to FindContext(). 2010-04-22 11:28:01 +02:00
Henri Verbeet 79a014a505 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_get_gl_buffer(). 2010-04-21 11:57:32 +02:00
Henri Verbeet c5de1e1045 wined3d: Store the depth/stencil surface as an IWineD3DSurfaceImpl pointer in the device. 2010-04-20 11:14:42 +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 92a44884c7 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_compatible_renderbuffer(). 2010-04-19 14:55:35 +02:00
Henri Verbeet 03dc612c9c wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_is_offscreen(). 2010-04-19 14:55:31 +02:00
Henri Verbeet da1b459754 wined3d: Store the depth/stencil attachment as IWineD3DSurfaceImpl pointer in struct fbo_entry. 2010-04-16 12:09:45 +02:00
Henri Verbeet be993fc49f wined3d: Store render target attachments as IWineD3DSurfaceImpl pointers in struct fbo_entry. 2010-04-16 12:09:42 +02:00
Henri Verbeet 24c93d48aa wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_attach_depth_stencil_fbo(). 2010-04-16 12:09:39 +02:00
Henri Verbeet 95130a7d5e wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_attach_surface_fbo(). 2010-04-16 12:09:36 +02:00
Henri Verbeet 870b3cb40b wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_apply_attachment_filter_states(). 2010-04-16 12:09:32 +02:00
Stefan Dösinger dc918d4394 wined3d: Use FBOs when the onscreen depth stencil format isn't suitable.
This allows proper support of float depth buffers when rendering to onscreen surfaces.
2010-03-31 16:12:32 +02:00
Stefan Dösinger 19b6f5ca75 wined3d: Control the onscreen depth stencil format in the swapchain.
This allows the swapchain to know what depth format its window contexts have to see if the
requested depth format is compatible or a FBO fallback is needed, and it will be needed to
set the onscreen format to the requested auto depth stencil format instead of the
let's-hope-it-fits D24_UNORM_S8_UINT format.
2010-03-31 16:12:31 +02:00
Stefan Dösinger a4b0bedc30 wined3d: Split out offscreen rendering concerns from FindContext. 2010-03-31 16:12:31 +02:00
Henri Verbeet d5ff1e640c wined3d: glColorMask() changes the write mask for all render targets. 2010-03-26 10:29:17 +01:00
Henri Verbeet 3aaa6ee6e7 wined3d: Rename GlPixelFormatDesc to wined3d_format_desc. 2010-03-19 14:31:47 +01:00
Henri Verbeet e5673ddbc3 wined3d: Add a quirk to rebind FBOs when one of their attached textures is updated.
Updating a texture while it is attached to the currently bound FBO is
something GL implementations tend to get wrong. NVIDIA fails at
glTexSubImage2D(), fglrx and Mesa with glTexImage2D(). I'm afraid to try what
happens on OS X. Fortunately we never use glTexImage2D() while a texture is
attached to an FBO, so we only need to care about glTexSubImage2D().
2010-03-18 10:24:41 +01:00
Henri Verbeet bd4fb33a52 wined3d: Unify GLINFO_LOCATION in surface.c. 2010-03-18 10:24:33 +01:00
Henri Verbeet 2b86950c3b wined3d: Simplify context_apply_attachment_filter_states() flow a bit. 2010-03-17 10:06:12 +01:00
Henri Verbeet 78166b0b23 wined3d: Implement SetDestWindowOverride() by simply making the context current on a different window. 2010-03-16 11:45:15 +01:00
Henri Verbeet 18ec2525a4 wined3d: Store the swapchain instead of the surface in the context. 2010-03-16 11:44:44 +01:00
Henri Verbeet b281f23efe wined3d: Add a separate function to set the pixel format in context_create(). 2010-03-16 11:44:38 +01:00
Henri Verbeet 4133a0a4ff wined3d: Use "gl_info" in some more places in context_create(). 2010-03-16 11:44:32 +01:00
Henri Verbeet 4b671f4d54 wined3d: Move device context array functions to device.c. 2010-03-15 15:55:57 +01:00
Henri Verbeet 6ed7906852 wined3d: Don't partially initialize contexts in AddContextToArray().
Just add a context to the device's context array.
2010-03-15 15:55:51 +01:00
Henri Verbeet 8a107bc63a wined3d: Kill pbuffer offscreen rendering support.
Our pbuffer support is broken, nobody cares.
2010-03-15 15:55:38 +01:00
Henri Verbeet af7dfcd378 wined3d: Do not preload surfaces when attaching them to an FBO.
Just make sure the texture is allocated, so we have something to attach. Note
also that context_apply_attachment_filter_states() runs under the GL lock, so
preloading resources is actually unsafe there.
2010-02-04 13:39:26 +01:00
Henri Verbeet 040452ad90 wined3d: Update the stream info before applying states. 2010-02-03 13:54:02 +01:00
Henri Verbeet 31d51fb175 wined3d: Preload textures before applying states. 2010-02-03 13:54:02 +01:00
Henri Verbeet 96b150929b wined3d: Add an ARB_sync implementation of event queries. 2010-01-26 12:08:23 +01:00
Henri Verbeet 2650885cc8 wined3d: Use the element size to create "isStateDirty" bitmap indices. 2009-12-30 13:31:36 +01:00
Henri Verbeet 9c0bf89ed0 wined3d: Let "SetupForBlit()" figure out the target's width and height on its own. 2009-12-28 12:27:14 +01:00
Henri Verbeet 57ff4b4dea wined3d: Let "FindContext()" figure out the thread id on its own.
It doesn't work with anything other than the current thread anyway.
2009-12-28 12:27:13 +01:00
Henri Verbeet 9295de9b84 wined3d: Introduce "context_apply_state()" to setup a context for a specific usage. 2009-12-28 12:27:13 +01:00
Henri Verbeet cd623036fc wined3d: Mark the draw buffer as dirty in context_create().
Currently callers of this function are responsible for setting the draw buffer
correctly, but they don't do a very good job:
  - swapchain_init() sets the draw buffer to GL_BACK if there's a back buffer,
    even though the context's target is always the front buffer.
  - swapchain_create_context_for_thread() depends on (eventually) being called
    by FindContext().
  - create_primary_opengl_context() and
    IWineD3DSwapChainImpl_SetDestWindowOverride() don't bother setting a draw
    buffer at all.
Just marking the draw buffer dirty lets the context management sort it all
out, and is much simpler.
2009-12-16 12:22:29 +01:00
Henri Verbeet a215d326a5 wined3d: Get rid of the "swapchain" parameter to surface_get_gl_buffer().
Casting the container to "IWineD3DSwapChainImpl *" is always safe when
SFLAG_SWAPCHAIN is set on the surface. Most callers don't have a real
need for the swapchain, and end up calling GetContainer() just to pass
it to surface_get_gl_buffer().
2009-12-16 12:22:18 +01:00
Stefan Dösinger 2ee6bb1cbb wined3d: Frontbuffers are onscreen. 2009-12-15 11:58:53 +01:00
Henri Verbeet 2f56ef09e6 wined3d: Use surface_is_offscreen() in context_apply_draw_buffer(). 2009-12-15 11:44:20 +01:00
Henri Verbeet 840b5af77e wined3d: Properly invalidate the context's draw buffer in color_fill_fbo(). 2009-12-11 12:16:25 +01:00
Henri Verbeet b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Stefan Dösinger 817714912b wined3d: Infrastructure to render swapchains to a FBO. 2009-12-07 14:33:24 +01:00
Henri Verbeet bf10dbe8a6 wined3d: Map D3DFMT_D24S8 to WINED3DFMT_D24_UNORM_S8_UINT.
The internal order of the depth and stencil bits is unspecified since the
format isn't lockable.
2009-10-30 11:28:52 +01:00
Henri Verbeet fbae08672b wined3d: It's not an error to request multisampling. 2009-10-30 11:28:35 +01:00
Henri Verbeet 111307dfba wined3d: Get rid of the GL_SUPPORT macro. 2009-10-29 13:09:33 +01:00
Henri Verbeet 48e03bc189 wined3d: Introduce a separate structure for various OpenGL implementation limits. 2009-10-29 13:09:27 +01:00
Henri Verbeet e6ca176a48 wined3d: Rename DestroyContext() to context_destroy(). 2009-10-28 11:16:05 +01:00
Henri Verbeet c0050b8ec9 wined3d: Restore the thread's GL context on context_release() if it wasn't created by wined3d.
The background on this is that some applications use OpenGL and DirectDraw/Direct3D on
the same thread, typically using OpenGL for rendering and DirectDraw to get
the amount of available video memory. This means that we might replace the
application's current GL context with one with a completely different state,
but also that our current GL context might not be what we think it is.
2009-10-28 11:15:59 +01:00
Henri Verbeet 98027cb535 wined3d: Call context_release() for wined3d contexts made current by context_create(). 2009-10-28 11:15:27 +01:00
Henri Verbeet eeb54b9922 wined3d: Keep better track of where we're using wined3d contexts.
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00
Henri Verbeet 401173ffde wined3d: Restore the thread's previous GL context in context_destroy_gl_resources(). 2009-10-28 11:15:00 +01:00
Henri Verbeet 94509f85b5 wined3d: Restore the wglMakeCurrent() call in context_destroy_gl_resources().
e3ca576576 removed this call because we don't
need it to tell if the context is valid, but we still need it to actually make
the context current.
2009-10-27 10:55:27 +01:00