Henri Verbeet
02b031e61a
wined3d: Convert to WINED3DFMT_B5G5R5A1_UNORM for WINED3D_CT_CK_B5G6R5.
2014-10-01 10:35:54 +02:00
Henri Verbeet
6f8cb77ea9
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_P8.
2014-10-01 10:35:52 +02:00
Henri Verbeet
632d2fca6e
wined3d: Fix the pitch handling in the no-palette WINED3D_CT_P8 case.
2014-10-01 10:35:50 +02:00
Henri Verbeet
c5d917777a
wined3d: Get rid of the WINED3D_CT_NONE case in d3dfmt_convert_surface().
...
This is never used.
2014-10-01 10:35:47 +02:00
Henri Verbeet
90e3312c8c
wined3d: Use a more consistent naming for wined3d_conversion_type elements.
2014-09-30 17:35:56 +02:00
Henri Verbeet
df21c2b346
wined3d: Pass a texture to d3dfmt_get_conv().
2014-09-30 17:35:24 +02:00
Henri Verbeet
6323a26f6c
wined3d: Get rid of the "use_texturing" parameter to d3dfmt_get_conv().
2014-09-30 17:34:55 +02:00
Henri Verbeet
0932567faf
wined3d: Use a lookup table in d3dfmt_get_conv().
2014-09-30 17:34:20 +02:00
Henri Verbeet
a8ab569415
wined3d: Use wined3d_texture_set_color_key() to manipulate the color-key in surface_blt_special().
2014-09-30 10:18:37 +02:00
Henri Verbeet
2d5c8aff3c
wined3d: Get rid of SFLAG_DONOTFREE.
2014-09-29 10:37:37 +02:00
Henri Verbeet
97856bcfee
wined3d: Replace wined3d_surface_update_desc() with wined3d_texture_update_desc().
2014-09-29 10:37:35 +02:00
Henri Verbeet
8aa1137509
wined3d: Use the texture resource in wined3d_surface_depth_fill().
2014-09-19 10:49:29 +02:00
Henri Verbeet
4f2110b0ce
wined3d: Never pass a surface to wined3d_resource_is_offscreen().
2014-09-19 10:49:27 +02:00
Stefan Dösinger
ee0ac3663b
wined3d: Initialize the map binding in resource_init.
2014-08-26 14:46:55 +02:00
Henri Verbeet
07985a8c38
wined3d: Use rendertarget views for depth/stencil buffers instead of surfaces.
...
I don't think the difference between d3d10 depth/stencil and rendertarget
views is large enough to justify a separate type. Unfortunately that does make
the name "wined3d_rendertarget_view" slightly awkward.
2014-08-22 12:53:11 +02:00
Henri Verbeet
9f9731410b
wined3d: Also update the container in wined3d_surface_update_desc().
...
This fixes a bug exposed by commit 415b803720
.
In particular, wined3d_resource_update_draw_binding() uses the multisample
type to determine to appropriate draw binding, and since we never updated that
for the container, we could end up with an incorrect draw binding after a
device reset.
2014-08-22 12:53:01 +02:00
Henri Verbeet
b005ad6f90
wined3d: Use rendertarget views for color output instead of surfaces.
2014-08-21 12:24:42 +02:00
Henri Verbeet
eb24c9578c
wined3d: Keep a reference to the resource in rendertarget views.
2014-08-21 12:24:21 +02:00
Henri Verbeet
d3387cf77b
wined3d: Keep a reference to the backbuffer textures instead of the surfaces in the swapchain.
2014-08-20 13:29:53 +02:00
Henri Verbeet
ec87407e7c
wined3d: Keep a reference to the frontbuffer texture instead of the surface in the swapchain.
2014-08-20 13:29:52 +02:00
Henri Verbeet
415b803720
wined3d: Use the texture draw binding instead of the surface draw binding.
2014-08-20 13:29:50 +02:00
Henri Verbeet
aa7016054a
wined3d: Move the "swapchain" field from struct wined3d_surface to struct wined3d_texture.
2014-08-20 13:29:47 +02:00
Henri Verbeet
1ce3269ac1
wined3d: Replace surface_update_draw_binding() with wined3d_resource_update_draw_binding().
2014-08-20 13:29:45 +02:00
Henri Verbeet
f753ff90be
wined3d: Replace surface_is_offscreen() with wined3d_resource_is_offscreen().
...
Introducing rendertarget views will (eventually) allow rendering to 3D
textures and buffers.
2014-08-19 14:49:39 +02:00
Henri Verbeet
694cdcc41c
wined3d: Move the "map_binding" field from struct wined3d_surface to struct wined3d_resource.
...
Like "draw_binding".
2014-08-19 14:49:36 +02:00
Henri Verbeet
ed230a426a
wined3d: Explicitly destroy the surface in texture2d_sub_resource_cleanup().
...
Like volumes. We can do this now because we no longer have standalone
surfaces.
2014-08-19 14:49:32 +02:00
Henri Verbeet
5ef8e97414
wined3d: Move the "draw_binding" field from struct wined3d_surface to struct wined3d_resource.
2014-08-04 14:23:52 +02:00
Henri Verbeet
d079066f5d
wined3d: Get rid of the get_drawable_size() callback in struct wined3d_surface.
2014-08-04 14:23:49 +02:00
Stefan Dösinger
2abecc46c6
wined3d: Remove wined3d_surface_set/get_priority.
2014-07-16 16:09:51 +02:00
Stefan Dösinger
9d49b7a9be
wined3d: Set palettes on the swapchain.
2014-06-30 22:04:53 +02:00
Stefan Dösinger
3909215773
wined3d: Remove d3dfmt_p8_init_palette.
2014-06-11 16:14:38 +02:00
Stefan Dösinger
bdc396e4f5
wined3d: Fix indentation in d3dfmt_p8_init_palette.
2014-05-15 19:05:03 +02:00
Stefan Dösinger
fd0189bbfa
wined3d: Move get_dc palette updates to ddraw.
2014-05-15 19:05:02 +02:00
Stefan Dösinger
544816797a
wined3d: Don't update the color table on palette changes.
2014-05-14 13:30:33 +02:00
Stefan Dösinger
7b049245f5
wined3d: Always provide P8 GL texture information.
2014-05-14 13:30:08 +02:00
Stefan Dösinger
bfb5be0f4b
wined3d: Remove WINED3D_CT_PALETTED_CK.
...
There's no difference between WINED3D_CT_PALETTED_CK and
WINED3D_CT_PALETTED with the palette index in the alpha channel.
2014-05-14 13:29:58 +02:00
Stefan Dösinger
c1cca63e5d
wined3d: Always store the palette index in the alpha component.
2014-05-14 13:29:52 +02:00
Stefan Dösinger
fc25510fad
wined3d: Remove wined3d_surface_get_palette.
2014-05-12 21:24:59 +02:00
Stefan Dösinger
46df06aae7
wined3d: Implement DDBLTFX_MIRRORUPDOWN for DXT2.
2014-05-12 21:24:49 +02:00
Stefan Dösinger
1558391a11
wined3d: Store RGBQUADs in palettes.
2014-05-07 20:21:56 +02:00
Stefan Dösinger
19f45af19c
wined3d: Copy the DIB to sysmem when PIN_SYSMEM is set.
2014-05-07 20:21:55 +02:00
Stefan Dösinger
39212d2ffb
wined3d: Remove broken gdi palette code.
2014-05-02 16:32:54 +02:00
Henri Verbeet
5cf9fe1c63
wined3d: Get rid of surface_set_texture_target().
2014-04-23 15:00:46 +02:00
Henri Verbeet
81fb749ecf
wined3d: Introduce a separate function to calculate the pitch for a given format and width.
2014-04-23 15:00:14 +02:00
Stefan Dösinger
dfbff712f4
wined3d: surface_load_ds_location can handle WINED3D_LOCATION_DISCARDED.
2014-03-03 17:46:46 +01:00
Henri Verbeet
b40eda767b
wined3d: Also trace "mem" and "pitch" in wined3d_surface_update_desc().
2014-03-03 17:02:25 +01:00
Stefan Dösinger
2728e7b887
wined3d: Reject height scaled repacked np2 textures.
2014-02-12 19:15:32 +01:00
Stefan Dösinger
6583379077
wined3d: Don't use NP2 repacking for RECT textures.
2014-02-12 19:15:31 +01:00
Stefan Dösinger
d640018a3c
wined3d: Only set SFLAG_DYNLOCK when map_binding = sysmem.
...
All other map bindings are never freed. Setting SFLAG_DYNLOCK if
map_binding != sysmem might only keep a heap memory allocation around
(e.g. after device_reset) that is never used.
2014-01-17 18:10:18 +01:00
Stefan Dösinger
5630cb5dc8
wined3d: Don't set SFLAG_DYNLOCK at surface creation.
...
We no longer depend on SFLAG_DYNLOCK to create buffers and PIN_SYSMEM
makes sure the address remains constant.
2014-01-17 18:10:13 +01:00
Stefan Dösinger
b81e560531
wined3d: Migrate surfaces to the new location flags.
2014-01-17 18:10:10 +01:00
Stefan Dösinger
beb64c9998
wined3d: Separate surface locations and flags.
2014-01-17 18:10:08 +01:00
Stefan Dösinger
00923cb50c
wined3d: Remove surface_ops->map.
2014-01-17 18:10:05 +01:00
Stefan Dösinger
f1ac04f2a6
wined3d: Add a missing break.
2014-01-17 16:22:51 +01:00
Stefan Dösinger
65bc678fcc
wined3d: Prevent blits to surfaces that will be converted.
2014-01-16 21:04:19 +01:00
Stefan Dösinger
09dbba00d0
wined3d: Remove surface_init_sysmem.
2014-01-16 21:04:19 +01:00
Stefan Dösinger
abb620ed2e
wined3d: Sysmem can be freed when user memory is used.
2014-01-16 21:04:19 +01:00
Stefan Dösinger
2b8e900ac4
wined3d: Give buffers their own location.
2014-01-15 20:03:53 +01:00
Stefan Dösinger
321cd8e825
wined3d: Decide about PBO use at surface creation time.
2014-01-15 20:03:47 +01:00
Stefan Dösinger
7c052171d6
wined3d: Remove SFLAG_PBO.
2014-01-15 20:03:35 +01:00
Stefan Dösinger
035012d5aa
wined3d: Load textures from dib without copying to sysmem first.
2014-01-15 20:03:33 +01:00
Stefan Dösinger
42927d0e9d
wined3d: Add INDIB and INUSERMEM to resource_access_from_location.
2014-01-15 20:03:31 +01:00
Stefan Dösinger
d0823eb4f0
wined3d: Re-enable mapping into the DIB.
2014-01-14 20:18:25 +01:00
Stefan Dösinger
9665884766
wined3d: Don't map the surface in getdc.
...
This avoids bouncing the content between the map binding and DIB.
2014-01-14 20:18:25 +01:00
Stefan Dösinger
adf0ab2ad8
wined3d: Give the DIB section its own location.
2014-01-14 20:18:24 +01:00
Stefan Dösinger
f6403b4ac0
wined3d: Do not use surface->resource.allocatedMemory.
2014-01-14 20:18:23 +01:00
Stefan Dösinger
353b3ba6d3
wined3d: Don't lock directly into the DIB.
2014-01-14 20:18:22 +01:00
Stefan Dösinger
4ca8f7104f
wined3d: Move map binding loading to wined3d_surface_map.
2014-01-13 18:41:42 +01:00
Stefan Dösinger
e2c0bc63cb
wined3d: Start to split up surface_prepare_system_memory.
2014-01-13 18:41:15 +01:00
Stefan Dösinger
676a7f2140
wined3d: Make the callers of load_location responsible for allocating sysmem.
2014-01-13 18:41:09 +01:00
Stefan Dösinger
28bfc20589
wined3d: Use the map binding to optimize sysmem->sysmem blits.
2014-01-13 18:41:03 +01:00
Stefan Dösinger
965d00f4b6
wined3d: Give user memory its own location.
2014-01-10 17:59:16 +01:00
Stefan Dösinger
badf3d8db7
wined3d: Load surfaces into map binding memory on unload.
...
A surface can stay in DIB or user memory just fine. When buffers get
their own location an exception for them has to be added.
2014-01-10 17:56:48 +01:00
Stefan Dösinger
18bf8b49b3
wined3d: Move location flag updating out of surface_init_sysmem.
2014-01-10 17:56:43 +01:00
Stefan Dösinger
1b561e815e
wined3d: Use the map binding for RGB<->sRGB loads.
2014-01-10 17:56:39 +01:00
Stefan Dösinger
5c1df19b16
wined3d: Use the map binding to reload surfaces on color key changes.
2014-01-10 17:56:30 +01:00
Stefan Dösinger
5479ccea20
wined3d: Use the map binding to reload surfaces on palette changes.
2014-01-10 17:56:27 +01:00
Stefan Dösinger
1046551c34
wined3d: Add a map_binding field to surfaces.
...
Buffers, heap memory, user memory and DIBs will have their own
locations. This field specifies which location is used when the surface
is mapped.
2014-01-10 17:56:24 +01:00
Henri Verbeet
51cdeeacd4
wined3d: Explicitly request alpha testing for blitting the cursor and logo textures to screen.
2014-01-10 12:06:09 +01:00
Frédéric Delanoy
91f2435469
Assorted spelling fixes.
2014-01-09 17:39:59 +01:00
Stefan Dösinger
441d8ffeb2
wined3d: Mark the system location up to date in the DIB recreation codepath.
2014-01-09 17:39:54 +01:00
Stefan Dösinger
db6d3c500c
wined3d: Remove SFLAG_USERPTR.
2014-01-09 17:39:53 +01:00
Henri Verbeet
4710c4b51a
wined3d: Store color keys in textures instead of in surfaces.
2014-01-09 15:50:39 +01:00
Stefan Dösinger
b91973daa7
wined3d: Merge wined3d_surface_set_mem into wined3d_surface_update_desc .
2014-01-08 20:02:22 +01:00
Stefan Dösinger
82666af87a
wined3d: Simplify wined3d_surface_set_mem.
2014-01-08 19:58:56 +01:00
Stefan Dösinger
70eab9d025
wined3d: Support custom pitches in wined3d_surface_update_desc.
2014-01-08 17:35:08 +01:00
Stefan Dösinger
fb75292875
wined3d: Don't store user memory in allocatedMemory.
2013-12-13 16:55:30 +01:00
Stefan Dösinger
a1762ba8a4
wined3d: Don't check for render target usage in wined3d_surface_set_mem.
...
Ddraw and d3d9 already take care of this.
2013-12-13 16:55:28 +01:00
Henri Verbeet
4e7b62a46d
wined3d: Get rid of unused palette flags.
2013-12-13 12:36:11 +01:00
Stefan Dösinger
78fda5cea0
wined3d: Rename surface_load_pbo to surface_create_pbo.
2013-12-11 18:17:02 +01:00
Stefan Dösinger
4de7249d23
wined3d: Call buffer_get_memory in surface_load_pbo.
2013-12-11 18:17:01 +01:00
Stefan Dösinger
800571c015
wined3d: Use surface_get_memory in surface_download_data.
2013-12-11 18:17:01 +01:00
Stefan Dösinger
9b67b1b8a1
wined3d: Support getdc with user memory.
2013-12-11 18:17:00 +01:00
Henri Verbeet
544e52bff4
wined3d: Recreate DIB sections in wined3d_surface_update_desc().
...
Since commit 6bc69c271b
, the GDI implementation
assumes DIB sections always exist.
2013-12-11 15:14:49 +01:00
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