Henri Verbeet
e74d1358ac
wined3d: Remove the unused blit_op parameter to arbfp_blit_surface().
2011-08-04 09:04:20 +02:00
Henri Verbeet
41cff1618c
wined3d: Merge wined3d_surface_blt(), surface_blt() and gdi_surface_blt().
2011-08-03 09:23:30 +02:00
Henri Verbeet
c12627562b
wined3d: Go to the fallbacks for cross-swapchain blits.
2011-08-03 09:23:20 +02:00
Henri Verbeet
111e8fe77c
wined3d: Add WINED3DFMT_P8_UINT support to wined3d_format_convert_from_float().
2011-08-03 09:23:16 +02:00
Henri Verbeet
cf1c641cbb
wined3d: Fix switching color keying on / off.
2011-08-03 09:23:12 +02:00
Henri Verbeet
e4efcea223
wined3d: Set the read buffer to GL_NONE in surface_load_ds_location().
...
On GL implementations that don't support GL_ARB_ES2_compatibility the
framebuffer's read buffer has to be valid, even if we're not reading from it.
2011-08-03 09:23:08 +02:00
Henri Verbeet
98650e841e
wined3d: Go to the fallbacks if D3D is not initialized in surface_blt().
...
Even though this is the "OpenGL" surface implementation, this can still happen
in e.g. ddraw if no swapchain is created yet. That's something we should fix,
but not today.
2011-08-02 11:40:20 +02:00
Henri Verbeet
7539cc8faa
wined3d: Go straight to the fallbacks for complex blits in surface_blt().
...
At the moment this is only marginally useful, since it just avoids silly
things like color keyed depth fills that are probably invalid anyway. However,
the idea is to gradually move normal color fill and blit handling out of
IWineD3DSurfaceImpl_BltOverride() and surface_cpu_blt(), and eventually make
those functions go away completely.
2011-08-02 11:40:16 +02:00
Henri Verbeet
4bdd4ef45b
wined3d: Check for locked surfaces in wined3d_surface_blt().
2011-08-02 11:40:11 +02:00
Henri Verbeet
50d883c37e
wined3d: IWineD3DSurfaceImpl_BltOverride() is always passed valid source and destination rectangles.
...
So no need to call surface_get_rect() anymore.
2011-08-02 11:40:07 +02:00
Henri Verbeet
ace241ad59
wined3d: Resolve source and destination rectangles in wined3d_surface_blt().
2011-08-02 11:40:01 +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
Henri Verbeet
ccb3a51a44
wined3d: Just invalidate STATE_FRAMEBUFFER in surface_load_ds_location().
2011-08-01 11:16:03 +02:00
Henri Verbeet
2bf020e26f
wined3d: Only invalidate state for the current context in surface_blt_fbo().
2011-07-28 11:29:14 +02:00
Henri Verbeet
51c0f2a787
wined3d: Only invalidate state for the current context in wined3d_surface_depth_blt_fbo().
2011-07-27 11:51:53 +02:00
Henri Verbeet
c5f8a33a86
wined3d: Make the surface parameter to ffp_blit_p8_upload_palette() const.
2011-07-19 14:05:59 +02:00
Henri Verbeet
437cec1a49
wined3d: Make the surface parameter to surface_depth_blt() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
a97ed53460
wined3d: Make the surface parameter to surface_convert_color_to_float() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
d314aa2d6e
wined3d: Make the surface parameter to surface_convert_depth_to_float() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
416a55c7aa
wined3d: Make the surface parameter to surface_is_full_rect() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
db12216301
wined3d: Make the surface parameter to surface_get_rect() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
abfd6b479a
wined3d: Make the surface parameter to d3dfmt_p8_init_palette() const.
2011-07-11 11:53:32 +02:00
Henri Verbeet
3e9930f307
wined3d: Make the device parameter to primary_render_target_is_p8() const.
2011-07-11 11:53:28 +02:00
Henri Verbeet
a26c5f9b13
wined3d: Make the surface parameter to d3dfmt_get_conv() const.
2011-07-08 11:25:31 +02:00
Henri Verbeet
aa55404682
wined3d: Make the src_surface parameter to draw_textured_quad() const.
2011-07-08 11:25:28 +02:00
Henri Verbeet
0d18f5df0e
wined3d: Make the surface parameter to surface_upload_data() const.
2011-07-08 11:25:25 +02:00
Henri Verbeet
faebcc0236
wined3d: Make the surface parameter to surface_translate_drawable_coords() const.
2011-07-08 11:25:21 +02:00
Henri Verbeet
bb4b86f365
wined3d: Make the rt parameter to surface_set_compatible_renderbuffer() const.
2011-07-08 11:25:17 +02:00
Henri Verbeet
640234c504
wined3d: Rename "flag" to "location" in surface_modify_location().
2011-07-07 12:31:46 +02:00
Henri Verbeet
3ccf12a77c
wined3d: Rename "flag" to "location" in surface_load_location().
...
This makes much more sense.
2011-07-06 11:14:20 +02:00
Stefan Dösinger
053071e343
wined3d: Pass a struct wined3d_fb_state to device_clear_render_targets.
2011-07-05 17:33:51 +02:00
Stefan Dösinger
cd96c59d91
wined3d: Track framebuffer changes.
2011-07-05 17:33:43 +02:00
Henri Verbeet
4e8c7f00f2
wined3d: Print an ERR for unknown / invalid surface locations in surface_load_location().
2011-07-05 13:46:24 +02:00
Henri Verbeet
1c3b691f10
wined3d: Introduce a separate function for loading the SFLAG_INTEXTURE and SFLAG_INSRGBTEX surface locations.
2011-07-05 13:46:20 +02:00
Henri Verbeet
cabcb362c1
wined3d: Introduce a separate function for loading the SFLAG_INDRAWABLE surface location.
2011-07-05 13:46:15 +02:00
Henri Verbeet
aacd8f8b93
wined3d: Introduce a separate function for loading the SFLAG_INSYSMEM surface location.
2011-07-05 13:46:11 +02:00
Henri Verbeet
b1664a2c85
wined3d: Get rid of some IWineD3D* references.
2011-07-04 13:44:41 +02:00
Henri Verbeet
c461d312ba
wined3d: Request per-surface palettes in the client libs.
2011-06-24 08:49:48 -05:00
Henri Verbeet
fd8dbf0847
wined3d: Make the surface parameter to surface_get_gl_buffer() const.
2011-06-24 08:49:34 -05:00
Henri Verbeet
0ce282edf7
wined3d: Make the surface parameter to surface_is_offscreen() const.
2011-06-24 08:49:28 -05:00
Henri Verbeet
acd8c58725
ddraw: Implement surface private data handling on top of wined3d_resource.
2011-06-22 11:25:27 +02:00
Henri Verbeet
469eba24c0
d3d9: Implement IDirect3DVertexBuffer9 private data handling on top of wined3d_resource.
2011-06-17 11:02:28 +02:00
Henri Verbeet
4621568922
wined3d: Only invert viewport y for onscreen destinations in surface_depth_blt().
...
This fixes a regression introduced by
032f8702ed
.
2011-06-16 11:16:31 +02:00
Henri Verbeet
8153674c4a
wined3d: Don't clear the alloc flags in wined3d_surface_set_format().
...
Changing the format is only allowed for surfaces with format
WINED3DFMT_UNKNOWN, in which case there can't be a GL texture allocated.
2011-06-15 20:04:38 +02:00
Henri Verbeet
b9133d7de0
wined3d: Implement wined3d_device_update_surface() on top of surface_upload_data().
2011-06-15 12:51:49 +02:00
Henri Verbeet
980c50a087
wined3d: Move PBO handling mostly out of surface_upload_data().
...
Currently we essentially get half of the address from the caller and half from
the destination surface. Since we'd like to use surface_upload_data() for
wined3d_device_update_surface() as well, we should get all of it from the
caller.
2011-06-10 10:44:39 +02:00
Henri Verbeet
a1b8f254b1
wined3d: Get rid of a NULL check for surface_upload_data().
2011-06-10 10:44:32 +02:00
Henri Verbeet
9f3e6a20e8
wined3d: Handle unpack row length inside surface_upload_data().
2011-06-10 10:44:26 +02:00
Henri Verbeet
01e668b007
wined3d: Use GL_DEPTH_COMPONENT as internal format for depth_blt_texture.
...
This also changes the texture level to always be zero while we're at it. In
practice depth/stencil textures should rarely have multiple levels, if ever,
but only 0 makes sense here.
2011-06-07 14:18:34 +02:00
Henri Verbeet
c8f26a1345
wined3d: Rename IWineD3DDeviceImpl_MarkStateDirty() to device_invalidate_state().
2011-06-06 16:18:41 +02:00
Henri Verbeet
aba42d1fa5
wined3d: Introduce a separate structure for framebuffer state.
2011-05-19 10:07:57 +02:00
Henri Verbeet
ef6c6f9ac9
wined3d: Get rid of the renderbuffer_entry_t typedef.
2011-05-17 10:06:30 +02:00
Henri Verbeet
0e0e5c3e38
wined3d: Get rid of the IWineD3DDevice typedefs.
2011-05-17 10:06:23 +02:00
Stefan Dösinger
a549b8f090
wined3d: Fix a few MSVC data loss warnings.
2011-05-13 17:05:27 +02:00
Stefan Dösinger
31901155ce
wined3d: Fix a unsigned unary minus warning in MSVC.
2011-05-13 17:05:27 +02:00
Henri Verbeet
00a5f38595
wined3d: Remove object creation methods from the IWineD3DDevice interface.
2011-05-11 14:56:48 +02:00
Henri Verbeet
e6ab3832b2
wined3d: Set SFLAG_DYNLOCK for lockable render targets.
2011-05-11 14:56:48 +02:00
Henri Verbeet
f9f83fc884
wined3d: Add some initial access checking for resources.
...
Just print a WARN in surface_load_location() for the moment. We currently
pretend all resources are managed, strictly enforcing pool restrictions would
just break a lot of things.
2011-05-06 14:23:46 +02:00
Henri Verbeet
0116af3703
wined3d: Cleanup surfaces only once.
2011-05-03 14:38:06 +02:00
Henri Verbeet
c4b73c4550
wined3d: Get rid of the IWineD3DSurface typedefs.
2011-04-29 16:52:13 +02:00
Henri Verbeet
1c1de920e3
wined3d: Remove COM from the surface implementation.
2011-04-29 16:52:13 +02:00
Henri Verbeet
ab199f56a6
wined3d: Merge the IWineD3DSurface::Blt() implementations.
2011-04-29 16:52:13 +02:00
Henri Verbeet
29c95df7c3
wined3d: Merge the IWineD3DSurface::BltFast() implementations.
2011-04-29 16:52:12 +02:00
Henri Verbeet
0b523df93c
wined3d: Merge the IWineD3DSurface::Flip() implementations.
2011-04-29 16:52:12 +02:00
Henri Verbeet
c5baf8f237
wined3d: Merge the IWineD3DSurface::SetFormat() implementations.
2011-04-28 11:08:55 +02:00
Henri Verbeet
92120cb527
wined3d: Merge the IWineD3DSurface::SetMem() implementations.
2011-04-28 11:08:51 +02:00
Henri Verbeet
a5febcf7a1
wined3d: Merge the IWineD3DSurface::ReleaseDC() implementations.
2011-04-28 11:08:45 +02:00
Henri Verbeet
dcaca7225b
wined3d: Merge the IWineD3DSurface::GetDC() implementations.
2011-04-28 11:08:36 +02:00
Henri Verbeet
13146e216f
wined3d: Merge the IWineD3DSurface::PreLoad() implementations.
2011-04-28 11:08:27 +02:00
Henri Verbeet
34ba20fe35
wined3d: Merge the IWineD3DSurface::Unmap() implementations.
2011-04-27 11:50:53 +02:00
Henri Verbeet
825341e7c2
wined3d: Merge the IWineD3DSurface::Map() implementations.
2011-04-27 11:50:48 +02:00
Henri Verbeet
a2ef014342
wined3d: Merge the IWineD3DSurface::Release() implementations.
2011-04-27 11:50:41 +02:00
Henri Verbeet
d9ace3c9f7
wined3d: Only invalidate the INDRAWABLE location for onscreen surfaces in surface_realize_palette().
...
For offscreen surfaces this might actually remove the texture we just loaded.
2011-04-27 11:50:35 +02:00
Henri Verbeet
f63a84be61
wined3d: Merge surface_base.c into surface.c.
2011-04-26 10:46:40 +02:00
Henri Verbeet
11d44809bb
wined3d: Remove IWineD3DSurface::PrivateSetup() from the public interface.
2011-04-26 10:46:23 +02:00
Henri Verbeet
c852200b03
wined3d: Get rid of IWineD3DSurface::GetType().
2011-04-22 10:44:28 +02:00
Henri Verbeet
516ade9b2b
wined3d: Also update ds_current_size if there's no current DS location in surface_load_ds_location().
2011-04-19 13:29:28 +02:00
Henri Verbeet
84d50f7353
wined3d: Remove IWineD3DSurface::GetImplType() from the public interface.
2011-04-18 11:45:55 +02:00
Henri Verbeet
52edf556f6
wined3d: Merge surface_gdi.c into surface.c.
2011-04-18 11:45:51 +02:00
Henri Verbeet
fadfdf21c0
wined3d: Forward surface refcounts to the container.
...
This will prevent textures from being released if one of its surfaces is still
in use by the stateblock. We have similar constructions in d3d8 and d3d9, but
those won't prevent the wined3d texture from being released.
2011-04-18 11:45:17 +02:00
Henri Verbeet
a5983e0c3d
wined3d: Use the correct mask for depth/stencil locations in surface_load_ds_location().
2011-04-18 11:45:09 +02:00
Henri Verbeet
66875c6dc7
wined3d: Don't flush just because a swapchain has multiple contexts.
...
If you really have e.g. multiple draws to the same drawable, this is not
enough, and you should use the StrictDrawOrdering registry setting. In the
other cases it just slows things down unnecessarily.
2011-04-15 10:07:58 +02:00
Henri Verbeet
d30da7ae39
wined3d: Get rid of the IWineD3DSwapChain typedefs.
2011-04-14 17:13:57 +02:00
Henri Verbeet
3ec19590d5
wined3d: Remove COM from the swapchain implementation.
2011-04-14 17:13:57 +02:00
Henri Verbeet
17c51d49b7
wined3d: Flush after accessing the front buffer in flush_to_framebuffer_drawpixels().
2011-04-11 23:54:09 +02:00
Henri Verbeet
55e957a31a
wined3d: Flush after accessing the front buffer in surface_blt_fbo().
2011-04-11 23:54:05 +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
a96f749ce0
wined3d: Add support for depth blits to the blitter.
2011-04-06 21:17:48 +02:00
Henri Verbeet
519a3a9162
wined3d: Add depth fills to the blitter interface.
2011-04-06 12:05:07 +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
419d6e9acd
wined3d: Introduce a separate function for depth fills.
2011-04-06 12:05:06 +02:00
Henri Verbeet
90da00927e
wined3d: Make "blit_operation" naming a bit more consistent.
2011-04-06 12:05:06 +02:00
Henri Verbeet
b372faec3c
wined3d: Correctly check if the destination format is FBO attachable in fbo_blit_supported().
...
Like ca381b610c
, this was introduced by
f1ca14cb5b
.
2011-04-05 11:14:04 +02:00
Henri Verbeet
032f8702ed
wined3d: Fix partial depth buffer copies.
...
Don't overwrite the entire buffer if only part of it is not current. The data
we're copying may not be completely current either. This is for the case where
the inner rect is not current and the outer edge is. The reverse case where
the inner rect is current and we need to mask already works correctly.
2011-04-05 11:13:46 +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
Henri Verbeet
692aa004d0
wined3d: Rename "numContexts" to "context_count".
2011-03-31 12:37:47 +02:00
Henri Verbeet
c9ba0949c2
Revert "wined3d: Prevent crash when blit_priv is NULL.".
...
This reverts commit 37aadc9e37
.
This patch was superseded by b2132202c7
.
2011-03-30 12:17:44 +02:00
Henri Verbeet
c5bf96c951
wined3d: Get rid of IWineD3DBaseTextureClass.
2011-03-29 12:34:40 +02:00
Konrad Rzepecki
37aadc9e37
wined3d: Prevent crash when blit_priv is NULL.
2011-03-29 12:19:48 +02:00