Commit Graph

1076 Commits

Author SHA1 Message Date
Stefan Dösinger f74de3ab65 wined3d: Don't advertise float formats as supported by WGL. 2010-03-26 10:28:52 +01:00
Stefan Dösinger 1181762f99 wined3d: Implement manual buffer fencing. 2010-03-23 12:31:15 +01:00
Stefan Dösinger fd13a6ae23 wined3d: Partially implement unserialized buffers with the apple extension. 2010-03-23 12:30:18 +01:00
Francois Gouget 3428b94a8d Assorted spelling and case fixes. 2010-03-22 10:49:13 +01:00
Henri Verbeet 122129f94a wined3d: Add COMPLEX_FIXUP_NONE as value 0 to the complex_fixup enum.
To prevent get_complex_fixup() from returning COMPLEX_FIXUP_YUY2 for simple
fixups.
2010-03-19 14:31:59 +01:00
Henri Verbeet 3aaa6ee6e7 wined3d: Rename GlPixelFormatDesc to wined3d_format_desc. 2010-03-19 14:31:47 +01:00
Roderick Colenbrander 27a96e477a wined3d: Start moving paletted texture support to the blit_shader. 2010-03-19 13:15:21 +01:00
Roderick Colenbrander fd99ab78c2 wined3d: Use draw_textured_quad in BltOverride. 2010-03-19 13:15:06 +01:00
Henri Verbeet 135f364110 wined3d: Kill VTRACE. 2010-03-18 10:25:02 +01:00
Henri Verbeet e5673ddbc3 wined3d: Add a quirk to rebind FBOs when one of their attached textures is updated.
Updating a texture while it is attached to the currently bound FBO is
something GL implementations tend to get wrong. NVIDIA fails at
glTexSubImage2D(), fglrx and Mesa with glTexImage2D(). I'm afraid to try what
happens on OS X. Fortunately we never use glTexImage2D() while a texture is
attached to an FBO, so we only need to care about glTexSubImage2D().
2010-03-18 10:24:41 +01:00
Henri Verbeet bd4fb33a52 wined3d: Unify GLINFO_LOCATION in surface.c. 2010-03-18 10:24:33 +01:00
Stefan Dösinger d790530df3 wined3d: Make resources 16 byte aligned. 2010-03-17 13:36:39 +01:00
Stefan Dösinger 6c53871d30 wined3d: Implement unfenced updates of double buffered buffers. 2010-03-16 17:02:50 +01:00
Henri Verbeet 78166b0b23 wined3d: Implement SetDestWindowOverride() by simply making the context current on a different window. 2010-03-16 11:45:15 +01:00
Henri Verbeet cd9a8b74b9 wined3d: Store the device window in the swapchain.
The swapchain's current window might be changed by SetDestWindowOverride().
2010-03-16 11:45:11 +01:00
Henri Verbeet 18ec2525a4 wined3d: Store the swapchain instead of the surface in the context. 2010-03-16 11:44:44 +01:00
Henri Verbeet 4b671f4d54 wined3d: Move device context array functions to device.c. 2010-03-15 15:55:57 +01:00
Henri Verbeet 8a107bc63a wined3d: Kill pbuffer offscreen rendering support.
Our pbuffer support is broken, nobody cares.
2010-03-15 15:55:38 +01:00
Roderick Colenbrander 604caf0caa wined3d: Remove oversize texture support. 2010-03-15 14:23:15 +01:00
Stefan Dösinger bd0641d37f wined3d: Add wined3d_event_query_create and destroy.
This also moves the event query faking code back to the external
interface and removes the temporary WINED3D_EVENT_QUERY_UNSUPPORTED
return value since wined3d_event_query_create properly fails if no
event query GL extension is supported.
2010-03-05 12:39:23 +01:00
Stefan Dösinger a0d1a55650 wined3d: Create a wined3d internal event query interface.
The newly created wined3d_event_query_test will be available for
wined3d-internal use, primarily for synchronizing buffer updates when
using GL_APPLE_flush_buffer_range.

The wined3d_event_query interface will contain most of the functionality:
* Selecting the proper GL extension
* Context handling
* Thread handling

