Stefan Dösinger
ebd6bf7f7a
wined3d: Remove old surface flipping hacks.
...
They're non-functional these days anyway.
2015-09-08 21:59:16 +09:00
Henri Verbeet
2773b27bb1
wined3d: Use unsigned mask constants in shifts.
2015-08-26 23:53:22 +09:00
Henri Verbeet
9f530b579e
wined3d: Get rid of some powf() calls.
2015-08-26 23:53:22 +09:00
Stefan Dösinger
b471b217b2
wined3d: Handle multisample_quality if type == MULTISAMPLE_NON_MASKABLE.
2015-08-25 21:08:41 +09:00
Henri Verbeet
b4b2a29dec
wined3d: Use surface_get_rect() in wined3d_surface_update_overlay().
2015-06-15 22:10:35 +09:00
Stefan Dösinger
e8ec01ad51
wined3d: Use renderbuffers if the resource type is RB.
2015-06-09 22:09:57 +09:00
Nikolay Sivov
68fcf9d7cf
wined3d: dst_surface can't be NULL at this point (Coverity).
2015-06-08 18:51:54 +09:00
Stefan Dösinger
c8d1a70804
wined3d: Set the gl resource type in resource_init.
2015-06-08 18:51:24 +09:00
Stefan Dösinger
ec25ca7832
wined3d: Read format flags from the surface container.
2015-06-08 18:51:21 +09:00
Marcus Meissner
d8a0f77c2b
wined3d: Remove superflous check (Coverity).
2015-05-06 18:14:44 +09:00
Stefan Dösinger
3c0ed9ce0a
wined3d: Introduce resource-type specific format flags.
2015-04-24 19:08:35 +09:00
Stefan Dösinger
9076612e2d
wined3d: Shadow format flags in the resource.
2015-04-22 23:24:41 +09:00
Henri Verbeet
8b6cddbe25
wined3d: Get rid of context_invalidate_active_texture().
...
Calling wined3d_texture_bind() + context_invalidate_active_texture() is
equivalent to just calling wined3d_texture_bind_and_dirtify().
2015-04-16 20:44:43 +09:00
Stefan Dösinger
27209c69a9
wined3d: Call arbfp_blit_surface and ffp_blit_blit_surface through the blit interfaces.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
6b455e74a0
wined3d: Move fixed function draw blits out of surface_blt_special.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
f4b6874491
wined3d: Match blitter and fragment processing color keying capabilities.
...
This is necessary if e.g. the nvts or ffp fragment processing pipeline
is selected for debugging purposes on a GPU that otherwise supports the
ARB program blitter.
2015-04-10 21:43:51 +09:00
Stefan Dösinger
2d56694445
wined3d: Implement color keying in arbfp_blit.
2015-04-10 21:43:12 +09:00
Stefan Dösinger
82db5954c4
wined3d: Set color keys through the command stream.
2015-04-10 21:42:41 +09:00
Stefan Dösinger
fa0a9232e0
wined3d: Move surface_convert_color_to_float to utils.c.
2015-04-07 23:10:30 +09:00
Stefan Dösinger
844c4efb47
wined3d: Give tex_type and its values a better name.
2015-04-03 00:33:28 +09:00
Stefan Dösinger
df829de88d
ddraw: Handle DDBLT_ROP in ddraw.
2015-03-18 21:03:22 +09:00
Matteo Bruni
8ed9c2a11b
wined3d: Add a couple checkGLcall() in surface_prepare_rb().
2015-03-02 13:47:56 +09:00
Matteo Bruni
78ae4f66d7
wined3d: Set GL_UNPACK_ALIGNMENT to 1.
...
Alignment should be taken care by the surface pitch and
GL_UNPACK_ROW_LENGTH alone just fine, as long as the pitch is a
multiple of the pixel size. Client APIs respect that,
internally we need to do the same and the changes to
surface_load_texture and wined3d_volume_upload_data are there
for this reason (e.g. WINED3DFMT_R16G16_SNORM is emulated with
GL_RGB16 when NV_texture_shader isn't supported).
2015-02-20 22:53:09 +09:00
Matteo Bruni
d56c168da1
wined3d: Set the surface pitch for user-memory surfaces.
2015-02-19 17:51:36 +09:00
Stefan Dösinger
52ab9e382e
wined3d: Read WINED3D_TEXTURE_COLOR_KEY and gl_color_key to find format conversions.
...
The idea is to make it clear that wined3d_texture_load is responsible
for checking the color key for changes. Once we can do color keying in
the shader we also have one place where we can disable the surface
conversion.
2015-02-18 22:02:39 +09:00
Stefan Dösinger
e53d22b0c0
wined3d: Manage color key changes in the texture.
...
This fixes a regression with color keyed mipmaps that was introduced by
ee8a5b7dd1
. surface_load for level n+1
would call texture_force_reload, thus removing level n from the GL
texture.
2015-02-18 22:02:33 +09:00
Matteo Bruni
ac3df5e1f1
wined3d: Use the proper pitch in read_from_framebuffer().
...
This function is only used in the non-default "backbuffer" ORM.
2015-02-11 22:21:36 +09:00
Matteo Bruni
b875a4a44a
wined3d: Use GL_CLAMP_TO_EDGE instead of GL_CLAMP.
...
GL_CLAMP was removed from core profile and probably GL_CLAMP_TO_EDGE was
intended to be used here anyway.
2015-02-10 16:21:55 +09:00
Stefan Dösinger
3d49060fdf
wined3d: Fix the color keyed P8 alpha ref value.
2015-02-04 23:14:59 +09:00
Matteo Bruni
6bb32e47ff
wined3d: Use the core gl*CompressedTex* functions.
2015-01-20 16:08:54 +01:00
Henri Verbeet
ca06f960ed
wined3d: Use the same flags for wined3d_texture_set_color_key() and the "color_key_flags" field it sets.
...
This fixes a regression introduced by commit a8ab569415
.
2015-01-19 14:31:51 +01:00
Henri Verbeet
5231113fc7
wined3d: Replace wined3d_texture_apply_state_changes() with wined3d_texture_apply_sampler_desc().
2015-01-15 17:24:38 +01:00
Henri Verbeet
86e99abb12
wined3d: Store a struct wined3d_sampler_desc in struct gl_texture.
...
Instead of a enum wined3d_texture_state array.
2015-01-15 17:24:35 +01:00
Matteo Bruni
79a0dece8b
wined3d: Use the core version of the gl*Buffer* functions.
2015-01-15 11:44:20 +01:00
Henri Verbeet
ea534c9ab4
wined3d: Allow initial texture contents to be specified with wined3d_texture_create().
2015-01-05 20:15:35 +01:00
Stefan Dösinger
aad1997dff
wined3d: Remove texture locations after downloading all subresources.
2014-10-23 18:48:25 +09:00
Henri Verbeet
1800712298
wined3d: Track texture coordinate normalization per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
c5459881a3
wined3d: Track SFLAG_DYNLOCK per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
d6a511e022
wined3d: Track system memory pinning per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
710694d9ca
wined3d: Track format conversion per-texture.
2014-10-08 13:13:37 +02:00
Henri Verbeet
ee8a5b7dd1
wined3d: Track texture allocation per-texture.
2014-10-08 13:13:37 +02:00
Henri Verbeet
0c0a2adc71
wined3d: Handle GL texture allocation in the texture code.
2014-10-08 13:13:37 +02:00
Henri Verbeet
77646173a0
wined3d: Move the color key conversion helpers to util.c.
2014-10-08 13:13:37 +02:00
Henri Verbeet
bd1afdb3c3
wined3d: Get rid of surface_prepare_texture_internal().
2014-10-07 20:22:07 +02:00
Henri Verbeet
6da1cff518
wined3d: Get rid of d3dfmt_convert_surface().
2014-10-07 20:22:06 +02:00
Henri Verbeet
71b59afe03
wined3d: Return the destination format from d3dfmt_get_conv().
2014-10-07 20:22:05 +02:00
Henri Verbeet
fd342cce3e
wined3d: Don't check for color-keying for WINED3D_CT_P8.
...
We don't support p8 color keying either way.
2014-10-06 17:35:17 +02:00
Henri Verbeet
c5bf229287
wined3d: Print a FIXME for any unhandled format in d3dfmt_get_conv().
2014-10-06 17:35:15 +02:00
Henri Verbeet
dffcc36dd4
wined3d: Don't abuse conv_byte_count for color-key conversions.
2014-10-06 17:35:12 +02:00
Henri Verbeet
b0ce89d810
wined3d: Just use glGammaInternal/rtInternal from the destination format in d3dfmt_get_conv().
...
Using glGammaInternal or rtInternal should do the right thing in principle,
although in practice they should never get used either way.
2014-10-06 17:35:10 +02:00
Henri Verbeet
7d42d9ea91
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8A8.
2014-10-03 09:22:52 +02:00
Henri Verbeet
dabe5b4479
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8X8.
2014-10-03 09:22:49 +02:00
Henri Verbeet
548978dec4
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8.
2014-10-03 09:22:45 +02:00
Henri Verbeet
dabb07aea6
wined3d: Introduce a separate function for WINED3D_CT_CK_B5G5R5X1.
2014-10-02 16:58:27 +02:00
Henri Verbeet
e377ad45fa
wined3d: Introduce a separate function for WINED3D_CT_CK_B5G6R5.
2014-10-02 16:58:25 +02:00
Henri Verbeet
e10a46c300
wined3d: Introduce a separate function for WINED3D_CT_P8.
2014-10-02 16:58:23 +02:00
Henri Verbeet
5802f72adf
wined3d: Just store the wined3d format in color_key_info[].
2014-10-02 16:58:21 +02:00
Henri Verbeet
2c7be38bb4
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_CK_B8G8R8X8.
2014-10-02 16:58:19 +02:00
Henri Verbeet
7579a96ac1
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_CK_B8G8R8.
2014-10-01 10:35:56 +02:00
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
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