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
10a8b2cd7f
wined3d: Remove resource->allocatedMemory.
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
Jonathan Liu
91c5cf33ad
wined3d: Avoid wined3d_ftoa buffer overflow.
2014-01-14 12:31:37 +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
c770d3f573
wined3d: Mark the map binding up to date in texture2d_sub_resource_add_dirty_region.
2014-01-10 17:56:41 +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
5dd286d05a
wined3d: Make rebind_fbo in struct wined3d_context a bitfield.
2014-01-10 12:06:13 +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
Henri Verbeet
06d6bdae4a
wined3d: Place the logo texture in the default pool.
2014-01-10 12:06:04 +01:00
Henri Verbeet
f8e62bc596
wined3d: Place the cursor texture in the default pool.
2014-01-10 12:05:57 +01:00
Frédéric Delanoy
91f2435469
Assorted spelling fixes.
2014-01-09 17:39:59 +01:00
Stefan Dösinger
bffd536213
wined3d: GL_NV_vertex_program2_option supports relative offsets > 63.
...
The ARR codepath used if ctx->target_version >= NV2 does not account for
the correction offset, but the indirect addressing reads do, which
ultimately results in incorrect offsets. Since the limitation goes away
as soon as we enable GL_NV_vertex_program_2_option ignoring the offset
is the best thing to do. I don't set shader_data->rel_offset to zero in
the pre-compilation analysis because enablding NV_vertex_program2 is in
theory a decision that is taken later during code generation.
2014-01-09 17:39:55 +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
Henri Verbeet
d412eb568e
wined3d: Introduce a common GLSL handler for scalar instructions.
2014-01-09 15:50:30 +01:00
Henri Verbeet
4d93adf75e
wined3d: Reset the command stream state as well in wined3d_device_reset().
2014-01-09 15:50:25 +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
Henri Verbeet
ddae20b689
wined3d: Fix up the backbuffer count on failure in swapchain_init().
2014-01-08 14:34:12 +01:00
Henri Verbeet
2401a82bdc
wined3d: Get rid of the unused screen_palents field in struct wined3d_palette.
2014-01-08 14:34:12 +01:00
Alexandre Julliard
5e7416e5c8
makefiles: Get rid of the MAKE_DLL_RULES variable.
2014-01-02 12:08:18 +01:00
Stefan Dösinger
1e9fe22f4c
wined3d: Fix an msvc warning.
2014-01-01 20:45:25 +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
Henri Verbeet
f27bb660b3
wined3d: Explicitly pass the palette size to wined3d_palette_create().
2013-12-13 12:36:11 +01:00
Henri Verbeet
89dedf6408
ddraw: Just set the palette caps in ddraw7_GetCaps().
2013-12-13 12:36:11 +01:00
Frédéric Delanoy
cc6f9c36cd
wined3d: Use BOOL type where appropriate.
2013-12-12 19:21:36 +01:00
Henri Verbeet
bf7f80f4b3
ddraw: Store the palette flags in the ddraw palette.
2013-12-12 12:08:23 +01:00
Henri Verbeet
1f0bb534ec
ddraw: Keep a reference to the palette in the surface.
2013-12-12 12:08:16 +01:00
Henri Verbeet
27dc41d0dc
wined3d: Fix the source swizzle for WINED3DSIH_LOG and WINED3DSIH_LOGP.
2013-12-12 12:08:09 +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
c8852c3ee3
wined3d: Fix the source swizzle for WINED3DSIH_EXPP.
2013-12-11 15:15:01 +01:00
Henri Verbeet
6e9acca1f4
wined3d: Fix the source swizzle for WINED3DSIH_EXP.
2013-12-11 15:14:58 +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
38495706b7
wined3d: Remove the render target check in x11_copy_to_screen().
2013-12-11 15:14:38 +01:00
Nikolay Bogoychev
34ad4c7014
wined3d: Recognize GeForce GTX 765M.
2013-12-06 16:46:33 +01:00
Nikolay Bogoychev
48de52e2e0
wined3d: Recognize Haswell mobile graphics 4600.
2013-12-06 16:46:27 +01:00
Henri Verbeet
660bc8b717
wined3d: Print the WINED3D_SWAP_EFFECT_FLIP FIXME only once.
...
The comment is also outdated.
2013-12-06 13:14:52 +01:00
Henri Verbeet
36dbac6cb8
wined3d: Set the volume container in volume_init().
2013-12-06 13:14:52 +01:00
Henri Verbeet
5db26f7b45
wined3d: Pass a wined3d_resource_desc structure to volume_init().
2013-12-06 13:14:52 +01:00
Henri Verbeet
15c1a26b55
wined3d: Create volumes inside wined3d.
2013-12-06 13:14:52 +01:00
Henri Verbeet
da3549315f
wined3d: Get rid of the buffer_object_size field from struct wined3d_buffer.
2013-12-06 13:14:52 +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
Henri Verbeet
12f16f2127
wined3d: Reimplement wined3d_ftoa().
...
The current implementation is not precise enough when the FPU is in REAL4
mode, which also happens to be the mode d3d9 sets by default. Doing the same
thing with integer math is a huge pain, so just replace the decimal separator
instead.
2013-11-22 11:37:02 +01:00
Frédéric Delanoy
57d7f74d34
Assorted spelling fixes.
2013-11-21 19:44:46 +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
0d7b12696d
wined3d: Merge texture2d_unload() and texture3d_unload().
2013-11-21 13:36:37 +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
2ca86bcab6
wined3d: Return early in wined3d_texture_bind() if the GL texture already has a name.
2013-11-21 13:36:31 +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
7e72985358
wined3d: wined3d_texture_bind() should never fail.
2013-11-20 11:28:23 +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
e64b19387b
wined3d: Surfaces always have a container in arbfp_blit_set().
2013-11-20 11:28:20 +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
Francois Gouget
dc22a57042
wined3d: Make wined3d_device_create_cursor_texture() static.
2013-11-20 11:28:13 +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
505951e32d
wined3d: Create a proper texture for the software cursor.
2013-11-18 11:20:40 +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
94509fbd59
wined3d: Create a texture for the logo surface.
2013-11-14 16:21:02 +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
Rico Schüller
fb926490fe
wined3d: Use GL_EXT_texture_mirror_clamp when available.
2013-11-07 19:00:50 +01:00
Rico Schüller
de9e1cdcae
wined3d: Use GL_ARB_texture_mirror_clamp_to_edge when available.
2013-11-06 18:00:55 +01:00
Stefan Dösinger
292612cf4b
wined3d: GL_ARB_instanced_arrays provides glDrawElementsInstanced.
2013-11-04 17:41:12 +01:00
Stefan Dösinger
84a1e60e48
wined3d: Check for support before calling glDrawElementsInstancedBaseVertex.
2013-11-04 17:41:12 +01:00
Alexander Dorofeyev
a14793f50b
wined3d: Fix resultarg state handling in nvrc/nvts code.
...
Resultarg affects both rgb and alpha register combiner output. Ensure that changing resultarg updates both.
2013-11-04 17:41:11 +01:00
Henri Verbeet
f4aab54ca1
wined3d: Mark the context valid if making it current on the "backup" window worked.
2013-11-04 11:05:46 +01:00
Henri Verbeet
3ad8989614
wined3d: Introduce a function for safely releasing a DC.
2013-11-04 11:05:43 +01:00
Henri Verbeet
3d226df3b9
wined3d: Avoid initializing some more variables.
2013-10-29 10:33:58 +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
cd3fd297f6
wined3d: Update wined3d_volume_create in the spec file.
...
This was missing in ac871305f8
.
2013-10-16 20:49:26 +02:00
Adam Bolte
66a559328a
wined3d: Add support for nVidia GTX 660M.
2013-10-14 17:26:15 +02:00
Frédéric Delanoy
5c1ea9bff1
wined3d: Avoid initializing some variables.
2013-10-14 10:45:24 +02:00
Henri Verbeet
1419d7389c
wined3d: Send stream output binding updates through the command stream.
2013-10-11 11:06:20 +02:00
Henri Verbeet
f699b6da0b
wined3d: Send sampler binding updates through the command stream.
2013-10-11 11:06:18 +02:00
Henri Verbeet
738de80d0c
wined3d: Send constant buffer binding updates through the command stream.
2013-10-11 11:06:15 +02:00
Henri Verbeet
392a65fe09
wined3d: Unify sampler binding points.
2013-10-10 10:45:00 +02:00
Henri Verbeet
3caefc8337
wined3d: Unify constant buffer binding points.
2013-10-10 10:44:57 +02:00
Henri Verbeet
c228ffbaf0
wined3d: Unify shader binding points.
2013-10-10 10:44:53 +02:00
Stefan Dösinger
86d63f1d5a
wined3d: Move sRGB_decode handling to the top of texture_bind / preload.
2013-10-09 15:52:37 +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
16f7c24296
wined3d: Take sRGB_decode into account in texture_srgb_mode.
2013-10-09 15:52:22 +02:00
Henri Verbeet
079b6d4c11
wined3d: Unify the shader state IDs.
2013-10-09 11:11:07 +02:00
Henri Verbeet
1f22246b84
wined3d: Send material updates through the command stream.
2013-10-09 11:11:00 +02:00
Henri Verbeet
db68c43678
wined3d: Send clip plane updates through the command stream.
2013-10-09 11:10:58 +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
9331c791e8
wined3d: Remove the D3DSWAPEFFECT_DISCARD debug clear code.
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
c6f8404bb6
wined3d: Send transformation matrix updates through the command stream.
2013-10-08 09:09:01 +02:00
Henri Verbeet
b2e75e27f3
wined3d: Send sampler state updates through the command stream.
2013-10-08 09:08:59 +02:00
Henri Verbeet
8cf6d1a429
wined3d: Send texture state updates through the command stream.
2013-10-08 09:08:56 +02:00
Henri Verbeet
8644b62726
wined3d: Move lowest_disabled_stage to the context.
2013-10-07 14:44:35 +02:00
Henri Verbeet
242a79a9d7
wined3d: Don't update lowest_disabled_stage in wined3d_stateblock_apply().
2013-10-07 14:44:35 +02:00
Henri Verbeet
3f6d45bf14
wined3d: Send render state updates through the command stream.
2013-10-07 14:44:35 +02:00
Henri Verbeet
82cf8b2066
wined3d: Send pixel shader binding updates through the command stream.
2013-10-04 12:45:22 +02:00
Henri Verbeet
819e9dda28
wined3d: Send geometry shader binding updates through the command stream.
2013-10-04 12:45:21 +02:00
Henri Verbeet
368fcab2e8
wined3d: Send vertex shader binding updates through the command stream.
2013-10-04 12:45:18 +02:00
Francois Gouget
b0ccc355c3
wined3d: Fix compilation on systems that don't define INFINITY or NAN.
2013-10-03 16:32:38 +02:00
Henri Verbeet
052a863010
wined3d: Send texture binding updates through the command stream.
2013-10-03 12:55:09 +02:00
Henri Verbeet
d61b14371a
wined3d: Send index buffer binding updates through the command stream.
2013-10-03 12:55:04 +02:00
Henri Verbeet
264256970b
wined3d: Send stream frequency updates through the command stream.
2013-10-03 12:54:59 +02:00
Sebastian Lackner
af759e30c9
wined3d: Ensure that wined3d_cs_st_require_space allocates the required space.
2013-10-02 17:13:42 +02:00
Henri Verbeet
57ec706dde
wined3d: Send vertex buffer binding updates through the command stream.
2013-10-02 11:05:41 +02:00
Stefan Dösinger
723e518312
wined3d: Don't invert blits from offscreen surfaces.
2013-10-01 17:32:16 +02:00
Henri Verbeet
1f864bc9c3
wined3d: Send vertex declaration binding updates through the command stream.
2013-10-01 10:57:32 +02:00
Henri Verbeet
fd5fc51bc5
wined3d: Send depth stencil binding updates through the command stream.
2013-10-01 10:57:29 +02:00
Henri Verbeet
438b672660
wined3d: Send render target binding updates through the command stream.
2013-10-01 10:57:27 +02:00
Henri Verbeet
0776060439
wined3d: Send scissor rect updates through the command stream.
2013-09-30 20:34:52 +02:00
Henri Verbeet
8a7744b06e
wined3d: Call state_init_default() from state_init() when the appropriate flag is set.
2013-09-30 20:34:52 +02:00
Henri Verbeet
bc0f990b44
wined3d: Send viewport updates through the command stream.
2013-09-30 20:34:52 +02:00
Marcus Meissner
0c9ce583bc
wined3d: Fixed sizeof() to HeapAlloc (Coverity).
2013-09-30 11:37:46 +02:00
Henri Verbeet
baf285d46a
wined3d: Send draw operation through the command stream.
2013-09-27 10:33:36 +02:00
Henri Verbeet
708b938f64
wined3d: Send clear operations through the command stream.
2013-09-27 10:33:34 +02:00
Henri Verbeet
602c82bce8
wined3d: Send present operations through a command stream.
...
The eventual goal is to have a multithreaded implementation of wined3d_cs_ops
and offload some processing to a different thread.
2013-09-27 10:33:15 +02:00
Henri Verbeet
4a9da034ab
wined3d: Explicitly pass gl_info to state_init_default().
2013-09-26 10:45:52 +02:00
Henri Verbeet
abbc595fc1
wined3d: Initialize the fb state pointer in state_init().
2013-09-26 10:45:50 +02:00
Henri Verbeet
6793fa7157
wined3d: Initialize the default state in device_init().
2013-09-26 10:45:47 +02:00
Henri Verbeet
8866d733e4
wined3d: Introduce a function to initialize swapchain specific device state.
2013-09-25 11:49:08 +02:00
Henri Verbeet
991e47e3c9
wined3d: Allow WINED3DFMT_R8G8B8A8_UNORM render targets.
2013-09-25 11:49:01 +02:00
Francois Gouget
cccba76091
wined3d: Make device_invalidate_shader_constants() static.
2013-09-24 19:08:35 +02:00
Henri Verbeet
9516ce33d8
wined3d: Get rid of clearing the texture bindings in state_init_default().
...
This is arbitrary, we don't do it for any of the other resource bindings
either, and the wined3d_state structure is assumed to be zero-initialized.
2013-09-24 12:57:27 +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
Henri Verbeet
8eb73cd0e9
wined3d: Add fallback depth format info for when ARB_depth_texture is not available.
...
These use the generic GL_DEPTH_COMPONENT internal format, and can't be used
for texturing.
2013-09-24 12:57:21 +02:00
Henri Verbeet
bff80b8bab
wined3d: Copy some missing fields to the new swapchain desc in wined3d_device_reset().
...
The ones that matter are enable_auto_depth_stencil and
auto_depth_stencil_format. auto_restore_display_mode should never change in
practice.
2013-09-23 20:37:29 +02:00
Henri Verbeet
864b25e582
wined3d: Introduce a separate function for updating the viewport and scissor rects.
2013-09-23 20:37:05 +02:00
Stefan Dösinger
556e3e0c76
wined3d: Use GL_APPLE_client_storage for volumes if available.
2013-09-23 20:32:36 +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
bb172d2a38
wined3d: Add support for converted volumes.
2013-09-23 20:32:31 +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
Henri Verbeet
0eae0858ae
wined3d: Set the default scissor rect from the swapchain desc in state_init_default().
...
We always have a swapchain here, even if there are no back buffers.
2013-09-20 11:27:43 +02:00
Henri Verbeet
49c6b87a32
wined3d: Only print a warning about render target usage in wined3d_device_set_render_target().
2013-09-20 11:27:40 +02:00
Stefan Dösinger
d15042837a
wined3d: Pass a correct access flag to glMapBufferARB.
2013-09-19 19:49:49 +02:00
Stefan Dösinger
e9b4f154dd
wined3d: Don't use volume->resource.allocatedMemory.
...
Depending on the location flags, the buffer or heap_memory should be
used.
2013-09-19 19:49:43 +02:00
Henri Verbeet
5bd3bfff99
wined3d: Avoid LPVOID.
2013-09-19 19:49:01 +02:00
Henri Verbeet
e9fbb6b0fd
wined3d: Avoid LPCSTR.
2013-09-19 19:49:00 +02:00
Stefan Dösinger
2680f33015
wined3d: Check box dimensions in volume_map.
2013-09-18 15:47:00 +02:00
Stefan Dösinger
ac37f7a2ac
wined3d: Implement locking of block-based volume textures.
2013-09-18 15:46:56 +02:00
Stefan Dösinger
83b404879c
wined3d: Mapping a mapped volume is an error.
2013-09-18 15:46:49 +02:00
Stefan Dösinger
bbfca4863c
wined3d: Store the instance count in the context structure.
2013-09-16 13:06:03 +02:00
Stefan Dösinger
59e0b841c7
wined3d: Move device_preload_textures into context.c.
2013-09-16 13:06:01 +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
fc85f4f7d6
wined3d: Never set the first render target to the front buffer in wined3d_device_init_3d().
2013-09-13 10:57:00 +02:00
Henri Verbeet
3c023a5db5
wined3d: Just set the first render target to NULL in wined3d_device_reset().
2013-09-13 10:56:52 +02:00
Henri Verbeet
def0558b45
wined3d: Just set the first render target to NULL in wined3d_device_uninit_3d().
2013-09-13 10:56:49 +02:00
Stefan Dösinger
b8eb171b6b
wined3d: Explicitly pass the state information to buffer_internal_preload.
2013-09-12 17:48:20 +02:00
Stefan Dösinger
d8c43aabf7
wined3d: Move the decoded stream info into the context.
2013-09-12 17:48:14 +02:00
Stefan Dösinger
a0b56d9c59
wined3d: Pass stream info and needed fixups to buffer_find_decl.
2013-09-12 17:48:11 +02:00
Henri Verbeet
1a78667862
wined3d: Allow the first render target to be set to NULL.
...
Note that it still isn't necessarily safe to render in this case, because
there are places where we assume the first render target is always non-NULL in
order to determine e.g. framebuffer dimensions. It's now the responsibility of
the caller to ensure that doesn't happen.
2013-09-12 10:59:18 +02:00
Henri Verbeet
1b53cbd8de
wined3d: Make primary_render_target_is_p8() work on a swapchain.
2013-09-12 10:59:11 +02:00
Stefan Dösinger
b4d8b52fa7
wined3d: Pass position_transformed and gl_info to find_ps_compile_args.
2013-09-11 17:09:59 +02:00
Stefan Dösinger
dfeee9077c
wined3d: Pass the swizzle map to find_vs_compile_args.
2013-09-11 17:09:56 +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
Stefan Dösinger
cd203b38a6
wined3d: Pass the context to the main buffer preload function.
2013-09-09 22:10:01 +02:00
Stefan Dösinger
87f931dc64
wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_get_sysmem().
2013-09-09 22:10:00 +02:00
Stefan Dösinger
1cf192172e
wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_create_buffer_object().
2013-09-09 22:10:00 +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
59e2f52ff8
wined3d: Replace the "dirty" field in struct gl_texture with WINED3D_TEXTURE_ flags.
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
Stefan Dösinger
df5a0976e9
wined3d: Check the format block size before creating textures.
...
Sizes of textures and stand-alone surfaces must be multiples of the
format's block size for DXTN formats. Since we create a texture for
everything (except in ddraw), this check also takes care of stand-alone
surfaces.
2013-09-06 17:25:08 +02:00
Stefan Dösinger
80638b6d2f
wined3d: Enforce texturing capability format restrictions on resource creation.
2013-09-06 17:25:08 +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
137590be31
wined3d: Return 1 instead of 0 for max_vertex_blend_matrices in glsl_vertex_pipe_vp_get_caps().
...
It's not necessarily clear to me that one is better than the other here, but
this is what we returned in the old GL fixed function implementation of the
D3D fixed function vertex pipe, and apparently EverQuest depends on this.
This fixes a regression introduced by commit 2014141a25
.
2013-09-06 12:00:09 +02:00
Stefan Dösinger
b73464a413
wined3d: Use the ftoa helper function in the ARB shader backend.
...
This is the ARB equivalent to e0494afa00
.
2013-09-05 17:55:48 +02:00
Stefan Dösinger
37c4f3a88c
wined3d: Don't clamp texture lookups in the ARB fixed function fragment pipe.
2013-09-05 17:55:11 +02:00
Henri Verbeet
ad178a5b55
wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation.
2013-09-05 13:18:24 +02:00
Henri Verbeet
b28e9f6482
wined3d: Enforce WINED3DUSAGE_RENDERTARGET format restrictions on resource creation.
2013-09-05 13:18:23 +02:00
Henri Verbeet
6325f3ddd8
wined3d: Don't set WINED3DUSAGE_RENDERTARGET on the front buffer.
...
We never render directly to the front buffer, and in case of e.g. a P8 front
buffer, we would fail surface creation if we were to enforce format
restrictions.
2013-09-04 11:37:01 +02:00
Henri Verbeet
99092c2700
wined3d: Avoid a couple of useless glGetUniformLocationARB() calls.
2013-09-04 11:36:58 +02:00
Henri Verbeet
ff6ce4c669
wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations.
...
On typical hardware, the clamp() would be an instruction modifier, while the
max() would need an extra instruction.
2013-09-04 11:36:50 +02:00
Henri Verbeet
0d2d847914
wined3d: Don't clamp texture lookups in the GLSL fixed function fragment pipe.
2013-09-03 16:58:17 +02:00
Henri Verbeet
50e2ee73a4
wined3d: Rename wined3d_fake_gl_ctx to wined3d_caps_gl_ctx.
...
There's nothing particularly fake about the GL context.
2013-09-03 16:58:16 +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