The IWineD3DEventQuery COM interface will use the internal interface
and implement event query faking on top of it (to enable games that
require event queries able to run on drivers that don't implement the
GL extension).
2010-03-05 12:39:07 +01:00
Paul Andrew Panon 7a9734dc68 wined3d: Add a real GL vendor detection. 2010-03-03 16:06:28 +01:00
Paul Andrew Panon 31573b21b9 wined3d: Rename GL_VENDOR to HW_VENDOR. 2010-03-03 16:06:07 +01:00
Roderick Colenbrander c0ef7a1a93 wined3d: Move the 8-bit palette shader code over to the blit_shader backend. 2010-03-03 12:53:51 +01:00
Roderick Colenbrander 922ad80f42 wined3d: Rename yuv to complex in order to prepare for 8-bit palette fixups using the same code. 2010-03-03 12:53:41 +01:00
Roderick Colenbrander ccea415c77 wined3d: Fix multisampling on cards without 32-bit RGB fbconfigs. 2010-03-02 11:11:49 +01:00
Henri Verbeet eefb45f333 wined3d: Properly report shader comment sizes. 2010-02-23 12:06:54 +01:00
Henri Verbeet 974f888dfa wined3d: Move the gl info structure to wined3d_private.h. 2010-02-16 10:47:50 +01:00
Henri Verbeet 3df59ef0d5 wined3d: Get rid of the now redundant max_ffp_texture_stages device field. 2010-02-05 10:06:12 +01:00
Henri Verbeet 576ea95803 wined3d: Remove the unused device type parameter from the shader backend's get_caps() function. 2010-02-04 13:39:27 +01:00
Henri Verbeet 497386dc5c wined3d: Remove the unused device type parameter from the fragment pipe's get_caps() function.
On the subject of actually supporting software devices, we should probably
implement those by creating a software or reference adapter with appropriate
gl_info and pipe implementations and creating a device based on that.
2010-02-04 13:39:26 +01:00
Henri Verbeet af7dfcd378 wined3d: Do not preload surfaces when attaching them to an FBO.
Just make sure the texture is allocated, so we have something to attach. Note
also that context_apply_attachment_filter_states() runs under the GL lock, so
preloading resources is actually unsafe there.
2010-02-04 13:39:26 +01:00
Henri Verbeet 040452ad90 wined3d: Update the stream info before applying states. 2010-02-03 13:54:02 +01:00
Henri Verbeet 31d51fb175 wined3d: Preload textures before applying states. 2010-02-03 13:54:02 +01:00
Henri Verbeet 7ff576bbab wined3d: Select the blitter during adapter initialization. 2010-02-03 13:54:02 +01:00
Henri Verbeet cee8e9d881 wined3d: Select the shader backend during adapter initialization. 2010-02-02 14:11:02 +01:00
Henri Verbeet fb21551b2d wined3d: Select the fragment pipeline during adapter initialization. 2010-02-02 14:10:56 +01:00
Henri Verbeet 9bbccb7f80 wined3d: Add a debug function for state names. 2010-01-29 13:30:05 +01:00
Henri Verbeet 96b150929b wined3d: Add an ARB_sync implementation of event queries. 2010-01-26 12:08:23 +01:00
Henri Verbeet f71e84d89c wined3d: Store a pointer to the GL info in the shader context. 2010-01-25 12:58:52 +01:00
Henri Verbeet 516d54bf91 wined3d: Merge baseshader.c into shader.c. 2010-01-18 14:37:51 +01:00
Henri Verbeet a2624ae82e wined3d: Add a separate function for query initialization. 2010-01-18 14:37:30 +01:00
Henri Verbeet 46cefd312c wined3d: Recognize the SM4 cut opcode. 2010-01-07 09:26:54 +01:00
Henri Verbeet 3687677427 wined3d: Recognize the SM4 lt opcode. 2010-01-07 09:26:30 +01:00
Henri Verbeet 6d5aca61f3 wined3d: Recognize the SM4 iadd opcode. 2010-01-07 09:26:25 +01:00
Henri Verbeet 22939f9d29 wined3d: Recognize the SM4 emit opcode. 2010-01-07 09:26:20 +01:00
Henri Verbeet c57c76b78e wined3d: Recognize the SM4 ige opcode. 2010-01-07 09:26:08 +01:00
Stefan Dösinger a756caac0c wined3d: Implement subrange flushing with GL_APPLE_flush_buffer_range. 2010-01-04 12:09:34 +01:00
Stefan Dösinger 716520b4b8 wined3d: Track separate dirty ranges in buffers. 2010-01-04 12:08:14 +01:00
Henri Verbeet 41401fb8cf wined3d: Add a geometry shader object.
This is just the object used to store the byte code, the shader compiler
doesn't know how to handle geometry shaders yet.
2010-01-04 11:41:28 +01:00
Henri Verbeet f50b4c7d71 wined3d: Move "wrap_lookup" to struct wined3d_gl_info. 2010-01-04 11:41:28 +01:00
William Waghorn 0c582dca3a wined3d: Added NVidia GT240 detection. 2010-01-04 11:41:27 +01:00
Aaron Brazener 11754a645b wined3d: Added further Nvidia Geforce 8xxx detection. 2009-12-31 12:12:18 +01:00
Henri Verbeet b548e387ae wined3d: Move shader input/output signatures to IWineD3DBaseShaderClass. 2009-12-31 12:12:16 +01:00
Henri Verbeet 736aaf7d09 wined3d: Always handle WINED3DSPR_INPUT registers as input registers in shader_get_registers_used().
The "attributes" vertexshader field is now derived from the input signature,
and only used to speed up matching D3D9 vertex declaration elements to shader
inputs. D3D8 and D3D10 both explicitly specify input registers.
2009-12-31 12:12:16 +01:00
Henri Verbeet 2650885cc8 wined3d: Use the element size to create "isStateDirty" bitmap indices. 2009-12-30 13:31:36 +01:00
Aaron Brazener 381fa8931f wined3d: Added ATI Radeon HD 5xxx detection. 2009-12-29 11:05:39 +01:00
Stefan Dösinger 4f594777a2 wined3d: Drop the VBO if too many full buffer conversions occur. 2009-12-29 11:04:03 +01:00
Stefan Dösinger f90b8b6352 wined3d: Rename conversion_count to something more appropriate. 2009-12-29 11:03:44 +01:00
Henri Verbeet 3288911ae3 wined3d: Use proper enum elements for FOURCC formats. 2009-12-23 14:27:30 +01:00
Henri Verbeet a0aa10eb5c wined3d: Filter messages for the device's focus window instead of the swapchain's device window.
Usually these will be the same window, but they don't have to be.
2009-12-23 14:27:29 +01:00
Henri Verbeet a215d326a5 wined3d: Get rid of the "swapchain" parameter to surface_get_gl_buffer().
Casting the container to "IWineD3DSwapChainImpl *" is always safe when
SFLAG_SWAPCHAIN is set on the surface. Most callers don't have a real
need for the swapchain, and end up calling GetContainer() just to pass
it to surface_get_gl_buffer().
2009-12-16 12:22:18 +01:00
Henri Verbeet c24e48d937 wined3d: Filter window messages generated by switching to fullscreen and back. 2009-12-15 11:43:56 +01:00
Henri Verbeet 0e270bbd22 wined3d: Send window messages through the swapchain before sending them to the application. 2009-12-15 11:43:41 +01:00
Henri Verbeet cb076db8cc wined3d: Move IWineD3DDeviceImpl_RestoreWindow() to swapchain.c. 2009-12-11 12:16:25 +01:00
Henri Verbeet 542590cfc9 wined3d: Move IWineD3DDeviceImpl_SetupFullscreenWindow() to swapchain.c. 2009-12-11 12:16:25 +01:00
Henri Verbeet a9f2613d13 wined3d: Add a separate function for swapchain initialization. 2009-12-11 12:16:25 +01:00
Henri Verbeet 840b5af77e wined3d: Properly invalidate the context's draw buffer in color_fill_fbo(). 2009-12-11 12:16:25 +01:00
Henri Verbeet b85a070598 wined3d: Support more formats for display mode enumeration.
ddraw/d3d8/d3d9 only support a limited number of formats, but those already
limit the supported formats themselves.
2009-12-10 11:54:55 +01:00
Henri Verbeet b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Henri Verbeet b6ef17f23d wined3d: Remove unused GetDevice() implementations. 2009-12-09 13:51:04 +01:00
Henri Verbeet 54f3dec8e6 wined3d: Rename the "wineD3D" device field to "wined3d". 2009-12-08 12:33:29 +01:00
Henri Verbeet a02f93defb wined3d: Remove the redundant "adapterNo" field from the device. 2009-12-08 12:33:23 +01:00
Henri Verbeet aed85222b5 wined3d: Rename the wined3d_adapter "num" field to "ordinal".
This makes it consistent with dxgi_adapter.
2009-12-08 12:33:17 +01:00
Stefan Dösinger 817714912b wined3d: Infrastructure to render swapchains to a FBO. 2009-12-07 14:33:24 +01:00
Stefan Dösinger 64291c60cb wined3d: A function for checking if a surface is offscreen. 2009-12-07 14:32:54 +01:00
Stefan Dösinger 54f0d3f785 wined3d: Add a function for initializing surface sysmem. 2009-12-07 14:32:29 +01:00
Henri Verbeet dd5fc79f56 wined3d: The stateblock doesn't really need a parent. 2009-12-04 14:34:59 +01:00
Henri Verbeet ed73f0a1b0 d3d9: Implement IDirect3D9Ex::GetAdapterLUID(). 2009-12-02 13:06:08 +01:00
Henri Verbeet 55f3c576d9 wined3d: Remove the effetively unused "state" field from the device. 2009-11-18 11:16:54 +01:00
Henri Verbeet 135e6cea7b wined3d: Add a separate function for device initialization. 2009-11-18 11:16:49 +01:00
Henri Verbeet e4d8a3f309 wined3d: Move the various backend selection utility functions to utils.c. 2009-11-18 11:16:43 +01:00
Stefan Dösinger 0e77a381ea wined3d: Create clip coords only if they are used.
If GL vertex shader clipping is supported (GLSL or NVvp), we currently
always calculate clipping results in the shader. They're gracefully
discarded by opengl, but we need 6 constants / uniforms to calculate
unused values.
2009-11-12 15:18:00 +01:00
Henri Verbeet be8026adf6 wined3d: directly pass gl_info to stream_info_element_from_strided(). 2009-10-29 13:09:37 +01:00
Henri Verbeet 111307dfba wined3d: Get rid of the GL_SUPPORT macro. 2009-10-29 13:09:33 +01:00
Henri Verbeet e6ca176a48 wined3d: Rename DestroyContext() to context_destroy(). 2009-10-28 11:16:05 +01:00
Henri Verbeet c0050b8ec9 wined3d: Restore the thread's GL context on context_release() if it wasn't created by wined3d.
The background on this is that some applications use OpenGL and DirectDraw/Direct3D on
the same thread, typically using OpenGL for rendering and DirectDraw to get
the amount of available video memory. This means that we might replace the
application's current GL context with one with a completely different state,
but also that our current GL context might not be what we think it is.
2009-10-28 11:15:59 +01:00
Henri Verbeet 98027cb535 wined3d: Call context_release() for wined3d contexts made current by context_create(). 2009-10-28 11:15:27 +01:00
Henri Verbeet eeb54b9922 wined3d: Keep better track of where we're using wined3d contexts.
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00
Henri Verbeet 2447c8bc3e wined3d: Store PCI IDs in wined3d_driver_info instead of wined3d_gl_info. 2009-10-27 10:54:50 +01:00
Henri Verbeet 5fbe5ee027 wined3d: Add a separate structure for driver info. 2009-10-26 11:20:33 +01:00
Henri Verbeet 342a71b281 wined3d: Replace the "stateLookup" tables with a single "wrap_lookup" table. 2009-10-23 12:03:15 +02:00
Henri Verbeet 6be41fd59a wined3d: Get rid of GL_LIMITS. 2009-10-22 10:46:05 +02:00
Henri Verbeet f2aaca2f67 wined3d: Rename WineD3DAdapter to wined3d_adapter. 2009-10-21 16:05:57 +02:00
Henri Verbeet 94d33d3e86 wined3d: Destroy FBO entries from the context that created them.
EXT_framebuffer_object doesn't specify if FBOs are shareable between GL
contexts, but ARB_framebuffer_object explicitly prohibits it.
2009-10-20 14:00:37 +02:00
Henri Verbeet 43aaaa8a4b wined3d: Validate the D3D context in FindContext().
Apparently it's valid to use a D3D device after its window is destroyed.
OpenGL isn't always so forgiving, so this patch is a first step to avoid
making GL calls on a context without window.
2009-10-20 14:00:36 +02:00
Henri Verbeet 0cb6f28751 wined3d: Get rid of the useless "isPBuffer" bitfield in struct wined3d_context. 2009-10-20 14:00:36 +02:00
Henri Verbeet bac6486520 wined3d: Merge some bitfields in struct SAVEDSTATES. 2009-10-14 11:26:44 +02:00
Henri Verbeet a24d14796a wined3d: Remove the useless "changed" and "enabledChanged" fields from struct wined3d_light_info. 2009-10-14 11:26:26 +02:00
Henri Verbeet 3bc9d1894d wined3d: Rename PLIGHTINFOEL to something less awful. 2009-10-14 11:26:17 +02:00