Commit Graph

4464 Commits (301433b67034983313268022319d4ef4d36a0125)

Author SHA1 Message Date
Henri Verbeet 6e09d7bd60 wined3d: Cleanup device_resource_released().
In particular, releasing a resource that's in use by the device or the
stateblock is always an internal error in either wined3d or the relevant
wined3d client library.
2010-08-18 09:41:32 +02:00
Henri Verbeet 35b9d3dbd8 wined3d: Release the previous render target only after replacing it in IWineD3DDeviceImpl_SetRenderTarget(). 2010-08-18 09:41:26 +02:00
Henri Verbeet 125321d13c wined3d: Don't print format IDs in decimal.
This is especially silly for FOURCC formats.
2010-08-18 09:41:07 +02:00
Henri Verbeet f06b22a537 wined3d: Add a TRACE to IWineD3DSurfaceImpl_LoadTexture(). 2010-08-18 09:39:42 +02:00
Henri Verbeet 368e5eb87a wined3d: Avoid IWineD3DSurface_GetContainer(). 2010-08-17 11:55:32 +02:00
Henri Verbeet 8292c687d8 wined3d: Get rid of the now redundant SFLAG_SWAPCHAIN surface flag. 2010-08-17 11:55:32 +02:00
Henri Verbeet 0b24db5db5 wined3d: Also store the subresource container type. 2010-08-17 11:55:32 +02:00
Henri Verbeet b0fb388edb wined3d: A volume's container is always a volume texture. 2010-08-17 11:55:32 +02:00
Henri Verbeet 61db577a4b wined3d: Remove SetContainer() from the public IWineD3DSurface interface. 2010-08-17 11:55:32 +02:00
Henri Verbeet 89e6a60732 wined3d: Remove SetContainer() from the public IWineD3DVolume interface. 2010-08-17 11:55:32 +02:00
Matteo Bruni b6637eb89f wined3d: Remove isInDraw hack from context_setup_target.
It is conceptually wrong and actually broken too (as the comment there
said). Just remove the hack now and properly fix any regression that
may come up later by explicitely acquiring the right context where
needed (so, in surface_internal_preload and its callees).
2010-08-16 17:28:58 +02:00
Matteo Bruni c1450356a7 wined3d: Fix context_apply_clear_state with ORM = backbuffer. 2010-08-16 17:28:58 +02:00
Matteo Bruni e0528084b1 wined3d: Call set_render_offscreen at the end of context_setup_target.
This fixes a regression caused by 20f51c29a9.
2010-08-16 17:28:57 +02:00
Henri Verbeet a16cf58494 wined3d: Fix a couple of typos. 2010-08-16 13:47:53 +02:00
Henri Verbeet b20df2a24c wined3d: Round up to complete compressed blocks in IWineD3DDeviceImpl_UpdateSurface().
This is mostly an issue for surfaces with dimensions smaller than their
format's block width/height.
2010-08-16 13:47:49 +02:00
Henri Verbeet d494dfb6c0 wined3d: Rename surface_calculate_size() to wined3d_format_calculate_size(). 2010-08-16 13:47:42 +02:00
Henri Verbeet 6a9476b609 wined3d: Correctly calculate the resource size for ATI2N surfaces. 2010-08-16 13:47:37 +02:00
Henri Verbeet 3a36013065 wined3d: Print the correct resource location in surface_set_texture_name(). 2010-08-16 13:47:33 +02:00
Henri Verbeet 81603f18d8 wined3d: Cleanup IWineD3DBaseSwapChainImpl_GetBackBuffer() a bit. 2010-08-16 13:47:28 +02:00
Henri Verbeet e1188b0c8e wined3d: Fix some misspellings of "surface". 2010-08-16 13:47:17 +02:00
Henri Verbeet 5f2fcfdd6b wined3d: Reattach FBO attachments when any of the corresponding surfaces is unloaded. 2010-08-16 13:47:08 +02:00
Henri Verbeet 37c8632811 wined3d: Make some lookup tables const. 2010-08-04 13:24:24 +02:00
Henri Verbeet 2b88b2d351 wined3d: Only try to acquire a context in surface_cleanup() if there are GL resources to be destroyed.
The reason we're in surface_cleanup() might for example be that context
creation failed.
2010-08-04 13:24:21 +02:00
Henri Verbeet 43a86d1e56 wined3d: Cleanup Get/SetDepthStencilSurface(). 2010-08-04 13:24:17 +02:00
Henri Verbeet 009cd78fa4 wined3d: Cleanup Get/SetRenderTarget(). 2010-08-04 13:24:14 +02:00
Henri Verbeet 6e30387f81 wined3d: Replace color_fill_fbo() with device_clear_render_targets(). 2010-08-04 13:24:07 +02:00
Henri Verbeet 6cb38b9c93 wined3d: Allow filtering and blending with WINED3DFMT_ATI2N. 2010-08-03 11:06:51 +02:00
Henri Verbeet 88ff3f406d wined3d: Always set the get_drawable_size() surface function. 2010-08-03 11:06:47 +02:00
Henri Verbeet b2e1e1fd71 wined3d: Pass the color as floating point values to device_clear_render_targets(). 2010-08-03 11:06:42 +02:00
Henri Verbeet 6e68dd52c4 wined3d: Use the correct divider for 15-bit depth formats in IWineD3DSurfaceImpl_BltZ(). 2010-08-03 11:06:20 +02:00
Stefan Dösinger 515eb3d7c4 wined3d: MSVC fixes in state.c. 2010-08-02 12:55:23 +02:00
Stefan Dösinger 4431f6c11d wined3d: Replace pow with powf in surface_base.c. 2010-08-02 12:55:23 +02:00
Stefan Dösinger 4d45a791b6 wined3d: Fix another DWORD to WORD conversion warning. 2010-08-02 12:55:23 +02:00
Stefan Dösinger fc5eeebe1a wined3d: Add double to float conversion casts in device.c. 2010-08-02 12:55:22 +02:00
Stefan Dösinger 8db119b700 wined3d: Use the correct type in device_unit_free_for_vs. 2010-07-30 11:41:59 +02:00
Stefan Dösinger 723d87c280 wined3d: Make glClearColor parameters floats. 2010-07-30 11:41:44 +02:00
Stefan Dösinger 51cd12f35a wined3d: The flag parameter in shader_hw_sample is a WORD. 2010-07-30 11:41:28 +02:00
Stefan Dösinger 728dd55f62 wined3d: The ARB loop unroller's iteration is unsigned. 2010-07-30 11:41:03 +02:00
Henri Verbeet a99bf6c017 wined3d: Add support for ARB_texture_compression_rgtc. 2010-07-30 11:36:03 +02:00
Henri Verbeet 237f39377f wined3d: Move the draw buffer array to the context. 2010-07-30 11:36:03 +02:00
Henri Verbeet 3ad82a82bb wined3d: The stateblock doesn't have a parent. 2010-07-30 11:36:03 +02:00
Henri Verbeet 4936e71828 wined3d: Clamp vertex shader outputs.
To avoid having to interpolate infinities over fragments.
2010-07-29 17:33:35 +02:00
Henri Verbeet 2114a36936 wined3d: Unify vertex shader output handling between shader models. 2010-07-29 17:33:35 +02:00
Stefan Dösinger cc8a45321f wined3d: Add casts for int to float conversions. 2010-07-29 17:33:34 +02:00
Stefan Dösinger 6a87681b11 wined3d: Fix an msvc anachronism warning. 2010-07-29 17:33:34 +02:00
Stefan Dösinger 81b03d8891 wined3d: Use a int for the mantissa in float_24_to_32. 2010-07-29 17:33:34 +02:00
Stefan Dösinger b25f22e456 wined3d: Use powf instead of pow. 2010-07-29 17:33:34 +02:00
Henri Verbeet 41346a1dae wined3d: Setting render target 0 to NULL in an application error. 2010-07-28 12:22:55 +02:00
Henri Verbeet ea2bb2a904 wined3d: Invalid NP2 fixup info is an internal error. 2010-07-28 12:22:52 +02:00
Henri Verbeet 0d25da0c0d wined3d: Properly take both input and output masks into account in handle_ps3_input(). 2010-07-28 12:22:50 +02:00
Henri Verbeet ce39714228 wined3d: Check for unread registers in a more logical way in handle_ps3_input().
~0U always >= (in_count + 2).
2010-07-28 12:22:40 +02:00
Matteo Bruni 20f51c29a9 wined3d: Setup target if offscreen rendering setting changed. 2010-07-26 18:38:33 +02:00
Henri Verbeet 3e37b27d37 wined3d: Cleanup Get/SetRenderState traces a bit. 2010-07-26 18:38:31 +02:00
Henri Verbeet 6874743e78 wined3d: Add a missing return statement to surface_prepare_texture().
Calling surface_prepare_texture_internal() twice on the same surface is
harmless, but unnecessary.
2010-07-26 18:38:31 +02:00
Henri Verbeet 0bf68b846a wined3d: Merge strect_rect_fbo() and surface_load_srgb_fbo(). 2010-07-26 18:38:31 +02:00
Henri Verbeet 943fb2fb57 wined3d: Do RGB <=> sRGB transfers using FBO blits.
Concept based on a patch by Stefan.
2010-07-26 18:38:31 +02:00
Henri Verbeet 2f028f0340 wined3d: Avoid loading the destination surface in stretch_rect_fbo() if it will be completely overwritten. 2010-07-23 11:46:55 +02:00
Henri Verbeet d374d85055 wined3d: Clear all render targets in an MRT setup. 2010-07-23 11:46:47 +02:00
Stefan Dösinger 068915a4f1 wined3d: Check the writemask before activating the oC0 optimization.
The comment above the code correctly mentions that this optimization
does not work if oC0 is written partially, but the code doesn't
actually check for this condition.
2010-07-22 10:22:46 +02:00
Stefan Dösinger 6b794cbd64 wined3d: Only perform sRGB write correction on formats that advertise it. 2010-07-22 10:22:26 +02:00
Henri Verbeet 3d8ff7f27a wined3d: Framebuffer blits are affected by the color mask. 2010-07-22 10:13:36 +02:00
Henri Verbeet 4817a65091 wined3d: Preload resources before FBO setup. 2010-07-22 10:13:30 +02:00
Henri Verbeet f7760656f3 wined3d: Remove LoadLocation() from the public wined3d surface interface. 2010-07-22 10:13:24 +02:00
Henri Verbeet 147f24dd78 wined3d: Remove ModifyLocation() from the public wined3d surface interface. 2010-07-22 10:13:13 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Luke Bratch c63c568731 wined3d: Add Nvidia 8800GTX detection. 2010-07-21 13:23:59 +02:00
Henri Verbeet c411b45da9 wined3d: Use a more consistent name for the normalized texrect "extension". 2010-07-21 09:33:18 +02:00
Henri Verbeet 0344bc429d wined3d: Just implement BindTexture() for GDI surfaces in surface_gdi.c. 2010-07-21 09:33:05 +02:00
Henri Verbeet aae8f13610 wined3d: Remove an unused prototype. 2010-07-21 09:33:01 +02:00
Henri Verbeet 9976e078cb wined3d: Add some missing flags to debug_d3dusage(). 2010-07-21 09:32:55 +02:00
Henri Verbeet 4b850ed121 wined3d: Remove restoring the read buffer from read_from_framebuffer_texture().
The few functions that care about the read buffer should explicitly set it
themselves, instead of assuming any particular state.
2010-07-20 13:13:04 +02:00
Henri Verbeet d6e08f8074 wined3d: Consolidate surface related prototypes in wined3d_private.h. 2010-07-20 13:13:04 +02:00
Florian Köberle 2c1e8decfc wined3d: Let GetRasterStatus return D3DERR_INVALIDCALL. 2010-07-19 15:12:14 +02:00
Rico Schüller 894a150f69 wined3d: Add GL_NV_point_sprite extension. 2010-07-19 15:10:32 +02:00
Seth Shelnutt b5a5db910f wined3d: Nvidia Geforce 8400 and 8500 are now reported as 8400GS instead of 8300GS. 2010-07-19 14:38:16 +02:00
Henri Verbeet 3ecaa4a41a wined3d: Invalidate STATE_STREAMSRC in IWineD3DDeviceImpl_EvictManagedResources(). 2010-07-08 17:33:37 +02:00
Francois Gouget 7649c75b40 Assorted typo and spelling fixes. 2010-06-24 10:37:05 +02:00
Francois Gouget 620087c545 wined3d: Remove spaces after '\n's. 2010-06-24 10:33:46 +02:00
Henri Verbeet b769c912cc wined3d: read_from_framebuffer_texture() isn't suitable for readback of onscreen surfaces. 2010-06-22 13:51:30 +02:00
Matteo Bruni 6585bec5ac wined3d: Check for error conditions in GL call. 2010-06-22 11:22:38 +02:00
Roderick Colenbrander eb0a032a8c wined3d: Add NPOT quirk for GeforceFX 5200. 2010-06-18 11:19:03 +02:00
Rico Schüller c223e73bbb wined3d: Improve fglrx glsl spam filter. 2010-06-15 19:58:30 +02:00
Henri Verbeet b1abafcf8d wined3d: Also flip the point sprite coordinate origin when rendering offscreen. 2010-06-11 16:22:25 +02:00
Henri Verbeet 64e2525ba0 wined3d: Release the context on an error path in buffer_PreLoad(). 2010-06-07 12:22:44 +02:00
Henri Verbeet eb3c81fd69 wined3d: Sampler states are 1-based.
0 isn't a valid sampler state, and including it would overflow the
stateblock's contained_sampler_states array in
stateblock_init_contained_states().
2010-06-02 11:53:39 +02:00
Wolfram Sang ddd1c72574 wined3d: Clarify some comments about Intel cards. 2010-06-01 13:37:18 +02:00
Henri Verbeet 1b5cc39a86 wined3d: Get rid of some dead code. 2010-06-01 11:03:56 +02:00
Dan Kegel f99e1d80e2 wined3d: Fix size of buffer in swapchain_create_context_for_thread(). 2010-05-31 12:46:08 +02:00
Henri Verbeet 6f57aabc0a wined3d: Handle a zero source value for WINED3DSIH_POW. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander 39eaaeaa27 wined3d: Add support for mobile Geforce 3xx GPUs. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander c44603a559 wined3d: Mark Geforce GT 140 as a Geforce 9600GT. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander 036295c37a wined3d: Add Geforce 2xx lowend models. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander c471724a2a wined3d: Add Geforce 4x0 cards to GPU database. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander 3e10c3d547 wined3d: Update Nvidia Geforce6+ driver version to latest 197.45 WHQL version. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander ba09e7a2a1 wined3d: Don't use blit_supported() in d3dfmt_get_conv for now. 2010-05-27 14:46:43 +02:00
Roderick Colenbrander e54f06183c wined3d: Replace set_shader call with unset_shader in blt_to_drawable.
The blit_shader is activated before draw_textured_quad, so after use
it should be deactivated instead of being activated again.
2010-05-27 14:46:43 +02:00
Henri Verbeet e8ac9bbd7f wined3d: Get rid of GLINFO_LOCATION. 2010-05-25 13:29:00 +02:00
Henri Verbeet b5cec57690 wined3d: Set the state.c GLINFO_LOCATION to *gl_info. 2010-05-25 13:28:14 +02:00
Henri Verbeet 4d4654a014 wined3d: Set the arb_program_shader.c GLINFO_LOCATION to *gl_info. 2010-05-25 13:28:05 +02:00
Henri Verbeet 11bda6e0ab wined3d: Set the ati_fragment_shader.c GLINFO_LOCATION to *gl_info. 2010-05-25 13:27:58 +02:00
Henri Verbeet 31d1417ca3 wined3d: Set the nvidia_texture_shader.c GLINFO_LOCATION to *gl_info. 2010-05-24 11:31:31 +02:00
Henri Verbeet 08c783a8ad wined3d: Set the volume.c GLINFO_LOCATION to *gl_info. 2010-05-24 11:31:28 +02:00
Henri Verbeet bcc4603125 wined3d: Set the swapchain.c GLINFO_LOCATION to *gl_info. 2010-05-24 11:31:25 +02:00
Henri Verbeet 5178e475d6 wined3d: Set the drawprim.c GLINFO_LOCATION to *gl_info. 2010-05-24 11:31:23 +02:00
Stefan Dösinger b5da118531 wined3d: Catch RCP 0.0 in ARB. 2010-05-21 18:58:04 +02:00
Stefan Dösinger c80b5d6afc wined3d: Handle length zero vectors in ARB's NRM. 2010-05-21 18:58:04 +02:00
Stefan Dösinger ed74fcefc8 wined3d: Make the mova constant more generic for relative addressing. 2010-05-21 18:58:04 +02:00
Stefan Dösinger a0143e142b wined3d: Order the helper constants a bit better. 2010-05-21 18:58:04 +02:00
Stefan Dösinger a1710a32f3 wined3d: Add a function for reading (ps_)helper_const. 2010-05-21 18:58:04 +02:00
Stefan Dösinger 6946de8125 wined3d: Store a positive 1.0 in the ARB's vertex shader helper constant. 2010-05-21 18:58:04 +02:00
Stefan Dösinger 09d74b748e wined3d: Split up the "one" pixel shader helper constant. 2010-05-21 18:58:04 +02:00
Michael Stefaniuc 6d89364ad1 wined3d: Avoid using the long type. 2010-05-21 18:58:04 +02:00
Henri Verbeet 11b8c425e9 wined3d: Set the device.c GLINFO_LOCATION to *gl_info. 2010-05-21 14:37:53 +02:00
Henri Verbeet 5dff410254 wined3d: Explicitly pass GL info to buffer_get_sysmem(). 2010-05-21 14:37:52 +02:00
Henri Verbeet e647309402 wined3d: Explicitly pass GL info to buffer_create_buffer_object(). 2010-05-21 14:37:52 +02:00
Henri Verbeet e536f99871 wined3d: Set the buffer.c GLINFO_LOCATION to *gl_info. 2010-05-21 14:37:52 +02:00
Henri Verbeet db0784e1da wined3d: Introduce a separate function for translating front buffer coordinates to GL coordinates. 2010-05-21 14:37:52 +02:00
Henri Verbeet a2a58a21d8 wined3d: Translate front buffer coordinates in surface_blt_to_drawable(). 2010-05-20 13:47:53 +02:00
Henri Verbeet e5c76f7396 wined3d: Merge destination rectangle operations into a single block in IWineD3DBaseSurfaceImpl_Blt(). 2010-05-20 13:47:53 +02:00
Henri Verbeet 3884bb3bdc wined3d: Merge source rectangle operations into a single block in IWineD3DBaseSurfaceImpl_Blt(). 2010-05-20 13:47:53 +02:00
Henri Verbeet c48ff6c12a wined3d: Split checking for "empty" source and destination rectangles in IWineD3DBaseSurfaceImpl_Blt().
Assuming this is supposed to check for empty source / destination rectangles,
the check doesn't look quite right to me. I'm going to leave that alone for
the time being though.
2010-05-20 13:47:53 +02:00
Henri Verbeet becf8dc828 wined3d: Check for a destination clipper in IWineD3DBaseSurfaceImpl_Blt().
This check was there in the original ddraw code, but apparently got lost
during the ddraw rewrite in 2006.
2010-05-20 13:47:53 +02:00
Henri Verbeet 9d865274c0 wined3d: Fix a comment. 2010-05-19 16:57:59 +02:00
Henri Verbeet f0888577c5 wined3d: Use wine_dbgstr_rect() for tracing the rectangle in IWineD3DSurfaceImpl_LockRect(). 2010-05-19 16:57:59 +02:00
Henri Verbeet 465e8f66cb wined3d: Explicitly pass the FBO target to context_clean_fbo_attachments().
This should have been part of e01d56f331.
2010-05-19 16:57:59 +02:00
Henri Verbeet 0fe7b45b6c wined3d: Make context_attach_surface_fbo() static. 2010-05-19 16:57:59 +02:00
Henri Verbeet 7bec8e1dcb wined3d: Correctly translate between coordinate systems in swapchain_blit(). 2010-05-18 18:42:09 +02:00
Henri Verbeet e0d6ca57d7 wined3d: Check for offscreen contexts inside context_validate_onscreen_formats() itself. 2010-05-18 18:42:08 +02:00
Henri Verbeet 4889c33da6 wined3d: Explicitly pass the depth/stencil surface to context_validate_onscreen_formats().
This avoids switching to offscreen rendering in context_apply_blit_state() for
a depth buffer that isn't going to be used anyway. This switch would be
problematic for blits to the frontbuffer, since it's always onscreen. I.e.,
we'd be blitting to the screen, but with offscreen transforms.
2010-05-18 18:42:08 +02:00
Henri Verbeet 96cdab1792 wined3d: context_validate_onscreen_formats() may modify context->render_offscreen.
I merged this by accident in be43c867a5.
2010-05-18 18:42:08 +02:00
Julius Schwartzenberg ba11b695e6 wined3d: Cope with the new Intel renderer string. 2010-05-18 08:47:57 +02:00
Roderick Colenbrander ee9b409fce wined3d: Use BltFast in UpdateSurface when desc.convert is set. 2010-05-17 14:44:09 +02:00
Roderick Colenbrander ba8f0da271 wined3d: Remove unneeded d3dfmt_get_conv conversion constants. 2010-05-17 14:43:56 +02:00
Roderick Colenbrander f892003194 wined3d: Set conversion flags for format descriptors having a convert function. 2010-05-17 14:43:49 +02:00
Henri Verbeet 79145e215b wined3d: Add support for shadow samplers. 2010-05-17 13:19:53 +02:00
Henri Verbeet 29b13f75cc wined3d: Add support for ARB_shadow. 2010-05-17 13:19:49 +02:00
Henri Verbeet 498664af3a wined3d: Remove some unused winetexturestates elements. 2010-05-17 13:19:44 +02:00
Henri Verbeet 44ab3d70f1 wined3d: Handle depth/stencil surfaces in IWineD3DSurfaceImpl_LoadLocation(). 2010-05-17 13:19:40 +02:00
Roderick Colenbrander e91f4ae776 wined3d: Make sure wglFlush is not between ENTER_GL/LEAVE_GL. 2010-05-14 18:03:02 +02:00
Roderick Colenbrander b60961ae55 wined3d: Use surface_prepare_texture for surface allocation in read_from_framebuffer_texture. 2010-05-11 11:04:55 +02:00
Stefan Dösinger 481aca47ad wined3d: Don't use GL_ARB_map_buffer_range for now.
There are numerous problems with this extension, and there are no
visible upsides. In the best case dynamic VBOs are just as fast as no
VBO at all.
2010-05-10 13:45:16 +02:00
Marcus Meissner 9494cdc56f wined3d: fixed a NULL deref in create_arb_blt_fragment_program (Coverity). 2010-05-10 10:04:31 +02:00
Alexandre Julliard e45926d582 wined3d: Don't crash during initialization if the adapter doesn't have full GL info. 2010-05-06 14:57:21 +02:00
Gerald Pfeifer da628001fe wined3d: Fix the handling of the blue channel inIWineGDISurfaceImpl_SaveSnapshot. (take 2). 2010-05-06 14:26:18 +02:00
Henri Verbeet 6478e41b97 wined3d: Remove the unused device type parameter to some format capability checking functions. 2010-05-06 14:17:46 +02:00
Henri Verbeet 6d68701fb3 wined3d: Reorganize IWineD3DImpl_CheckDeviceFormat() a bit. 2010-05-06 14:17:39 +02:00
Henri Verbeet 7a2debe113 wined3d: Use the FBO cache in swapchain_blit(). 2010-05-06 14:17:30 +02:00
Henri Verbeet 3345146d0b wined3d: Use the FBO cache in stretch_rect_fbo(). 2010-05-06 14:17:24 +02:00
Henri Verbeet 9982a46296 wined3d: Use the FBO cache in context_apply_blit_state(). 2010-05-06 14:16:44 +02:00
Henri Verbeet 8de7d2ed4c wined3d: Use context_apply_clear_state() in color_fill_fbo(). 2010-05-05 10:37:43 +02:00