Stefan Dösinger
2459d79b53
wined3d: Disable WINED3DFMT_S1_UINT_D15_UNORM and WINED3DFMT_S4X4_UINT_D24_UNORM.
2011-08-24 11:52:07 +02:00
Stefan Dösinger
5d1d07abcf
wined3d: Call glFlush after updating a buffer.
2011-08-24 11:52:06 +02:00
Henri Verbeet
7d46943067
wined3d: Make some parameters to get_glsl_program_entry() const.
2011-08-23 16:53:52 +02:00
Henri Verbeet
3b3470b151
wined3d: Make the shader parameter to shader_glsl_generate_vshader() const.
2011-08-23 16:53:52 +02:00
Henri Verbeet
f75675031f
wined3d: Make the shader parameter to shader_glsl_generate_pshader() const.
2011-08-23 16:53:52 +02:00
Henri Verbeet
9de5372036
wined3d: Introduce a function to update a swapchain's render_to_fbo field.
2011-08-23 16:53:51 +02:00
Henri Verbeet
7b19efd9d5
wined3d: Just call resource_unload() in updateSurfaceDesc().
...
Instead of trying to duplicate the functionality.
2011-08-23 16:53:51 +02:00
Henri Verbeet
b474225386
wined3d: Only delete the GL contexts after unloading resources in wined3d_device_reset().
...
The updateSurfaceDesc() calls potentially make GL calls.
2011-08-23 16:53:51 +02:00
Henri Verbeet
9df014b9de
wined3d: Rename WineD3D_ChoosePixelFormat() to context_choose_pixel_format().
2011-08-23 16:53:51 +02:00
Henri Verbeet
48911d7a1c
wined3d: Reject color blits on sysmem surfaces in ffp_blit_supported().
2011-08-23 16:53:51 +02:00
Henri Verbeet
f58e55ec6c
wined3d: Move arbfp based color blits from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt().
2011-08-23 16:53:51 +02:00
Henri Verbeet
c592d553f0
wined3d: Reject color blits on sysmem surfaces in arbfp_blit_supported().
2011-08-23 16:53:51 +02:00
Stefan Dösinger
0fc7cd5ad7
wined3d: Invalidate streamsrc, vdecl and indexbuffer after strided draws.
2011-08-22 19:49:39 +02:00
Michael Stefaniuc
42a6455ea5
wined3d: Sync a function prototype with its definition.
2011-08-22 19:49:39 +02:00
Chris Robinson
342d2b8979
wined3d: Don't use the old depth-stencil surface after decrementing its ref count.
2011-08-22 17:22:48 +02:00
Henri Verbeet
a04f0e9c78
wined3d: Move FBO based color blits from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt().
2011-08-22 16:14:37 +02:00
Henri Verbeet
d063ff55e7
wined3d: Move surface_color_fill() based color fills from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt().
2011-08-22 16:14:37 +02:00
Henri Verbeet
a887128ffd
wined3d: Reject color fills on sysmem surfaces in ffp_blit_supported().
2011-08-22 16:14:36 +02:00
Henri Verbeet
18434ddc57
wined3d: Directly call surface_cpu_blt() in cpu_blit_color_fill().
...
And avoid a potential infinite recursion if wined3d_surface_blt() ends up
calling cpu_blit_color_fill().
2011-08-22 16:14:36 +02:00
Henri Verbeet
26484c9200
wined3d: Allow color fills on FBO attachable surfaces in ffp_blit_supported().
2011-08-22 16:14:36 +02:00
Henri Verbeet
e1ab5f6e6b
wined3d: Don't allow blits with an invalid destination rectangle when a clipper is set either.
...
Clippers don't really work. Previously we mostly didn't run into this because
the rectangle was already rejected by ddraw_surface7_Blt(), although
ddraw_surface7_BltFast() might have been affected in a couple of cases. We
should of course implement clippers, but until that happens, completely
rejecting the blit is better than introducing memory corruption.
This fixes a regression introduced by commit
92e616f355
.
2011-08-22 16:14:36 +02:00
Henri Verbeet
f8ce77a598
wined3d: Draw buffers are per-framebuffer state.
2011-08-22 16:14:36 +02:00
Henri Verbeet
34b2956e23
wined3d: Merge FindContext() into context_acquire().
...
This actually fixes a bug. A context's current_rt field may get set to NULL if
that surface gets destroyed or unloaded. In general, the next time that
context is acquired, context_setup_target() will then set everything up again.
However, if a context_acquire() call with a NULL target ends up returning such
a context, context_setup_target() never sets the current_rt field because the
target FindContext() chooses never gets propagated to context_acquire(). This
patch ensures context_setup_target() is never called with a NULL target.
2011-08-22 16:14:36 +02:00
Henri Verbeet
56428c6386
wined3d: Reuse convert_a8r8g8b8_x8r8g8b8() for B8G8R8X8 -> B8G8R8A8 conversions.
2011-08-22 16:14:36 +02:00
Henri Verbeet
156d24c634
wined3d: Add compressed surface support to surface_cpu_blt().
2011-08-22 16:14:36 +02:00
William Pettersson
0e043819f4
wined3d: Add support for Nvidia GTX 550/560 Ti.
2011-08-05 16:43:24 +02:00
Henri Verbeet
812a314821
wined3d: Get rid of the fglrx point sprite hack.
...
Fglrx 9.3 is well over 2 years old at this point. I'd strongly encourage
anyone still affected by this to upgrade to the r300g driver.
2011-08-05 09:17:59 +02:00
Henri Verbeet
293bf961ed
wined3d: Pass a non-NULL rectangle to surface_color_fill() in wined3d_device_clear_rendertarget_view().
2011-08-05 09:17:51 +02:00
Henri Verbeet
7e8e7ecebb
wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill().
2011-08-05 09:17:47 +02:00
Henri Verbeet
a84275075d
wined3d: Implement wined3d_surface_bltfast() on top of wined3d_surface_blt().
2011-08-05 09:17:39 +02:00
Henri Verbeet
662de19ad3
wined3d: Move some flags handling from surface_cpu_blt() to wined3d_surface_blt().
2011-08-04 09:04:49 +02:00
Henri Verbeet
7e3ecd683c
wined3d: Move rectangle validation from surface_cpu_blt() to wined3d_surface_blt().
...
This fixes some tests because these were getting skipped for the BltOverride() path.
2011-08-04 09:04:39 +02:00
Henri Verbeet
b166cb29f8
wined3d: Remove src_rect and dst_rect NULL checks from surface_cpu_blt().
2011-08-04 09:04:25 +02:00
Henri Verbeet
e74d1358ac
wined3d: Remove the unused blit_op parameter to arbfp_blit_surface().
2011-08-04 09:04:20 +02:00
Frédéric Delanoy
7e309601f3
dlls: Assorted spelling fixes.
2011-08-03 14:15:50 +02:00
Henri Verbeet
41cff1618c
wined3d: Merge wined3d_surface_blt(), surface_blt() and gdi_surface_blt().
2011-08-03 09:23:30 +02:00
Henri Verbeet
c12627562b
wined3d: Go to the fallbacks for cross-swapchain blits.
2011-08-03 09:23:20 +02:00
Henri Verbeet
111e8fe77c
wined3d: Add WINED3DFMT_P8_UINT support to wined3d_format_convert_from_float().
2011-08-03 09:23:16 +02:00
Henri Verbeet
cf1c641cbb
wined3d: Fix switching color keying on / off.
2011-08-03 09:23:12 +02:00
Henri Verbeet
e4efcea223
wined3d: Set the read buffer to GL_NONE in surface_load_ds_location().
...
On GL implementations that don't support GL_ARB_ES2_compatibility the
framebuffer's read buffer has to be valid, even if we're not reading from it.
2011-08-03 09:23:08 +02:00
Henri Verbeet
98650e841e
wined3d: Go to the fallbacks if D3D is not initialized in surface_blt().
...
Even though this is the "OpenGL" surface implementation, this can still happen
in e.g. ddraw if no swapchain is created yet. That's something we should fix,
but not today.
2011-08-02 11:40:20 +02:00
Henri Verbeet
7539cc8faa
wined3d: Go straight to the fallbacks for complex blits in surface_blt().
...
At the moment this is only marginally useful, since it just avoids silly
things like color keyed depth fills that are probably invalid anyway. However,
the idea is to gradually move normal color fill and blit handling out of
IWineD3DSurfaceImpl_BltOverride() and surface_cpu_blt(), and eventually make
those functions go away completely.
2011-08-02 11:40:16 +02:00
Henri Verbeet
4bdd4ef45b
wined3d: Check for locked surfaces in wined3d_surface_blt().
2011-08-02 11:40:11 +02:00
Henri Verbeet
50d883c37e
wined3d: IWineD3DSurfaceImpl_BltOverride() is always passed valid source and destination rectangles.
...
So no need to call surface_get_rect() anymore.
2011-08-02 11:40:07 +02:00
Henri Verbeet
ace241ad59
wined3d: Resolve source and destination rectangles in wined3d_surface_blt().
2011-08-02 11:40:01 +02:00
Henri Verbeet
33fafc6166
wined3d: Get rid of context_bind_fbo() calls outside context.c.
2011-08-01 11:16:12 +02:00
Henri Verbeet
dcc969c32c
wined3d: Get rid of dst_fbo.
...
As a result we can get rid of a couple of other things as well.
2011-08-01 11:16:08 +02:00
Henri Verbeet
ccb3a51a44
wined3d: Just invalidate STATE_FRAMEBUFFER in surface_load_ds_location().
2011-08-01 11:16:03 +02:00
Henri Verbeet
4428bda4a1
wined3d: Apply clear state after depth / stencil setup in device_clear_render_targets().
2011-08-01 11:15:59 +02:00
Henri Verbeet
03eb6a4aa6
wined3d: Apply draw state after depth / stencil setup in drawPrimitive().
2011-08-01 11:15:55 +02:00
Henri Verbeet
64f71fda6d
wined3d: Complain about users disabling GLSL.
2011-07-29 12:11:01 +02:00
Henri Verbeet
2256a7e804
wined3d: wined3d_device_evict_managed_resources() doesn't need a return value.
2011-07-29 12:09:39 +02:00
Henri Verbeet
3d7c596cdc
wined3d: Don't hide GL function pointer typedefs behind extension defines.
...
These are specific to wined3d.
2011-07-29 12:09:26 +02:00
Henri Verbeet
7bc0032878
wined3d: Recognize some more AMD cards.
2011-07-29 12:09:22 +02:00
Henri Verbeet
b06e32184b
wined3d: Only invalidate state for the current context in wined3d_buffer_unmap().
2011-07-29 12:09:17 +02:00
Stefan Dösinger
41f9ca2abf
wined3d: Restore the call to context_validate_onscreen_formats.
...
This got lost accidentally in d321959dd7
.
2011-07-28 11:29:52 +02:00
Henri Verbeet
487cc9729b
wined3d: Only invalidate state for the current context in wined3d_buffer_map().
2011-07-28 11:29:27 +02:00
Henri Verbeet
cc2dc5b0c8
wined3d: Only invalidate state for the current context in wined3d_device_set_cursor_properties().
2011-07-28 11:29:24 +02:00
Henri Verbeet
a1ba5b5131
wined3d: Only invalidate state for the current context in device_clear_render_targets().
2011-07-28 11:29:21 +02:00
Henri Verbeet
7e3f85cab6
wined3d: Only invalidate state for the current context in tesselate_rectpatch().
2011-07-28 11:29:18 +02:00
Henri Verbeet
2bf020e26f
wined3d: Only invalidate state for the current context in surface_blt_fbo().
2011-07-28 11:29:14 +02:00
Henri Verbeet
51c0f2a787
wined3d: Only invalidate state for the current context in wined3d_surface_depth_blt_fbo().
2011-07-27 11:51:53 +02:00
Henri Verbeet
c2ede1d4c8
wined3d: Only invalidate state for the current context in swapchain_blit().
2011-07-27 11:51:50 +02:00
Henri Verbeet
68d692f49c
wined3d: Get rid of the redundant state_table parameter to context_invalidate_state().
2011-07-27 11:51:46 +02:00
Henri Verbeet
26cd7b835d
wined3d: Get rid of the use_vshader parameter to device_stream_info_from_declaration().
2011-07-27 11:51:41 +02:00
Henri Verbeet
bd1429e248
wined3d: Introduce a "state" variable in device_stream_info_from_declaration().
2011-07-27 11:51:34 +02:00
Henri Verbeet
1195530795
wined3d: Release the onscreen depth / stencil reference on reset.
...
No need to save the contents, after a reset it's all undefined anyway.
2011-07-25 21:25:24 +02:00
Henri Verbeet
27b20bac43
wined3d: Unbind all textures in wined3d_device_reset().
2011-07-25 21:25:19 +02:00
Henri Verbeet
44e109debe
wined3d: Unbind resources inside wined3d_device_reset().
2011-07-25 21:25:15 +02:00
Henri Verbeet
c84112f86f
wined3d: Get rid of wined3d_device_enum_resources().
2011-07-25 21:25:11 +02:00
Henri Verbeet
0739cae273
wined3d: Pass "reset_enum_callback" directly to wined3d_device_reset().
...
It would have been nice if we could do all of this inside wined3d, but we need
to determine what resources are in use by d3d8/d3d9, not wined3d. This is
mostly an issue for "implicit" resources like swapchain render targets and the
depth / stencil surface. The fact that we're having this problem probably
means we're doing it wrong. Since these implicit resources should only be
referenced by wined3d, we could probably just destroy and recreate the
swapchain, instead of the little updateSurfaceDesc() dance we currently do.
2011-07-25 21:25:01 +02:00
Henri Verbeet
b09b7e323c
wined3d: Store a pointer to the state table in the context.
2011-07-25 11:59:15 +02:00
Henri Verbeet
68b9071329
wined3d: Make the shader and ctx_priv parameters to shader_generate_glsl_declarations() const.
2011-07-25 11:59:11 +02:00
Henri Verbeet
6a046eddd7
wined3d: Get rid of the vpos_uniform field from the wined3d_pixel_shader structure.
2011-07-25 11:59:07 +02:00
Henri Verbeet
43d2515da5
wined3d: Use the "rts" variable in context_apply_clear_state().
2011-07-25 11:59:04 +02:00
Henri Verbeet
e5036e365e
wined3d: Use gl_info from the context in context_apply_clear_state().
2011-07-25 11:58:59 +02:00
Henri Verbeet
dbcbf0c45b
wined3d: Make the heap parameter to update_heap_entry() const.
2011-07-22 12:57:20 +02:00
Henri Verbeet
959874c2d8
wined3d: Make the tex_unit_map parameter to shader_glsl_load_vsamplers() const.
2011-07-22 12:57:19 +02:00
Henri Verbeet
86dd8476db
wined3d: Make the tex_unit_map parameter to shader_glsl_load_psamplers() const.
2011-07-22 12:57:19 +02:00
Stefan Dösinger
f99a2748e4
wined3d: Don't apply and invalidate the framebuffer when clearing the device's fb.
2011-07-20 19:23:05 +02:00
Henri Verbeet
6ffd066834
wined3d: Make the query parameter to wined3d_event_query_finish() const.
2011-07-19 14:06:05 +02:00
Henri Verbeet
2e636aae29
wined3d: Make the query parameter to wined3d_event_query_test() const.
2011-07-19 14:06:03 +02:00
Henri Verbeet
c6c76f5a1a
wined3d: Make the priv parameter to map_register() const.
2011-07-19 14:06:01 +02:00
Henri Verbeet
c5f8a33a86
wined3d: Make the surface parameter to ffp_blit_p8_upload_palette() const.
2011-07-19 14:05:59 +02:00
Henri Verbeet
437cec1a49
wined3d: Make the surface parameter to surface_depth_blt() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
a97ed53460
wined3d: Make the surface parameter to surface_convert_color_to_float() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
d314aa2d6e
wined3d: Make the surface parameter to surface_convert_depth_to_float() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
416a55c7aa
wined3d: Make the surface parameter to surface_is_full_rect() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
db12216301
wined3d: Make the surface parameter to surface_get_rect() const.
2011-07-18 16:23:29 +02:00
Henri Verbeet
2b789778fd
wined3d: Make the swapchain parameter to swapchain_blit() const.
2011-07-15 10:08:21 +02:00
Henri Verbeet
2e14d9ac0e
wined3d: Make the texture parameter to texture_srgb_mode() const.
2011-07-15 10:08:18 +02:00
Henri Verbeet
dd2f2c40f0
wined3d: Get rid of the useext macro.
...
This does nothing, since we have our own GL header.
2011-07-15 10:08:14 +02:00
Henri Verbeet
7ee4bda63e
wined3d: Add stream offsets in device_stream_info_from_declaration().
...
They're not going to change until the next time the stream info is updated.
This would of course mainly be useful if we managed to do more than one or two
draws with the same stream info.
2011-07-15 10:08:02 +02:00
Henri Verbeet
cf421e1b3f
wined3d: Don't set GL_MAP_UNSYNCHRONIZED_BIT for WINED3D_BUFFER_DISCARD maps.
...
WINED3D_BUFFER_DISCARD means the (current) buffer contents are undefined for
subsequent operations. I.e., the map doesn't have to wait for any pending
operations to finish, and can just return a new buffer with undefined
contents. GL_MAP_UNSYNCHRONIZED_BIT means the driver doesn't wait for previous
operations to finish, and just maps a buffer that's potentially in use. Proper
synchronization is left to the application. Note that we set both
GL_MAP_INVALIDATE_BUFFER_BIT and GL_MAP_UNSYNCHRONIZED_BIT.
GL_MAP_INVALIDATE_BUFFER_BIT corresponds to WINED3D_BUFFER_DISCARD, and might
cause the driver to return a new buffer, but it's not required to make that
optimization.
2011-07-15 10:07:41 +02:00
Henri Verbeet
e4d2d78500
wined3d: Pass a wined3d_state pointer to state handlers.
...
Instead of an entire stateblock. This is mainly useful is we ever want to call
state handlers on state not stored in a stateblock.
2011-07-14 14:11:25 +02:00
Henri Verbeet
9375a87c86
wined3d: Make the context and device parameters to find_draw_buffers_mask() const.
2011-07-14 14:11:21 +02:00
Henri Verbeet
565fcbdfb8
wined3d: Get rid of the clip status code.
...
I'm pretty sure this is just broken, and I'm not aware of any application
using this.
2011-07-14 14:11:18 +02:00
Henri Verbeet
5e83efa1b2
wined3d: Remove the unused untransformed field from struct wined3d_device.
2011-07-14 14:11:11 +02:00
Henri Verbeet
fcf4303e1a
wined3d: Store a pointer to the framebuffer state in struct wined3d_state.
2011-07-14 14:11:07 +02:00
Henri Verbeet
475225c275
wined3d: Pass a state pointer instead of a stateblock to loadVertexData().
2011-07-13 11:52:04 +02:00
Henri Verbeet
534151a79b
wined3d: Pass a state pointer instead of a stateblock to loadTexCoords().
2011-07-13 11:51:58 +02:00
Henri Verbeet
3d28cdb691
wined3d: Pass a state pointer instead of a stateblock to loadNumberedArrays().
2011-07-13 11:51:55 +02:00
Henri Verbeet
b2d32a4966
wined3d: Make the volume parameter to volume_load() const.
2011-07-13 11:51:52 +02:00
Henri Verbeet
1791a5afd5
wined3d: Make the volume parameter to volume_bind_and_dirtify() const.
2011-07-13 11:51:49 +02:00
Henri Verbeet
d67d7ebbcb
wined3d: Make the shader parameter to shader_generate_main() const.
2011-07-12 11:35:12 +02:00
Henri Verbeet
48881c0792
wined3d: Make the shader parameter to vshader_get_input() const.
2011-07-12 11:35:08 +02:00
Henri Verbeet
a86785d065
wined3d: Make the swapchain parameter to x11_copy_to_screen() const.
2011-07-12 11:35:05 +02:00
Henri Verbeet
d1b650e959
wined3d: Explicitly pass gl_info to gen_arbfp_ffp_shader().
2011-07-12 11:34:58 +02:00
Henri Verbeet
1f6f94675e
wined3d: Only use state contained in the ffp_frag_settings structure in gen_arbfp_ffp_shader().
...
Note that the actual check looks off by one too.
2011-07-12 11:34:55 +02:00
Henri Verbeet
c5d457c8b4
wined3d: Store a struct wined3d_bo_address in struct wined3d_stream_info_element.
...
Instead of using separate fields for the buffer object and offset.
2011-07-11 11:53:42 +02:00
Henri Verbeet
89bf30a25e
wined3d: Return data as struct wined3d_bo_address in buffer_get_memory().
2011-07-11 11:53:39 +02:00
Henri Verbeet
a3538a1546
wined3d: Store VBO addresses in a struct wined3d_bo_address in device_stream_info_from_declaration().
2011-07-11 11:53:35 +02:00
Henri Verbeet
abfd6b479a
wined3d: Make the surface parameter to d3dfmt_p8_init_palette() const.
2011-07-11 11:53:32 +02:00
Henri Verbeet
3e9930f307
wined3d: Make the device parameter to primary_render_target_is_p8() const.
2011-07-11 11:53:28 +02:00
Ričardas Barkauskas
6c5e109af7
wined3d: Introduce quirk for proper RGBA16 support.
2011-07-09 11:48:15 +02:00
Henri Verbeet
a26c5f9b13
wined3d: Make the surface parameter to d3dfmt_get_conv() const.
2011-07-08 11:25:31 +02:00
Henri Verbeet
aa55404682
wined3d: Make the src_surface parameter to draw_textured_quad() const.
2011-07-08 11:25:28 +02:00
Henri Verbeet
0d18f5df0e
wined3d: Make the surface parameter to surface_upload_data() const.
2011-07-08 11:25:25 +02:00
Henri Verbeet
faebcc0236
wined3d: Make the surface parameter to surface_translate_drawable_coords() const.
2011-07-08 11:25:21 +02:00
Henri Verbeet
bb4b86f365
wined3d: Make the rt parameter to surface_set_compatible_renderbuffer() const.
2011-07-08 11:25:17 +02:00
Henri Verbeet
640234c504
wined3d: Rename "flag" to "location" in surface_modify_location().
2011-07-07 12:31:46 +02:00
Henri Verbeet
67724d9f70
wined3d: Make the surface parameter to surface_get_texture_name() const.
2011-07-07 12:31:42 +02:00
Henri Verbeet
bec379e411
wined3d: Make the current_renderbuffer field in struct wined3d_surface const.
2011-07-07 12:31:38 +02:00
Henri Verbeet
4671f86cd6
wined3d: Make the context parameter to the get_drawable_size() callback const.
2011-07-07 12:31:34 +02:00
Henri Verbeet
0a5b56083d
wined3d: Make the device parameter to device_preload_textures() const.
2011-07-07 12:31:30 +02:00
Matteo Bruni
9d3cc8b012
wined3d: Make dummy textures black.
2011-07-06 19:38:46 +02:00
Henri Verbeet
c0aa053a87
wined3d: Pass a state pointer instead of a device pointer to device_get_draw_rect().
2011-07-06 11:14:38 +02:00
Henri Verbeet
a7120866be
wined3d: Remove the unused currentPatch field from struct wined3d_device.
2011-07-06 11:14:33 +02:00
Henri Verbeet
0df3db37ac
wined3d: Explicitly pass device and state to gen_ffp_frag_op().
2011-07-06 11:14:29 +02:00
Henri Verbeet
3ccf12a77c
wined3d: Rename "flag" to "location" in surface_load_location().
...
This makes much more sense.
2011-07-06 11:14:20 +02:00
Henri Verbeet
590505c0a4
wined3d: Make context_create() work if the window is already destroyed.
2011-07-06 11:14:16 +02:00
Piotr Pawlow
f6600263c1
wined3d: Delete cursor texture on device reset.
2011-07-05 19:27:53 +02:00
Stefan Dösinger
718c614937
wined3d: Pass a struct wined3d_fb_state * to context_apply_clear_state.
2011-07-05 17:33:56 +02:00
Stefan Dösinger
053071e343
wined3d: Pass a struct wined3d_fb_state to device_clear_render_targets.
2011-07-05 17:33:51 +02:00
Stefan Dösinger
cd96c59d91
wined3d: Track framebuffer changes.
2011-07-05 17:33:43 +02:00
Stefan Dösinger
d321959dd7
wined3d: Move FBO application into a state handler.
2011-07-05 17:33:35 +02:00
Stefan Dösinger
1aa85c96a9
wined3d: Rename the rt mask generation functions.
2011-07-05 17:33:22 +02:00
Henri Verbeet
4e8c7f00f2
wined3d: Print an ERR for unknown / invalid surface locations in surface_load_location().
2011-07-05 13:46:24 +02:00
Henri Verbeet
1c3b691f10
wined3d: Introduce a separate function for loading the SFLAG_INTEXTURE and SFLAG_INSRGBTEX surface locations.
2011-07-05 13:46:20 +02:00
Henri Verbeet
cabcb362c1
wined3d: Introduce a separate function for loading the SFLAG_INDRAWABLE surface location.
2011-07-05 13:46:15 +02:00
Henri Verbeet
aacd8f8b93
wined3d: Introduce a separate function for loading the SFLAG_INSYSMEM surface location.
2011-07-05 13:46:11 +02:00
Henri Verbeet
ddc29c40e6
wined3d: Make D3DRS_ZBIAS work.
...
D3DRS_ZBIAS is poorly defined, but it makes sense that the bias should be
format independent. Looking at application behaviour, it seems to include a
slope scale factor as well. This fixes a couple of regressions introduced by
96b758f7b3
, although it was broken before as
well, just in a different way.
2011-07-05 13:46:07 +02:00
André Hentschel
a7c1b5f02e
wined3d: Remove dead code (clang).
2011-07-04 19:06:51 +02:00
Henri Verbeet
5d6f29818f
wined3d: Get rid of the GL_SupportedExt typedef.
2011-07-04 13:44:52 +02:00
Henri Verbeet
82d74d563a
wined3d: Get rid of the tex_op_args typedef.
2011-07-04 13:44:47 +02:00
Henri Verbeet
b1664a2c85
wined3d: Get rid of some IWineD3D* references.
2011-07-04 13:44:41 +02:00
Henri Verbeet
0c716b77e5
wined3d: Move some enums to directx.c.
2011-07-04 13:44:29 +02:00
Henri Verbeet
8f6ae4ba38
wined3d: Get rid of some macros.
2011-07-04 13:44:25 +02:00
Henri Verbeet
c20b23eb00
wined3d: Make the surface parameter to context_surface_update() const.
2011-07-01 14:39:35 +02:00
Henri Verbeet
2257a70e37
wined3d: Make the device parameter to context_resource_unloaded() const.
2011-07-01 14:39:35 +02:00
Henri Verbeet
6894d8022a
wined3d: Make the device parameter to context_resource_released() const.
2011-07-01 14:39:35 +02:00
Henri Verbeet
53b99dde14
wined3d: Make the device and surface parameters to context_enum_surface_fbo_entries() const.
2011-07-01 14:39:35 +02:00
Henri Verbeet
b3b1d20562
wined3d: Make the context parameter to context_check_fbo_status() const.
2011-07-01 14:39:35 +02:00
Henri Verbeet
a8de1272da
wined3d: Make the context parameter to context_attach_depth_stencil_fbo() const.
2011-06-29 10:08:44 -05:00
Henri Verbeet
0bae611bf5
wined3d: Make the context parameter to context_create_fbo_entry() const.
2011-06-29 10:08:39 -05:00
Henri Verbeet
12be5afd92
wined3d: Get rid of the glsl_sample_function_t typedef.
2011-06-29 10:08:34 -05:00
Henri Verbeet
8fa44dd76d
wined3d: Get rid of the glsl_src_param_t typedef.
2011-06-29 10:08:28 -05:00
Henri Verbeet
3f62b618c4
wined3d: Get rid of the glsl_dst_param_t typedef.
2011-06-29 10:08:19 -05:00
Stefan Dösinger
a27adc478a
wined3d: Update the vertex shader when the clipplanes are changed.
2011-06-28 11:57:51 -05:00
Henri Verbeet
ebcf08e59a
wined3d: Properly destroy contexts not owned by the implcit swapchain.
...
In particular, set num_contexts to 0 in the swapchain that owns the contexts.
2011-06-28 10:18:37 -05:00
Henri Verbeet
560d5188b7
wined3d: Make the rts and ds parameters to context_validate_rt_config() const.
2011-06-28 10:18:30 -05:00
Henri Verbeet
64bf19d07b
wined3d: Make the generate_rt_mask_no_fbo() parameters const.
2011-06-28 10:18:26 -05:00
Henri Verbeet
b9721600dc
wined3d: Make the target parameter to generate_rt_mask_from_surface() const.
2011-06-28 10:18:20 -05:00
Henri Verbeet
4725d4bb99
wined3d: Make the depth_stencil parameter to context_validate_onscreen_formats() const.
2011-06-28 10:18:15 -05:00
Stefan Dösinger
5e97e22951
wined3d: Separate stream sources and vertex declaration.
...
Changing the stream sources does not require a reapplication of the
vertex declaration. Even setting a NULL vertex buffer doesn't make
attributes disappear - it just causes a segfault on Windows.
2011-06-27 16:43:24 -05:00
Stefan Dösinger
9ed6dc9144
wined3d: Don't set FBO attachment filtering to GL_NEAREST.
...
The min and mag filters should not have any effect when rendering to
textures. This code was once needed to work around a bug in the Nvidia
driver. Changing the texture filter states is expensive and makes it
harder to apply the FBO state only when needed.
2011-06-27 16:43:08 -05:00
Stefan Dösinger
1bc01f8f87
wined3d: Get rid of the has_signature_idx field in the ARB ps private data.
2011-06-24 11:58:11 -05:00
Stefan Dösinger
3a3b482864
wined3d: Fix a typo in compare_sig in the arb backend.
2011-06-24 11:58:04 -05:00
Henri Verbeet
c461d312ba
wined3d: Request per-surface palettes in the client libs.
2011-06-24 08:49:48 -05:00
Henri Verbeet
b296f181dd
wined3d: Explicitly set surface alignment in the client libs.
...
Instead of using dxVersion.
2011-06-24 08:49:42 -05:00
Henri Verbeet
fd8dbf0847
wined3d: Make the surface parameter to surface_get_gl_buffer() const.
2011-06-24 08:49:34 -05:00
Henri Verbeet
0ce282edf7
wined3d: Make the surface parameter to surface_is_offscreen() const.
2011-06-24 08:49:28 -05:00
Henri Verbeet
c3c131ab34
wined3d: Only invalidate STATE_STREAMSRC for bound buffers.
2011-06-23 09:47:35 +02:00
Henri Verbeet
c4da128b8f
wined3d: Make the device and target parameters to FindContext() const.
2011-06-23 09:47:34 +02:00
Henri Verbeet
5a26da1d19
wined3d: Make the wined3d_shader_context shader pointer const.
2011-06-23 09:47:34 +02:00
Henri Verbeet
330ffc83f2
d3d8: Implement IDirect3DVolume8 private data handling on top of wined3d_resource.
2011-06-23 09:47:34 +02:00
Matteo Bruni
32787ec0dd
wined3d: Fix draw buffers tracking.
2011-06-22 15:21:43 +02:00
Matteo Bruni
0919ac3b51
wined3d: Fix context_apply_draw_buffers() with backbuffer ORM.
2011-06-22 15:21:36 +02:00
Matteo Bruni
5b67bd4fb2
wined3d: Fix context_apply_blit_state().
2011-06-22 15:21:27 +02:00
Henri Verbeet
42db8e2bfa
wined3d: Make the context parameter to isStateDirty() const.
2011-06-22 11:25:39 +02:00
Henri Verbeet
14bc0e9ef2
wined3d: Invalidate STATE_STREAMSRC when dropping VBOs.
2011-06-22 11:25:34 +02:00
Henri Verbeet
acd8c58725
ddraw: Implement surface private data handling on top of wined3d_resource.
2011-06-22 11:25:27 +02:00
Piotr Pawlow
b5e04640cc
wined3d: Use a separate mutex for wndproc_table access.
...
If CreateDevice is called with hFocusWindow belonging to another thread,
then any code that does SendMessage (or equivalent) to the window while
holding the main wined3d mutex causes a deadlock, because wined3d_wndproc
tries to acquire the same mutex for wndproc_table access.
2011-06-21 16:18:56 +02:00
Henri Verbeet
4582a0bcb3
wined3d: Make the device parameter to device_invalidate_state() const.
2011-06-21 11:25:18 +02:00
Henri Verbeet
233b8e1cf8
wined3d: Fix the STATE_BASEVERTEXINDEX state entry.
2011-06-21 11:25:15 +02:00
Henri Verbeet
265e62378f
wined3d: Validate STATE_BASEVERTEXINDEX in validate_state_table().
2011-06-21 11:25:13 +02:00
Henri Verbeet
430bac5fad
wined3d: Only bother checking block alignment for compressed surfaces in wined3d_device_update_surface().
2011-06-21 11:25:09 +02:00
Henri Verbeet
17eb3e2c74
wined3d: Initialize format block info with sane values for uncompressed formats.
2011-06-21 11:25:06 +02:00
Stefan Dösinger
73cec67c14
wined3d: Link STATE_BASEVERTEXINDEX to STATE_VDECL.
2011-06-20 19:32:02 +02:00
Stefan Dösinger
2daa16c96c
wined3d: Use base_vertex_index in drawStridedSlow, and only for indexed draws.
2011-06-20 19:32:02 +02:00
Henri Verbeet
792060d67f
d3d8: Implement IDirect3DVolumeTexture8 private data handling on top of wined3d_resource.
2011-06-20 11:28:40 +02:00
Henri Verbeet
732338ab35
d3d9: Implement IDirect3DCubeTexture9 private data handling on top of wined3d_resource.
2011-06-20 11:28:22 +02:00
Stefan Dösinger
68b15bc5ff
wined3d: Give GL_ARB_map_buffer_range another try.
...
Nvidia's 270.xx.yy driver series fix the glMapBuffer alignment issues that caused major
performance problems. If the user is using an older driver we now drop the VBO instead of using
doublebuffered loading, which means that we fall back to the current behavior(no dynamic VBO) as
needed. Dynamic VBOs are needed on Nvidia drivers for GL_ARB_instanced_arrays.
2011-06-17 15:37:45 +02:00
Stefan Dösinger
12140b5158
wined3d: Drop the VBO when the GL alignment doesn't fit on dynamic buffers.
2011-06-17 15:37:41 +02:00
Stefan Dösinger
19a1b74252
wined3d: Add STATE_BASEVERTEXINDEX to debug_d3dstate.
2011-06-17 15:37:31 +02:00
Henri Verbeet
37d70103a1
d3d8: Implement IDirect3DIndexBuffer8 private data handling on top of wined3d_resource.
2011-06-17 11:02:43 +02:00
Henri Verbeet
469eba24c0
d3d9: Implement IDirect3DVertexBuffer9 private data handling on top of wined3d_resource.
2011-06-17 11:02:28 +02:00
Henri Verbeet
45a0e95962
wined3d: Only load the surface for partial updates in wined3d_device_update_surface().
2011-06-17 11:02:21 +02:00
Henri Verbeet
3a1d151561
wined3d: Use surface_load_location() instead of surface_internal_preload() in wined3d_device_update_surface().
2011-06-17 11:02:18 +02:00
Henri Verbeet
26eb6c8eea
wined3d: Check the correct debug class in checkGLcall.
2011-06-16 11:16:41 +02:00