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
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
Henri Verbeet
85f2348549
wined3d: Get rid of the IWineD3DBase requirement for surface_set_container().
...
This made sense back when we needed the container's parent and didn't know the
container's type, but neither of those is true anymore.
2011-03-28 17:08:52 +02:00
Henri Verbeet
4a10bbc76d
wined3d: Generalize AddDirtyRect() / AddDirtyBox() to AddDirtyRegion().
2011-03-15 17:14:07 +01:00
Henri Verbeet
2b18192e7a
wined3d: Get rid of IWineD3DSurface::GetDesc().
2011-03-11 11:40:31 +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
60a710455e
wined3d: Try to evict the surface's sysmem copy in surface_load_location().
...
The memory may not be freed until surface destruction otherwise. The PBO
creation code in surface_prepare_system_memory() also depends on the SYSMEM
location being recreated regularly, although arguably that's just a symptom of
the resource location management being somewhat broken.
2011-03-07 11:10:14 +01:00
Henri Verbeet
b1e03b3250
wined3d: Clear SFLAG_LOCKED as soon as possible in IWineD3DSurfaceImpl_Unmap().
2011-03-07 11:10:10 +01:00
Henri Verbeet
eb3796083a
wined3d: Get rid of the SFLAG_LOCKED hack in flush_to_framebuffer_drawpixels().
2011-03-07 11:10:06 +01:00
Henri Verbeet
39aa477e4c
wined3d: Pass gl_info to surface_bind().
2011-03-04 16:25:58 +01:00
Henri Verbeet
af0a4b6956
wined3d: Pass gl_info to basetexture_bind().
2011-03-03 17:47:14 +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
ddc7a803e9
wined3d: Standalone surfaces should never be sRGB.
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
39497ff4d1
wined3d: Remove IWineD3DResource::UnLoad() from the public interface.
2011-02-28 11:09:48 +01:00
Gerald Pfeifer
54d98ba791
wined3d: Remove an old hack around Mesa choking on protected memory from flush_to_framebuffer_drawpixels.
2011-02-14 13:33:30 +01:00
Henri Verbeet
e1815f5e3b
wined3d: Get rid of the IWineD3DPalette typedefs.
2011-02-03 13:15:17 +01:00
Henri Verbeet
074977d404
wined3d: Get rid of the IWineD3D typedefs.
2011-02-02 12:22:53 +01:00
Henri Verbeet
7438e42f1a
wined3d: Do checks at the start of surface_init() (LLVM/Clang).
2011-01-26 15:00:12 +01:00
Henri Verbeet
4891ca168e
wined3d: Remove IWineD3DSurface::DrawOverlay() from the public interface.
2011-01-24 14:43:26 +01:00
Henri Verbeet
05603c4568
wined3d: Remove IWineD3DSurface::RealizePalette() from the public interface.
2011-01-24 14:43:26 +01:00
Henri Verbeet
ce050c89de
wined3d: Get rid of IWineD3DSurface::GetData().
2011-01-21 18:37:09 +01:00
Henri Verbeet
0b7fef751e
wined3d: Remove IWineD3DSurface::LoadTexture() from the public interface.
2011-01-21 18:37:06 +01:00
Henri Verbeet
629d81b192
wined3d: Remove IWineD3DSurface::BindTexture() from the public interface.
2011-01-21 18:37:04 +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
d91a413ade
wined3d: Store an IWineD3DClipperImpl pointer in IWineD3DSurfaceImpl.
2011-01-18 12:32:10 +01:00
Henri Verbeet
134137cdb4
wined3d: Pass an IWineD3DResourceImpl pointer to resource_cleanup().
2011-01-06 11:33:24 +01:00
Henri Verbeet
7080922e0e
wined3d: Pass an IWineD3DResourceImpl pointer to resource_init().
2011-01-06 11:33:19 +01:00
Henri Verbeet
d72520b5cc
wined3d: Remove IWineD3DBaseTexture::BindTexture() from the public interface.
2011-01-05 17:22:01 +01:00
Henri Verbeet
e5d1a0c72d
wined3d: Use surface_modify_location() to manipulate location flags in IWineD3DSurfaceImpl_Unmap().
...
Directly setting SFLAG_INFRAWABLE breaks for offscreen render targets, where
the drawable and texture are the same thing. Before commit
d3fd7b247b
the explicit load of the texture
location with the default RTL_READTEX render target lock mode would have
prevented the flags from becomming inconsistent.
2011-01-05 17:21:28 +01:00
Henri Verbeet
3a59137b09
wined3d: Pass an IWineD3DBaseTextureImpl pointer to internal_preload().
2011-01-04 11:09:52 +01:00
Henri Verbeet
0e3c60786e
wined3d: Explicitly pass gl_info to unset_shader().
2010-12-10 13:02:26 +01:00
Henri Verbeet
ae7a20af2f
wined3d: Explicitly pass blit_priv and gl_info to set_shader().
2010-12-10 13:02:24 +01:00
Henri Verbeet
7f09eb6a7a
wined3d: Pass an IWineD3DDeviceImpl pointer to free_private().
2010-12-09 12:14:31 +01:00
Henri Verbeet
4ba3b64c57
wined3d: Pass an IWineD3DDeviceImpl pointer to alloc_private().
2010-12-09 12:14:25 +01:00
Henri Verbeet
a3b2407824
wined3d: Remove IWineD3DBaseTexture::SetDirty() from the public interface.
2010-12-09 12:14:19 +01:00
Henri Verbeet
018a48493b
wined3d: Remove a redundant SetDirty() call from IWineD3DSurfaceImpl_Map().
...
The surface_add_dirty_rect() call already does this.
2010-12-08 11:27:44 +01:00
Henri Verbeet
46f3cc9df6
wined3d: Don't leak heapMemory in surface_remove_pbo().
2010-12-08 11:27:34 +01:00
Henri Verbeet
7363b0e98a
wined3d: Explicitly pass data and gl_info to shader_deselect_depth_blt().
2010-11-30 10:57:23 +01:00
Henri Verbeet
93a824d744
wined3d: Explicitly pass data and gl_info to shader_select_depth_blt().
2010-11-30 10:57:17 +01:00
Henri Verbeet
03f7a2d88e
wined3d: Get rid of the remaining "Flags".
2010-11-23 13:15:36 +01:00
Henri Verbeet
4f651808fc
wined3d: Disallow empty surfaces.
2010-11-18 12:37:36 +01:00
Henri Verbeet
faba8d734d
wined3d: Send a notification that the GL texture changed in flip_surface().
...
Strictly speaking the texture doesn't get unloaded, but it does get associated
with a different surface. The FBO cache in particular is much happier when it
gets notified of these.
2010-11-17 14:01:14 +01:00
Henri Verbeet
4dc28005eb
wined3d: Remove a redundant flag in IWineD3DSurfaceImpl_SetMem().
2010-11-16 13:48:42 +01:00
Henri Verbeet
745126b05d
wined3d: Properly recreate the sysmem resource location in IWineD3DSurfaceImpl_SetMem().
...
Otherwise we could end up with surfaces that have SFLAG_INSYSMEM set, but no
actual system memory allocated. This was exposed by
3bbe658ef1
.
2010-11-15 15:04:41 +01:00
Henri Verbeet
44b9712cd6
wined3d: Add a trace to IWineD3DSurfaceImpl_SetMem().
2010-11-15 15:04:36 +01:00
Henri Verbeet
60b5dc04b7
wined3d: Rename the IWineD3DPaletteImpl "Flags" field to "flags".
2010-11-15 15:04:32 +01:00
Henri Verbeet
efb185dcd5
wined3d: Rename the wined3d_format "Flags" field to "flags".
2010-11-12 15:43:08 +01:00
Henri Verbeet
027fdb31c2
wined3d: Rename the IWineD3DSurfaceImpl "Flags" field to "flags".
2010-11-12 15:43:07 +01:00
Henri Verbeet
a59ee29dec
wined3d: Simplify a condition in IWineD3DSurfaceImpl_LoadTexture().
2010-11-12 15:43:07 +01:00
Henri Verbeet
4bd1f04fbd
wined3d: Check for depth/stencil surfaces in general in IWineD3DSurfaceImpl_Unmap().
...
Instead of just the current one.
2010-11-12 15:43:07 +01:00
Henri Verbeet
db013ed213
wined3d: Avoid marking samplers dirty in IWineD3DSurfaceImpl_Unmap().
...
Resources are explicitly loaded in context_apply_draw_state() when needed, the
resource location management takes care of all of this.
2010-11-12 15:43:07 +01:00
Henri Verbeet
3bbe658ef1
wined3d: Remove some useless code.
2010-11-11 13:11:37 +01:00
Henri Verbeet
78abb8ae07
wined3d: Simply use surface_modify_location() in IWineD3DSurfaceImpl_Map() with WINED3DLOCK_DISCARD.
...
The call to surface_add_dirty_rect() would have taken care of evicting the
other locations anyway, but we really shouldn't be touching the location flags
directly.
2010-11-11 13:11:34 +01:00
Henri Verbeet
d3fd7b247b
wined3d: Handle rendertargetlock_mode in surface_load_location().
2010-11-11 13:11:30 +01:00
Henri Verbeet
8e059205ba
wined3d: Translate drawable coordinates in flush_to_framebuffer_drawpixels().
2010-11-02 13:17:35 +01:00
Henri Verbeet
3f0d16c5bf
wined3d: Do not use "lockedRect" unless the surface is locked in flush_to_framebuffer_drawpixels().
2010-11-02 13:17:31 +01:00
Henri Verbeet
e35b6aa1a7
wined3d: Change surface_translate_frontbuffer_coords() to handle all drawable coordinates.
2010-11-01 13:34:43 +01:00
Henri Verbeet
27bf4c3747
wined3d: Remove some redundant state save/restore code from flush_to_framebuffer_drawpixels().
2010-10-29 14:33:57 +02: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
2b58f80c27
wined3d: Use surface_blt_to_drawable() in IWineD3DSurfaceImpl_BltOverride().
2010-10-21 16:15:31 +02:00
Henri Verbeet
574169174e
wined3d: Check if we can do the blit before messing with surface flags in IWineD3DSurfaceImpl_BltOverride().
...
As an added benefit blit_supported() will now get the rectangles in the
correct coordinate system.
2010-10-21 16:15:25 +02:00
Henri Verbeet
1237e8065e
wined3d: Properly flip in surface_blt_to_drawable().
...
We want to flip the coordinate system, not just the rectangle.
2010-10-19 13:50:13 +02:00
Henri Verbeet
8a96a8cc1f
wined3d: Always pass a valid rectangle to surface_get_blt_info().
2010-10-19 13:50:09 +02:00
Henri Verbeet
ca381b610c
wined3d: Allow FBO blits again between surfaces with fixups if they have the same format.
...
For some reason f1ca14cb5b
disabled this.
2010-10-19 13:50:01 +02:00
Henri Verbeet
1fa3365832
wined3d: Flip destination coordinates when blitting to an offscreen target in BltOverride().
2010-10-15 16:19:50 +02:00
Henri Verbeet
95469309d6
wined3d: Consistently use Map/Unmap for mapping resources.
2010-10-14 17:54:52 +02:00
Henri Verbeet
b68d257710
wined3d: Get rid of redundant comparisons against NULL / 0.
2010-09-14 09:43:33 -05:00
Henri Verbeet
8fbf23f0cc
wined3d: Don't overwrite the offscreen depth/stencil surface with undefined data in surface_load_ds_location().
2010-09-06 16:14:26 +02:00
Henri Verbeet
8e0cb60b09
wined3d: Do not call device_switch_onscreen_ds() while under the GL lock.
2010-09-06 16:14:18 +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
6c4c351791
wined3d: Don't require wined3d object parents to be COM objects.
2010-09-01 14:01:02 +02:00
Henri Verbeet
3a7f08a56f
wined3d: Rename wined3d_format_desc to wined3d_format.
2010-08-31 14:23:47 +02:00
Henri Verbeet
4005eb2a18
wined3d: Get rid of WINED3DRECT.
2010-08-31 14:23:47 +02:00
Henri Verbeet
1bf25cfe3f
wined3d: Use debug_surflocation() in surface_load_location().
2010-08-31 14:23:46 +02:00
Henri Verbeet
c689280beb
wined3d: Use surface_color_fill() in IWineD3DDeviceImpl_ColorFill().
2010-08-30 11:26:45 +02:00
Henri Verbeet
ecc67757ab
wined3d: Introduce surface_color_fill().
...
This is also a first attempt at a more structured interface to blitter
operations.
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
42b814c7d1
wined3d: Remove the GetContainer() methods from the public wined3d interface.
...
There's nothing left that uses these.
2010-08-26 12:41:39 +02:00
Henri Verbeet
22428d97e1
wined3d: Don't set a NULL container of type WINED3D_CONTAINER_TEXTURE.
...
Any container type other than WINED3D_CONTAINER_NONE implies a valid pointer
of the specified type. This fixes a regression introduced by
368e5eb87a
.
2010-08-26 12:41:34 +02:00
Henri Verbeet
87e12b8b6a
wined3d: Introduce a local variable for gl_info in IWineD3DSurfaceImpl_BltOverride().
2010-08-25 11:57:12 +02:00
Henri Verbeet
cc5271d1b7
wined3d: Rename WINED3DFORMAT to wined3d_format_id.
2010-08-24 12:25:01 +02:00
Henri Verbeet
50b5955288
wined3d: Use floating point colors in the blitter's color_fill functions.
2010-08-24 12:24:39 +02:00
Henri Verbeet
9956ea7044
wined3d: Convert from floating point to specific surface formats.
...
Instead of from WINED3DFMT_B8G8R8A8_UNORM.
2010-08-24 12:24:33 +02:00
Henri Verbeet
a455a918c1
wined3d: Explicitly pass the draw rect to device_clear_render_targets().
...
For regular clears this is the intersection of the viewport and scissor
rectangles, but color fills shouldn't be affected by those.
2010-08-24 12:24:28 +02:00
Henri Verbeet
b93a9b37fa
wined3d: Pass a WINED3DCOLORVALUE structure to IWineD3DDeviceImpl_ClearRendertargetView().
...
The structure is nicer to work with than the array.
2010-08-23 12:05:24 +02:00
Henri Verbeet
910d3022c3
wined3d: Do not release a reference we do not have in IWineD3DSurfaceImpl_Flip().
...
This fixes a regression introduced by 368e5eb87a
.
2010-08-20 14:11:10 +02:00
Henri Verbeet
f06b22a537
wined3d: Add a TRACE to IWineD3DSurfaceImpl_LoadTexture().
2010-08-18 09:39:42 +02:00
Henri Verbeet
368e5eb87a
wined3d: Avoid IWineD3DSurface_GetContainer().
2010-08-17 11:55:32 +02:00
Henri Verbeet
8292c687d8
wined3d: Get rid of the now redundant SFLAG_SWAPCHAIN surface flag.
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
Henri Verbeet
61db577a4b
wined3d: Remove SetContainer() from the public IWineD3DSurface interface.
2010-08-17 11:55:32 +02:00
Henri Verbeet
a16cf58494
wined3d: Fix a couple of typos.
2010-08-16 13:47:53 +02:00
Henri Verbeet
d494dfb6c0
wined3d: Rename surface_calculate_size() to wined3d_format_calculate_size().
2010-08-16 13:47:42 +02:00
Henri Verbeet
3a36013065
wined3d: Print the correct resource location in surface_set_texture_name().
2010-08-16 13:47:33 +02:00
Henri Verbeet
e1188b0c8e
wined3d: Fix some misspellings of "surface".
2010-08-16 13:47:17 +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
2b88b2d351
wined3d: Only try to acquire a context in surface_cleanup() if there are GL resources to be destroyed.
...
The reason we're in surface_cleanup() might for example be that context
creation failed.
2010-08-04 13:24:21 +02:00
Henri Verbeet
88ff3f406d
wined3d: Always set the get_drawable_size() surface function.
2010-08-03 11:06:47 +02:00
Henri Verbeet
b2e1e1fd71
wined3d: Pass the color as floating point values to device_clear_render_targets().
2010-08-03 11:06:42 +02:00
Henri Verbeet
6e68dd52c4
wined3d: Use the correct divider for 15-bit depth formats in IWineD3DSurfaceImpl_BltZ().
2010-08-03 11:06:20 +02:00
Henri Verbeet
6874743e78
wined3d: Add a missing return statement to surface_prepare_texture().
...
Calling surface_prepare_texture_internal() twice on the same surface is
harmless, but unnecessary.
2010-07-26 18:38:31 +02:00
Henri Verbeet
0bf68b846a
wined3d: Merge strect_rect_fbo() and surface_load_srgb_fbo().
2010-07-26 18:38:31 +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
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
Henri Verbeet
c411b45da9
wined3d: Use a more consistent name for the normalized texrect "extension".
2010-07-21 09:33:18 +02:00
Henri Verbeet
4b850ed121
wined3d: Remove restoring the read buffer from read_from_framebuffer_texture().
...
The few functions that care about the read buffer should explicitly set it
themselves, instead of assuming any particular state.
2010-07-20 13:13:04 +02:00
Francois Gouget
7649c75b40
Assorted typo and spelling fixes.
2010-06-24 10:37:05 +02:00
Henri Verbeet
b769c912cc
wined3d: read_from_framebuffer_texture() isn't suitable for readback of onscreen surfaces.
2010-06-22 13:51:30 +02:00
Matteo Bruni
6585bec5ac
wined3d: Check for error conditions in GL call.
2010-06-22 11:22:38 +02:00
Henri Verbeet
1b5cc39a86
wined3d: Get rid of some dead code.
2010-06-01 11:03:56 +02:00
Roderick Colenbrander
ba09e7a2a1
wined3d: Don't use blit_supported() in d3dfmt_get_conv for now.
2010-05-27 14:46:43 +02:00
Roderick Colenbrander
e54f06183c
wined3d: Replace set_shader call with unset_shader in blt_to_drawable.
...
The blit_shader is activated before draw_textured_quad, so after use
it should be deactivated instead of being activated again.
2010-05-27 14:46:43 +02:00
Henri Verbeet
e8ac9bbd7f
wined3d: Get rid of GLINFO_LOCATION.
2010-05-25 13:29:00 +02:00
Henri Verbeet
db0784e1da
wined3d: Introduce a separate function for translating front buffer coordinates to GL coordinates.
2010-05-21 14:37:52 +02:00
Henri Verbeet
a2a58a21d8
wined3d: Translate front buffer coordinates in surface_blt_to_drawable().
2010-05-20 13:47:53 +02:00
Henri Verbeet
f0888577c5
wined3d: Use wine_dbgstr_rect() for tracing the rectangle in IWineD3DSurfaceImpl_LockRect().
2010-05-19 16:57:59 +02:00
Roderick Colenbrander
f892003194
wined3d: Set conversion flags for format descriptors having a convert function.
2010-05-17 14:43:49 +02:00
Henri Verbeet
79145e215b
wined3d: Add support for shadow samplers.
2010-05-17 13:19:53 +02:00
Henri Verbeet
44ab3d70f1
wined3d: Handle depth/stencil surfaces in IWineD3DSurfaceImpl_LoadLocation().
2010-05-17 13:19:40 +02:00
Roderick Colenbrander
b60961ae55
wined3d: Use surface_prepare_texture for surface allocation in read_from_framebuffer_texture.
2010-05-11 11:04:55 +02:00
Henri Verbeet
49e076eabd
wined3d: Separate context acquisition and state application.
2010-05-04 13:14:59 +02:00
Henri Verbeet
f09b8e454d
wined3d: Avoid some needless depth buffer copies.
...
If an application switches between render targets of a different size, but
with the same depth/stencil surface it'll typically clear the depth/stencil
surface before drawing. However, in case of the smaller render target that
wouldn't be a full clear, so we'd have to do a depth copy if we also switched
between onscreen and offscreen rendering. Keeping track of which part of the
depth/stencil surface is current for onscreen/offscreen allows us to avoid
most of these kinds of copies. The current scheme requires the current/dirty
rectangle to have an origin at (0,0). This could be extended to an arbitrary
rectangle, but the bookkeeping becomes somewhat more complex in that case, and
it's not clear that there would be much of a benefit at this point.
2010-04-29 10:19:39 -05:00
Henri Verbeet
83cf1ce8e1
wined3d: Check if the depth/stencil surface has any valid location at the start of surface_load_ds_location().
2010-04-28 07:32:05 -05:00
Henri Verbeet
0d86323778
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_release_client_storage().
2010-04-28 07:31:28 -05:00
Henri Verbeet
23a377f02b
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_init_sysmem().
2010-04-28 07:31:13 -05:00
Henri Verbeet
42375518ba
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_add_dirty_rect().
2010-04-27 12:02:39 -05:00
Henri Verbeet
f78d85ffe1
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_texture_target().
2010-04-27 12:02:31 -05:00
Henri Verbeet
294d9dae8f
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_texture_name().
2010-04-27 12:02:24 -05: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
32b1f25f4b
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_force_reload().
2010-04-26 09:04:56 -05:00
Henri Verbeet
553f429964
wined3d: Simply pass IWineD3DSurfaceImpl pointers to IWineD3DSurfaceImpl_BltOverride().
2010-04-26 09:04:48 -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
bea50a39de
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to fb_copy_to_texture_hwstretch().
2010-04-25 07:28:18 -05:00
Henri Verbeet
99994f885c
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to fb_copy_to_texture_direct().
2010-04-25 07:28:07 -05:00
Henri Verbeet
9308c5499f
wined3d: Make sure all texture levels are allocated in surface_prepare_texture().
...
This fixes a regression introduced by commit
af7dfcd378
.
2010-04-25 07:27:36 -05:00
Henri Verbeet
6b34b8e6d1
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_acquire().
2010-04-22 11:28:17 +02:00
Henri Verbeet
660ad06692
wined3d: Simply pass implementation pointers to stretch_rect_fbo().
2010-04-21 11:57:32 +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
efb3993a3a
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_modify_ds_location().
2010-04-19 14:55:24 +02:00
Henri Verbeet
ae46589f53
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_load_ds_location().
2010-04-19 14:55:19 +02:00
Henri Verbeet
10c5a8ac9e
wined3d: Get rid of "myDevice".
2010-04-19 14:55:13 +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
bc2850a587
wined3d: Get rid of the width and height parameters to surface_upload_data().
2010-04-16 12:09:27 +02:00
Henri Verbeet
212bfab2df
wined3d: Get rid of the width and height parameters to surface_allocate_surface().
2010-04-16 12:09:23 +02:00
Henri Verbeet
7f6ab3c06e
wined3d: The currentDesc and pow2 width/height are the same for power of two textures.
2010-04-16 12:09:19 +02:00
Henri Verbeet
65797d7f75
wined3d: Get rid of glRect from IWineD3DSurfaceImpl.
...
604caf0caa
supposedly removed the "oversized
texture" code, but this was still left over.
2010-04-16 12:09:14 +02:00
Roderick Colenbrander
bf58d81968
wined3d: Remove paletteOverride from BltOverride offscreen->render_target blit.
...
This code was needed when the destination uses 8-bit and the source lacked a palette.
Since we don't allow destination fixups, this code doesn't do anything. At a later
stage something like this should perhaps be readded to specific backends.
2010-04-15 17:03:59 +02:00
Roderick Colenbrander
4cb6255907
wined3d: We don't need color keying for sysmem->drawable uploads.
2010-04-15 17:03:52 +02:00
Roderick Colenbrander
2a949ec323
wined3d: Remove call to d3dfmt_get_conv from read_from_framebuffer_texture.
2010-04-15 17:03:49 +02:00
Roderick Colenbrander
1a61f46bbb
wined3d: Remove temporary conv_byte_count fixup from d3dfmt_get_conv.
2010-04-15 17:03:47 +02:00
Roderick Colenbrander
bccfd7cc06
wined3d: Add BLT_OP_COLOR_FILL to blit_supported and use it in BltOverride.
2010-04-15 14:20:48 +02:00
Roderick Colenbrander
4c87bc0c41
wined3d: Move A4L4 conversion to the formats table.
2010-04-14 18:00:47 +02:00
Roderick Colenbrander
cda78c01e6
wined3d: Move G16R16/R16G16F conversion to the formats table.
2010-04-14 18:00:47 +02:00
Henri Verbeet
8eb2a2cf0c
wined3d: Disable strict draw ordering by default.
...
While some performance hit from the extra flushes was expected and would be
acceptable, the performance hit can be over 50% on some configurations, which
clearly isn't acceptable. This patch introduces a "StrictDrawOrdering"
registry key for applications affected by this, until we have a more
structural solution.
2010-04-13 21:13:36 +02:00
Roderick Colenbrander
e35f54ef1f
wined3d: Move R32G32F convertion to the formats table.
2010-04-13 17:56:35 +02:00
Roderick Colenbrander
5c635f4146
wined3d: Move D15S1 over to the formats table.
2010-04-13 17:56:32 +02:00
Roderick Colenbrander
6a081ef95a
wined3d: Move D24X4S4 to the formats table.
2010-04-13 17:56:29 +02:00
Roderick Colenbrander
485040bb5c
wined3d: Move D24FS8 to formats table.
2010-04-13 17:56:27 +02:00
Roderick Colenbrander
798ba56c1b
wined3d: Move L6V5U5 conversion to the formats table.
2010-04-13 17:56:24 +02:00
Roderick Colenbrander
76a9712779
wined3d: Add an initial implementation of arbfp_blit_surface.
2010-04-09 16:50:21 +02:00
Roderick Colenbrander
f1ca14cb5b
wined3d: Add an initial fbo_blit_supported implementation.
2010-04-09 16:50:21 +02:00
Roderick Colenbrander
7df7ce40c3
wined3d: Move X8L8V8U8 surface conversion to the format table.
2010-04-09 16:50:21 +02:00
Roderick Colenbrander
60c6294f84
wined3d: Move Q8W8V8U8 conversion to the format table.
2010-04-09 16:50:20 +02:00
Roderick Colenbrander
d7e1b973c7
wined3d: Start moving texture format fixups to the formats table.
2010-04-09 16:50:20 +02:00
Roderick Colenbrander
a4559e761b
wined3d: Move srgb checks away from d3dfmt_get_conv.
2010-04-09 16:50:20 +02:00
Roderick Colenbrander
00598c3e36
wined3d: Let d3dfmt_get_conv return a wined3d_format_desc.
2010-04-09 16:50:20 +02:00
Roderick Colenbrander
1c02a909e5
wined3d: Remove remaining redundant code from d3dfmt_get_conv.
2010-04-08 17:34:18 +02:00
Roderick Colenbrander
2c5eee25ca
wined3d: Only apply float R16G16F/R32G32F fixup when ARB_texture_rg isn't around and remove redundant code.
2010-04-07 18:14:05 +02:00
Roderick Colenbrander
edcdbc2a76
wined3d: Remove redundant gl format/type code from d3dfmt_get_conv since it is already in the table.
2010-04-07 18:13:49 +02:00
Roderick Colenbrander
e7a71e15b5
wined3d: Turn blit_shader color_fixup_supported into blit_supported.
2010-04-07 18:13:35 +02:00
Henri Verbeet
83443273c1
wined3d: Pass the correct window to Present() in IWineD3DSurfaceImpl_Flip().
2010-04-07 13:50:16 +02:00
Henri Verbeet
3b7774b37b
wined3d: Pass the correct window to Present() in IWineD3DSurfaceImpl_BltOverride().
2010-04-07 13:50:12 +02:00
Roderick Colenbrander
e6ae272efe
wined3d: Due to code rewrites is_color_fixup_supported is not needed anymore in RealizePalette.
...
The code in question should be executed in all cases. This also fixes
palette refresh issues when shaders / paletted textures aren't around.
2010-04-06 13:55:14 +02:00
Roderick Colenbrander
1f2976a302
wined3d: Move the arbfp p8 fixup to the format table and get rid of the d3dfmt_get_conv override.
2010-04-06 13:55:02 +02:00