Commit Graph

1204 Commits

Author SHA1 Message Date
Henri Verbeet 36dcb77f6e wined3d: Get rid of some leftover references to IWineD3D. 2013-09-03 16:58:16 +02:00
Henri Verbeet 0be8e524c6 wined3d: Avoid some forward declarations. 2013-09-02 18:02:42 +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 2d23913186 wined3d: Move the MAXLOCKCOUNT constant to surface.c. 2013-09-02 18:02:23 +02:00
Henri Verbeet ac54753e7c wined3d: Get rid of RTL_READDRAW.
I don't think we ever want to use glDrawPixels().
2013-08-28 11:17:09 +02:00
Henri Verbeet f5f7a4e457 wined3d: Get rid of GL_EXT_paletted_texture support.
No current drivers support this, and it's probably broken. Also note that
since we removed paletted texture support from wined3d, this would only be
used for WINED3DFMT_P8_UINT blits.
2013-08-28 11:17:09 +02:00
Stefan Dösinger 4dd4a6913b wined3d: Add a function for allocating aligned resource memory. 2013-08-21 19:53:20 +02:00
Stefan Dösinger 9d75a517c2 wined3d: Improve volume size calculation. 2013-08-21 19:53:15 +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
Matteo Bruni 5649746b60 wined3d: Fix NP2 surface repacking in surface_download_data. 2013-06-20 22:14:35 +02:00
Henri Verbeet 4de77fa23f wined3d: Allow a custom pitch to be specified in wined3d_surface_set_mem(). 2013-06-14 11:46:20 +02:00
Henri Verbeet a3f59cf618 wined3d: Allow textures as swapchain surfaces. 2013-06-03 11:30:43 +02:00
Stefan Dösinger 10929cbe43 wined3d: Correct an ERR/FIXME. 2013-05-21 19:41:12 +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
Henri Verbeet 0e32c9a247 wined3d: Add a performance warning for mapping a dynamic surface without WINED3D_MAP_DISCARD. 2013-04-18 11:42:47 +02:00
Henri Verbeet c0a84454c4 wined3d: Introduce a separate debug channel for performance warnings. 2013-04-17 11:36:22 +02:00
Andrew Talbot e6f5829ae1 wined3d: Avoid signed-unsigned integer comparisons. 2013-03-05 09:50:03 +01:00
Matteo Bruni 25d0d0876d wined3d: Make (wined3d_)surface_depth_blt_fbo handle locations other than SFLAG_INTEXTURE. 2013-02-19 10:39:42 +01: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
Henri Verbeet ce912d5149 wined3d: Get rid of the surface_type parameter to wined3d_surface_create(). 2013-01-17 12:21:55 +01:00
Henri Verbeet 78984cf46c wined3d: Get rid of ENTER_GL / LEAVE_GL. 2012-12-11 12:03:39 +01:00
Henri Verbeet ddbe791d37 wined3d: Set texture_level in surface_set_texture_target() as well. 2012-10-24 11:24:22 +02:00
Henri Verbeet 9d127a4d36 wined3d: wined3d_surface_set_palette() never fails. 2012-10-09 09:59:38 +02:00
Francois Gouget b2a7111a3d wined3d: Change some internal function and structure names to the more standard 'converter' spelling. 2012-08-16 13:47:29 +02:00
Matteo Bruni 902049c054 wined3d: Fix pixel format masks. 2012-08-15 12:17:46 +02:00
Michael Stefaniuc 4ddfcc2cf1 wined3d: Avoid TRUE-FALSE conditional expressions. 2012-07-26 12:11:29 +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 ea8dfe640d wined3d: Convert some uppercase hex constants to lowercase. 2012-07-20 13:59:53 +02:00
Alexandre Julliard d7250e97ed wined3d: Fetch GL functions from the WGL driver table, including glFinish and glFlush. 2012-07-20 13:21:27 +02:00
Henri Verbeet f0fb199925 wined3d: Use the proper texture target in ffp_blit_p8_upload_palette(). 2012-07-17 12:50:22 +02:00
Henri Verbeet 092ba1e1bf wined3d: Use the proper texture target in fb_copy_to_texture_direct(). 2012-07-17 12:50:21 +02:00
Henri Verbeet f5e289c6e0 wined3d: Use the proper texture target in ffp_blit_set(). 2012-07-17 12:50:21 +02:00
Alexandre Julliard 30e0e3ffff wined3d: Remove unused variables. 2012-07-16 14:26:32 +02:00
Henri Verbeet 2b4c72b13b d3d10core: Always create a wined3d texture for d3d10core textures. 2012-07-12 11:45:21 -05:00
Henri Verbeet d26a3858d9 wined3d: Fix the block alignment check in surface_cpu_blt(). 2012-07-11 09:56:58 -05:00
Henri Verbeet 1e22e3ccfb wined3d: Introduce a helper function for checking surface block alignment. 2012-07-11 09:56:54 -05:00
Henri Verbeet 2907913fad wined3d: Print a more obvious message if a format doesn't have a corresponding GL internal format. 2012-07-10 10:39:48 -05:00
Henri Verbeet a6ffab3bf5 wined3d: Rename WINED3DLOCK_* to WINED3D_MAP_*. 2012-06-18 17:48:56 +02:00
Francois Gouget 4f17081652 wined3d: Make some surface functions static. 2012-06-12 11:11:16 +02:00
Francois Gouget 9a874aca8e wined3d: Reorder some surface functions to avoid the need for forward declarations. 2012-06-12 11:11:12 +02:00
Henri Verbeet 5ec56c9bc4 wined3d: Get rid of SFLAG_LOCKED. 2012-05-21 21:30:56 +02:00
Alexandre Julliard c054d7bc6f wined3d: CreateDIBSection doesn't need a DC for the DIB_RGB_COLORS case. 2012-05-02 12:02:33 +02:00
Henri Verbeet 49c4623b2f wined3d: device_clear_render_targets() never fails. 2012-04-16 12:05:15 +02:00
Henri Verbeet 8cef8b3587 wined3d: Unify the wined3d_mapped_rect and wined3d_mapped_box structures. 2012-04-13 10:48:51 +02:00
Henri Verbeet cd0c18f56b wined3d: Simplify the data.buffer_object assignment in surface_load_texture().
The surface pbo field should be 0 is SFLAG_PBO is not set.
2012-04-09 12:02:47 +02:00
Henri Verbeet 00a4011425 wined3d: Drop the ORM_BACKBUFFER special case in surface_unmap(). 2012-03-27 11:39:26 +02:00
Henri Verbeet d1e00648ff wined3d: Only update the drawable on surface unmap for the frontbuffer. 2012-03-27 11:39:23 +02:00
Henri Verbeet ab4474c19b wined3d: surface_cpu_blt() should always receive valid source and destination rectangles. 2012-03-12 10:44:00 +01:00
Henri Verbeet 29468906bb wined3d: Pass correctly offset pointers to surface_cpu_blt_compressed().
This was debugged by Alexey Loukianov.
2012-03-12 10:43:59 +01:00
Henri Verbeet 6d483c2d9d wined3d: Don't use floating point for surface height scaling.
This is the follow-up to commit a4e5bcff4c.
2012-03-08 17:57:54 +01:00
Henri Verbeet 9c25758656 wined3d: Support color keyed WINED3DFMT_B8G8R8A8_UNORM surfaces.
Color keying and alpha channels aren't mutually exclusive.
2012-02-29 10:31:09 +01:00
Henri Verbeet 80555d2cb8 wined3d: Specify the depth range in surface_depth_blt(). 2012-02-22 18:47:30 +01:00
Henri Verbeet a4e5bcff4c wined3d: Use a format flag instead of a floating point comparison to determine if we need to apply heightscale. 2012-02-13 20:20:08 +01:00
Matteo Bruni b51a657626 wined3d: Use a separate flag for discarded surfaces. 2012-02-02 15:18:09 +01:00
Stefan Dösinger 038e308a41 wined3d: Relax depth blit requirements. 2012-01-23 16:06:55 +01:00
Henri Verbeet 3769afa33d wined3d: Get rid of the WINED3DSURFTYPE typedef. 2012-01-20 13:31:33 +01:00
Henri Verbeet d8b00ecf34 wined3d: Get rid of the CONVERT_TYPES typedef. 2012-01-20 13:31:24 +01:00
Henri Verbeet 8692ff48a9 wined3d: Don't load the draw_binding location in surface_unmap() unless the surface is on a swapchain.
It really makes no sense to do this just because a surface happens to be the
current render target. In particular, this patch prevents needlessly bouncing
the surface between the CPU and the GPU when the application does e.g.
multiple colorkeyed blits to the current render target to draw a HUD.
2012-01-20 13:31:17 +01:00
Matteo Bruni cf5bc7a711 wined3d: Dirtify STATE_FRAMEBUFFER after a FBO depth blit. 2012-01-19 17:08:09 +01:00
Henri Verbeet d0d094dea2 wined3d: Respect SFLAG_PIN_SYSMEM when creating a surface DIB section. 2012-01-19 11:56:30 +01:00
Henri Verbeet e53a277305 wined3d: Get rid of the WINED3DPOOL typedef. 2012-01-18 12:37:38 +01:00
Henri Verbeet 6a5a098b23 wined3d: Get rid of the WINED3DRESOURCETYPE typedef. 2012-01-18 12:37:38 +01:00
Francois Gouget cbc7a0361e wined3d: Add a trailing '\n' to a FIXME() message. 2012-01-16 12:45:34 +01:00
Henri Verbeet e70990041b wined3d: Get rid of the WINED3DTEXTUREFILTERTYPE typedef. 2012-01-13 17:34:31 +01:00
Henri Verbeet a206f43648 wined3d: Get rid of wined3d_surface_set_format(). 2012-01-13 17:34:30 +01:00
Henri Verbeet afb64506ba ddraw: Implement width and height changes in ddraw_surface7_SetSurfaceDesc(). 2012-01-13 17:34:30 +01:00
Matteo Bruni c6c5c6905e wined3d: Handle discarded depth-stencil surfaces with SFLAG_LOST.
SFLAG_INSYSMEM is already set by surface_add_dirty_rect() for all
surfaces anyway.
2012-01-13 17:34:30 +01:00
Matteo Bruni add5916c77 wined3d: Set depth textures dirty after modifying the underlying surface. 2012-01-13 17:34:30 +01:00
Diego Nieto Cid 759bad0202 wined3d: Convert rtInternal and glGammaInternal. 2012-01-11 19:42:50 +01:00
Henri Verbeet b55e3d82cf wined3d: Set SFLAG_PIN_SYSMEM when the application tries to use surfaces that are currently mapped. 2012-01-11 12:32:55 +01:00
Matteo Bruni 1c14c0d2fc wined3d: Don't use separate location flags for depth buffers. 2012-01-10 10:48:26 +01:00
Matteo Bruni e4c0d6abbe wined3d: Don't try to remove the location flag if it's not there in the first place. 2012-01-10 10:48:13 +01:00
Henri Verbeet 9a8491045e wined3d: Get rid of the WINED3DMULTISAMPLE_TYPE typedef. 2012-01-09 12:22:17 +01:00
Henri Verbeet f1e2c5df93 wined3d: Only flip SFLAG_DIBSECTION once in flip_surface().
We already swap all flags at a later point in flip_surface().
2012-01-09 12:22:03 +01:00
Henri Verbeet 3d33887c2f wined3d: Get rid of the WINED3DSWAPEFFECT typedef. 2012-01-06 19:24:22 +01:00
Henri Verbeet 0feb72f000 wined3d: Handle client storage in surface_remove_pbo(). 2011-12-21 10:14:44 +01:00
Henri Verbeet 317d5406d5 wined3d: Handle client storage in surface_init_sysmem(). 2011-12-21 10:14:41 +01:00
Henri Verbeet b57d1e7c33 wined3d: Don't call surface_init_sysmem() on surfaces with a PBO. 2011-12-21 10:14:37 +01:00
Henri Verbeet 3082c1a9de wined3d: Get rid of the WINED3DRENDERSTATETYPE typedef. 2011-12-20 10:11:47 +01:00
Henri Verbeet 943fcb0fc4 wined3d: Use the correct source pitch and byte_count for uploading converted surfaces. 2011-12-13 18:58:57 +01:00
Henri Verbeet e6fb4537f0 ddraw: Move clipper handling to ddraw. 2011-12-13 18:58:37 +01:00
Henri Verbeet f3afa69f8d wined3d: Introduce a helper function for checking colors against a color key. 2011-12-09 21:15:24 +01:00
Henri Verbeet 3dd03f642d wined3d: Get rid of the WINEDDCOLORKEY typedef. 2011-12-08 10:27:53 +01:00
Henri Verbeet 2d1a941b7d wined3d: Properly check if a surface has a DIB section in gdi_surface_map(). 2011-12-08 10:27:32 +01:00
Henri Verbeet 56e3e05e57 wined3d: Read the PBO back into the DIB section if we have one in surface_remove_pbo(). 2011-12-08 10:27:29 +01:00
Henri Verbeet 5c5216e609 wined3d: Get rid of the WINED3DBOX typedef. 2011-12-07 17:49:56 +01:00
Henri Verbeet eafebc0491 wined3d: Get rid of the WINED3DLOCKED_RECT typedef. 2011-12-06 15:50:58 +01:00
Henri Verbeet 94c9b0b4fc wined3d: Get rid of the WINED3DPRESENT_PARAMETERS typedef. 2011-12-02 11:51:29 +01:00
Henri Verbeet 94c0da184e wined3d: Create a PBO in surface_load_location() even if SFLAG_INSYSMEM is already set.
In the longer term, sysmem and pbo should be separate resource locations.
2011-12-01 10:06:12 +01:00
Henri Verbeet 39ebb992f7 wined3d: Introduce a separate function to determine if a surface needs a PBO. 2011-12-01 10:06:07 +01:00
Henri Verbeet 4a7cbba0ea wined3d: Move the surface map counting code to wined3d_surface_map(). 2011-12-01 10:06:02 +01:00
Henri Verbeet 3a2921c559 ddraw: Keep the primary surface mapped at the same address for early ddraw versions. 2011-11-30 11:50:58 +01:00
Henri Verbeet 3430e11605 wined3d: Add a flags parameter to wined3d_surface_create(). 2011-11-30 11:50:48 +01:00
Henri Verbeet 24775459c8 wined3d: Don't apply fixups to converted surfaces. 2011-11-25 16:21:56 +01:00
Henri Verbeet 7459180a51 wined3d: Get rid of the WINED3DCOLORVALUE typedef. 2011-11-16 09:41:50 +01:00
Henri Verbeet 0ba5f7dd98 wined3d: Get rid of RTL_DISABLE. 2011-11-09 11:34:11 +01:00
Henri Verbeet b6c7a3dbc8 wined3d: Don't print FIXMEs for misaligned surface maps. 2011-11-09 11:34:04 +01:00
Henri Verbeet d6b432b068 wined3d: Get rid of client_memory from wineD3DSurface_DIB. 2011-11-08 09:50:23 +01:00
Henri Verbeet 896aaa67ca wined3d: Get rid of holdbitmap from wineD3DSurface_DIB. 2011-11-08 09:50:18 +01:00
Henri Verbeet 604d154002 wined3d: Only report a broken pitch in wined3d_surface_map().
We'd like the correct pitch for internal calls to wined3d_surface_get_pitch().
2011-11-08 09:50:13 +01:00
Stefan Dösinger 7eefed1410 wined3d: YUY2 and UYVY are block based. 2011-11-07 14:32:16 +01:00
Stefan Dösinger 7fd752047d d3d9/tests: Test partial block locks. 2011-11-07 14:27:24 +01:00
Henri Verbeet a64271c07e wined3d: Make the surface parameter to blit_shader.set_shader() const. 2011-11-07 11:32:47 +01:00
Henri Verbeet 35515e4669 wined3d: Remove surface_draw_overlay from wined3d_surface_ops. 2011-11-07 11:32:34 +01:00
Henri Verbeet 48b6050ca3 wined3d: Remove surface_preload from wined3d_surface_ops. 2011-11-07 11:32:28 +01:00
Henri Verbeet 3f11631e75 wined3d: Merge surface_getdc() and gdi_surface_getdc(). 2011-11-04 10:44:32 +01:00
Henri Verbeet 3bfecd58d2 wined3d: Avoid a drawable -> texture transfer through sysmem in arbfp_blit_surface() with backbuffer ORM. 2011-11-04 10:44:14 +01:00
Stefan Dösinger 9b0adb406d wined3d: Locking partial blocks is not allowed in DEFAULT pool resources. 2011-11-03 13:52:15 +01:00
Henri Verbeet 335a6ca78e wined3d: Use wined3d_surface_blt() in swapchain_gl_present(). 2011-11-03 13:00:50 +01:00
Henri Verbeet c30ea3767c wined3d: Use wined3d_surface_blt() in surface_upload_from_surface(). 2011-11-03 13:00:40 +01:00
Henri Verbeet fcf96b634a wined3d: Create the DIB section for DDSCAPS_OWNDC surfaces on initialization. 2011-10-31 23:52:51 +01:00
Henri Verbeet 7de4df9fd9 wined3d: Get rid of the wined3d_surface_bltfast() export. 2011-10-31 23:52:47 +01:00
Henri Verbeet bf5ab0a199 wined3d: Make the device parameter to surface_blt_to_drawable() const. 2011-10-27 19:34:19 +02:00
Henri Verbeet 61550ff1de wined3d: Use the correct pitch in surface_upload_data().
This fixes a regression introduced by commit
2da4f87a7e.
2011-10-27 19:34:00 +02:00
Henri Verbeet 22d2d26ffc wined3d: Make the device parameter to surface_blt_fbo() const. 2011-10-27 12:25:29 +02:00
Henri Verbeet 54dc38718b wined3d: Make the device parameter to wined3d_surface_depth_blt_fbo() const. 2011-10-27 12:25:24 +02:00
Henri Verbeet 6a981239db wined3d: Get rid of the unused palette9 wined3d_surface field. 2011-10-27 12:25:19 +02:00
Henri Verbeet a42774f042 wined3d: Only check for sRGB attachability when needed in surface_load_texture(). 2011-10-26 12:41:33 +02:00
Henri Verbeet 2da4f87a7e wined3d: Upload directly from the source surface in wined3d_surface_blt(), if possible.
This avoids either loading sysmem surfaces into video memory (wasting GPU
memory) and then doing a blit on the GPU, or downloading GPU surfaces to
sysmem, doing a blit on the CPU, and likely uploading it again. This mostly
matters for ddraw and d3d8 applications, d3d9 already has to go through
wined3d_device_update_surface() to transfer data from sysmem surfaces to GPU
surfaces.
2011-10-25 16:57:23 +02:00
Henri Verbeet e6101816a2 wined3d: Get rid of surface_gdi_cleanup().
It's effectively the same as surface_cleanup(). The GL objects that
surface_cleanup() destroys are never created for "GDI" surfaces.
2011-10-24 11:16:40 +02:00
Henri Verbeet 6e8273177a wined3d: Reject multisampled readbacks in wined3d_surface_get_render_target_data(). 2011-10-24 11:16:33 +02:00
Henri Verbeet 4229d865d2 wined3d: Only try to load surfaces from the drawable if the drawable is current in surface_load_sysmem(). 2011-10-24 11:16:27 +02:00
Henri Verbeet 82f067f5cd wined3d: Allow loading multisampled surfaces into sysmem. 2011-10-20 11:02:57 +02:00
Henri Verbeet 3042860478 wined3d: Detach any attached overlays on surface cleanup.
Spotted by Dan Kegel / Valgrind.
2011-10-19 12:23:47 +02:00
Henri Verbeet 68e1484bec wined3d: Mark default pool surfaces lost when they're unloaded. 2011-10-18 15:10:13 +02:00
Henri Verbeet ca43c49968 wined3d: Keep surfaces in sysmem if they're both already there in wined3d_surface_blt().
The idea is to avoid bouncing surfaces between the CPU and GPU when doing both
locks and blits on a surface. This is mostly an issue for ddraw applications.
2011-10-18 15:10:06 +02:00
Stefan Dösinger 496b438ede wined3d: Remove d3d8/9 palette support. 2011-10-11 13:37:49 +02:00
Henri Verbeet 5609f062d2 wined3d: Dump the WINEDDBLTFX structure in wined3d_surface_blt(). 2011-09-20 16:21:38 +02:00
Henri Verbeet b9fcf71c71 ddraw: Use real flips. 2011-09-16 17:23:08 +02:00
Henri Verbeet 8009a4947b wined3d: Flush after surface updates.
This is similar to 5d1d07abcf. We need to flush
to ensure resource updates are visible in other contexts, since otherwise GL
doesn't make any ordering guarantees between contexts.
2011-09-15 15:41:40 +02:00
Henri Verbeet bbb77cba74 wined3d: Add support for flipping compressed surfaces to surface_cpu_blt(). 2011-09-09 13:33:33 +02:00
Henri Verbeet 5c57b53a6c wined3d: Use the CPU blitter for blitting to converted surfaces. 2011-09-09 13:33:25 +02:00
Henri Verbeet e82e1c2ac5 wined3d: Disable sRGB decoding in draw_textured_quad().
We're always supposed to draw the RGB texture here. sRGB decoding may be
enabled if sRGB decoding was enabled to last time the surface was used as a
texture, or if it was never used as a texture at all.
2011-09-09 13:33:22 +02:00
Gerald Pfeifer 0affcc3a7d wined3d: Remove dead code (and variable) from wined3d_surface_flip. wined3d_surface_flip. 2011-09-08 20:08:06 +02:00
Henri Verbeet 19da825b12 wined3d: Use draw_binding for the surface_modify_location() call in surface_unmap() as well. 2011-09-08 11:11:10 +02:00
Henri Verbeet 79c438b2f2 wined3d: Implement wined3d_surface_flip() as a blit.
This allows us to actually take the "override" parameter into account. Plain
back -> front flips will be detected in wined3d_surface_flip() and will still
be handled by wined3d_swapchain_present().
2011-09-07 11:12:17 +02:00
Henri Verbeet 1b9bc1a950 wined3d: Try doing a present in wined3d_surface_blt() instead of IWineD3DSurfaceImpl_BltOverride(). 2011-09-06 10:48:36 +02:00
Henri Verbeet b86d69de16 wined3d: Don't override the swapchain present interval in IWineD3DSurfaceImpl_BltOverride(). 2011-09-06 10:48:31 +02:00
Henri Verbeet 3346fc747c wined3d: Get rid of the rect checks for present in IWineD3DSurfaceImpl_BltOverride(). 2011-09-05 10:56:54 +02:00
Henri Verbeet ca69a23d52 wined3d: Get rid of some redundant else statements in IWineD3DSurfaceImpl_BltOverride(). 2011-09-02 10:09:01 +02:00
Henri Verbeet 179d6f8087 wined3d: Remove a redundant compare in IWineD3DSurfaceImpl_BltOverride().
If the source surface isn't on the destination swapchain it can't be a
backbuffer there either.
2011-09-02 10:08:57 +02:00
Henri Verbeet cc10600b52 wined3d: Print a FIXME for any flags passed to wined3d_surface_flip(). 2011-09-02 10:08:53 +02:00
Henri Verbeet 55ce85ad29 wined3d: Merge the wined3d_surface_flip() implementations. 2011-09-01 18:06:36 +02:00
Henri Verbeet b587b85394 wined3d: Merge the wined3d_surface_set_mem() implementations. 2011-09-01 18:06:36 +02:00
Austin English b2f7461a4d wined3d: Remove an unused variable. 2011-09-01 18:06:36 +02:00
Henri Verbeet dd462052c6 wined3d: Use the resource size for copying between a surface's DIB and PBO. 2011-08-31 12:07:57 +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 3b478afd10 wined3d: Get rid of the location fixup in surface_blt_fbo(). 2011-08-26 11:27:50 +02:00
Henri Verbeet eac640532d wined3d: Get rid of the location fixup for ORM_FBO in surface_modify_location(). 2011-08-26 11:27:46 +02:00
Henri Verbeet 68a5305dfd wined3d: Get rid of the location fixup for ORM_FBO in surface_load_location(). 2011-08-26 11:27:43 +02:00
Matteo Bruni d485e04576 wined3d: Fetch currently active texture unit from the wined3d_context. 2011-08-25 11:31:55 +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
Matteo Bruni be8ea9c36e wined3d: Make context_acquire() unconditional in a bunch of places. 2011-08-25 11:31:55 +02:00
Henri Verbeet 6cdfb95c8e wined3d: Use draw_binding in surface_unload(). 2011-08-25 11:31:53 +02:00
Henri Verbeet 1d43f07239 wined3d: Use draw_binding in surface_realize_palette(). 2011-08-25 11:31:53 +02:00
Henri Verbeet 683b52ed92 wined3d: Use draw_binding in surface_unmap(). 2011-08-25 11:31:53 +02:00
Henri Verbeet 1ae498dc59 wined3d: Use draw_binding in IWineD3DSurfaceImpl_BltOverride(). 2011-08-25 11:31:53 +02:00
Henri Verbeet 4673330cf4 wined3d: Use draw_binding in wined3d_surface_blt(). 2011-08-24 11:58:15 +02:00
Henri Verbeet e57b20c215 wined3d: Keep track of a surface's "draw location". 2011-08-24 11:58:14 +02:00
Henri Verbeet f73593c572 wined3d: Set the current location to SFLAG_INTEXTURE instead of SFLAG_INDRAWABLE in wined3d_surface_depth_blt().
These currently end up being the same thing, but that will change soon.
2011-08-24 11:58:14 +02:00
Henri Verbeet 4b1ba0e02d wined3d: Don't get rid of the user memory unless we're actually called with NULL in surface_set_mem().
In particular, some applications will call surface_set_mem() with the same
pointer to notify us the contents have changed.
2011-08-24 11:58:14 +02:00
Henri Verbeet 48911d7a1c wined3d: Reject color blits on sysmem surfaces in ffp_blit_supported(). 2011-08-23 16:53:51 +02:00
Henri Verbeet f58e55ec6c wined3d: Move arbfp based color blits from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt(). 2011-08-23 16:53:51 +02:00
Henri Verbeet a04f0e9c78 wined3d: Move FBO based color blits from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt(). 2011-08-22 16:14:37 +02:00
Henri Verbeet d063ff55e7 wined3d: Move surface_color_fill() based color fills from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt(). 2011-08-22 16:14:37 +02:00
Henri Verbeet a887128ffd wined3d: Reject color fills on sysmem surfaces in ffp_blit_supported(). 2011-08-22 16:14:36 +02:00
Henri Verbeet 18434ddc57 wined3d: Directly call surface_cpu_blt() in cpu_blit_color_fill().
And avoid a potential infinite recursion if wined3d_surface_blt() ends up
calling cpu_blit_color_fill().
2011-08-22 16:14:36 +02:00
Henri Verbeet 26484c9200 wined3d: Allow color fills on FBO attachable surfaces in ffp_blit_supported(). 2011-08-22 16:14:36 +02:00
Henri Verbeet e1ab5f6e6b wined3d: Don't allow blits with an invalid destination rectangle when a clipper is set either.
Clippers don't really work. Previously we mostly didn't run into this because
the rectangle was already rejected by ddraw_surface7_Blt(), although
ddraw_surface7_BltFast() might have been affected in a couple of cases. We
should of course implement clippers, but until that happens, completely
rejecting the blit is better than introducing memory corruption.

This fixes a regression introduced by commit
92e616f355.
2011-08-22 16:14:36 +02:00
Henri Verbeet 56428c6386 wined3d: Reuse convert_a8r8g8b8_x8r8g8b8() for B8G8R8X8 -> B8G8R8A8 conversions. 2011-08-22 16:14:36 +02:00
Henri Verbeet 156d24c634 wined3d: Add compressed surface support to surface_cpu_blt(). 2011-08-22 16:14:36 +02:00
Henri Verbeet a84275075d wined3d: Implement wined3d_surface_bltfast() on top of wined3d_surface_blt(). 2011-08-05 09:17:39 +02:00
Henri Verbeet 662de19ad3 wined3d: Move some flags handling from surface_cpu_blt() to wined3d_surface_blt(). 2011-08-04 09:04:49 +02:00
Henri Verbeet 7e3ecd683c wined3d: Move rectangle validation from surface_cpu_blt() to wined3d_surface_blt().
This fixes some tests because these were getting skipped for the BltOverride() path.
2011-08-04 09:04:39 +02:00
Henri Verbeet b166cb29f8 wined3d: Remove src_rect and dst_rect NULL checks from surface_cpu_blt(). 2011-08-04 09:04:25 +02:00
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