Henri Verbeet
7524258aaf
ddraw: Implement flips inside ddraw.
2013-12-05 12:40:56 +01:00
Frédéric Delanoy
5ba7f79bad
Assorted spelling fixes.
2013-12-03 19:41:53 +01:00
Stefan Dösinger
60ecf707a7
wined3d: Remove a useless comment.
2013-12-02 17:16:45 +01:00
Stefan Dösinger
6f865d3ea5
wined3d: Don't pass the pitch to read_from_framebuffer.
2013-12-02 17:16:43 +01:00
Stefan Dösinger
e8c774e486
wined3d: Remove redundant state restoration from read_from_framebuffer.
2013-12-02 17:16:38 +01:00
Stefan Dösinger
6907faf805
wined3d: Use surface_get_memory in read_from_framebuffer.
2013-12-02 17:16:34 +01:00
Stefan Dösinger
ae3788dcba
wined3d: Add a function to retrieve surface data.
2013-12-02 17:16:28 +01:00
Henri Verbeet
7052c87358
wined3d: Properly check for the front buffer in d3dfmt_get_conv().
2013-12-02 12:12:43 +01:00
Stefan Dösinger
6d0d018bfa
wined3d: Don't store PBO pointers in allocatedMemory.
2013-11-27 17:14:32 +01:00
Henri Verbeet
4b3db52b53
wined3d: Merge the texture creation functions.
2013-11-27 11:30:15 +01:00
Stefan Dösinger
eb446e8640
wined3d: Use the pointer returned by map in wined3d_surface_getdc.
2013-11-26 17:15:25 +01:00
Stefan Dösinger
038e45c662
wined3d: Don't set SFLAG_INSYSMEM in surface_download_data.
...
surface_load_location takes care of this.
2013-11-26 17:15:21 +01:00
Stefan Dösinger
1a55000df1
wined3d: Discard non-sysmem locations in unload.
2013-11-26 17:15:14 +01:00
Henri Verbeet
4122cd8083
wined3d: Get rid of surface_set_dirty().
2013-11-25 15:15:54 +01:00
Henri Verbeet
71b982d040
wined3d: Just use surface_invalidate_location() in surface_map().
2013-11-25 15:15:54 +01:00
Henri Verbeet
82c1d01364
wined3d: Just validate the sysmem location in surface_init().
...
This is all surface_set_dirty() really does here.
2013-11-25 15:15:54 +01:00
Henri Verbeet
caf9ad6c2c
wined3d: Swap the container's texture name in flip_surface().
2013-11-22 16:41:35 +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
Henri Verbeet
c025b5d06b
wined3d: surface_load() should never fail.
2013-11-22 11:37:07 +01:00
Stefan Dösinger
6bc69c271b
wined3d: Don't create a DIB section in gdi_surface_map.
2013-11-21 19:39:02 +01:00
Henri Verbeet
f91eab6d3e
wined3d: Merge surface_bind_and_dirtify() and volume_bind_and_dirtify() into wined3d_texture_bind_and_dirtify().
2013-11-21 13:36:35 +01:00
Henri Verbeet
2e63e8f9cc
wined3d: Get rid of surface_bind().
2013-11-21 13:36:33 +01:00
Henri Verbeet
6b90248aec
wined3d: Merge texture2d_bind() and texture3d_bind() into wined3d_texture_bind().
2013-11-21 13:36:29 +01:00
Stefan Dösinger
0ff0a6e9bc
wined3d: Remove surface->dirtyRect.
2013-11-20 16:54:39 +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
Stefan Dösinger
5d4233378d
wined3d: Remove broken ddraw overlay support.
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
ad6a194aa0
wined3d: Surfaces always have a container in ffp_blit_set().
2013-11-20 11:28:18 +01:00
Henri Verbeet
51f05a1f14
wined3d: Surfaces always have a container in surface_invalidate_location().
2013-11-20 11:28:16 +01:00
Henri Verbeet
0fba32f139
wined3d: Surfaces always have a container in surface_modify_ds_location().
2013-11-19 11:09:00 +01:00
Henri Verbeet
f020251d2b
wined3d: Surfaces always have a container in fb_copy_to_texture_direct().
2013-11-19 11:08:58 +01:00
Henri Verbeet
2d262b3c97
wined3d: Surfaces always have a container in surface_prepare_texture().
2013-11-19 11:08:56 +01:00
Henri Verbeet
57292f9498
wined3d: Surfaces always have a container in surface_internal_preload().
2013-11-19 11:08:54 +01:00
Henri Verbeet
aa48321ccd
wined3d: Surfaces always have a container in surface_add_dirty_rect().
2013-11-19 11:08:52 +01:00
Henri Verbeet
743900faaa
wined3d: Surfaces always have a container in surface_unload().
2013-11-18 11:20:54 +01:00
Henri Verbeet
32fb4e45eb
wined3d: Surfaces always have a container in surface_bind().
2013-11-18 11:20:51 +01:00
Henri Verbeet
96fbf9fed3
wined3d: Surfaces always have a container in draw_textured_quad().
2013-11-18 11:20:49 +01:00
Henri Verbeet
941fe99eaf
wined3d: Avoid calling wined3d_surface_set_mem() in surface_cleanup().
...
Calling wined3d_surface_set_mem() might cause the surface container to be
accessed, for example when invalidating resource locations. This would become
a problem once we assume surfaces always have a container, and is pointless
anyway because the surface is being destroyed.
2013-11-18 11:20:42 +01:00
Henri Verbeet
42f6ca821c
wined3d: Set the surface container in surface_init().
2013-11-15 12:00:32 +01:00
Henri Verbeet
bb00811d60
wined3d: Pass a wined3d_resource_desc structure to surface_init().
2013-11-15 12:00:30 +01:00
Henri Verbeet
afc3d2ab70
wined3d: Create surfaces inside wined3d.
2013-11-15 12:00:26 +01:00
Henri Verbeet
c3da4ce088
wined3d: Don't map the destination surface read-only in surface_convert_format().
2013-11-13 11:27:42 +01:00
Henri Verbeet
7c928b6c5c
wined3d: Create textures for converted surfaces.
2013-11-13 11:27:39 +01:00
Stefan Dösinger
331bb68edb
wined3d: Remove SCRATCH and SYSMEM lockability warnings.
...
They are not needed any more, resource_access_from_pool takes care of
this.
2013-10-24 19:01:56 +02:00
Stefan Dösinger
db852ff5b5
wined3d: Remove sRGB_decode handling from surface_load_location.
2013-10-09 15:52:24 +02:00
Stefan Dösinger
1631603986
wined3d: Remove redundant surface location changes.
...
fb_copy_to_texture_direct and fb_copy_to_texture_hwstretch already
invalidate everything but the RGB texture.
2013-10-08 15:39:02 +02:00
Stefan Dösinger
e4a0767e2d
wined3d: Get rid of SFLAG_LOCKABLE.
2013-10-08 15:39:02 +02:00
Stefan Dösinger
bff422f340
wined3d: Avoid duplicated code in wined3d_surface_blt.
2013-10-08 15:39:02 +02:00
Henri Verbeet
ea4c3d5d5d
wined3d: Get rid of the broken render target check for surface_blt_special().
...
This used to work out in practice because swapchain surfaces were always
considered render targets, but that's no longer true. We can just remove the
check, because surface_blt_special() already contains a proper check itself
anyway.
2013-09-24 12:57:24 +02:00
Stefan Dösinger
5e89689bcd
wined3d: Make format conversion functions work on volumes.
2013-09-23 20:32:32 +02:00
Stefan Dösinger
24fbe9f2ec
wined3d: Pass the destination pitch to format conversion functions.
...
The relation between src and dst pitches is not correct if the source
pitch is padded to match pitch alignment requirements.
2013-09-20 17:04:04 +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
Henri Verbeet
d1e44ff775
wined3d: Pass a resource to wined3d_resource_free_sysmem().
2013-09-16 12:51:13 +02:00
Henri Verbeet
261246ef21
wined3d: Pass a resource to wined3d_resource_allocate_sysmem().
2013-09-16 12:51:13 +02:00
Henri Verbeet
1b53cbd8de
wined3d: Make primary_render_target_is_p8() work on a swapchain.
2013-09-12 10:59:11 +02:00
Henri Verbeet
1453baf64b
wined3d: Properly check if the swapchain format is WINED3DFMT_P8_UINT in primary_render_target_is_p8().
2013-09-11 09:58:52 +02:00
Henri Verbeet
aea8d5c11e
wined3d: Get rid of the render target / overlay check in wined3d_surface_flip().
...
The surface needs to be part of a swapchain to be flipped, but that doesn't
have much to do with WINED3DUSAGE_RENDERTARGET. We can just remove the check
here, because ddraw_surface7_Flip() already has the correct check.
2013-09-11 09:58:50 +02:00
Henri Verbeet
d21c26e4f6
wined3d: Get rid of surface_modify_location().
2013-09-10 11:09:53 +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
Henri Verbeet
c6ce5486c0
wined3d: Get rid of the special SFLAG_INTEXTURE / SFLAG_INSRGBTEX code in surface_modify_location().
...
It turns out this is already safe for all callers.
2013-09-10 11:09:48 +02:00
Henri Verbeet
e2f4ab4607
wined3d: Rewrite surface_modify_location() on top of surface_validate_location() and surface_invalidate_location().
2013-09-09 22:09:58 +02:00
Henri Verbeet
c44012f0c1
wined3d: Get rid of the "dirty" flag to wined3d_texture_set_dirty().
2013-09-09 22:09:57 +02:00
Henri Verbeet
7859509f5b
wined3d: Get rid of the SFLAG_INTEXTURE / SFLAG_INSRGBTEX check in surface_set_texture_name().
2013-09-06 12:00:12 +02:00
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