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
Stefan Dösinger
cb5ce03de4
wined3d: SetRenderTarget resets the scissor rect.
2009-10-02 15:06:57 +02:00
Stefan Dösinger
4a3f04cb56
wined3d: SetRenderTarget bypasses stateblock recording.
2009-10-02 15:06:57 +02:00
Stefan Dösinger
9e068a33b3
wined3d: SetRenderTarget doesn't change the viewport in d3d7.
2009-10-02 15:06:56 +02:00
Henri Verbeet
8b3f868774
wined3d: Move the pixel/vertex states arrays to stateblock.c.
2009-10-02 11:53:03 +02:00
Henri Verbeet
be0b7355fc
wined3d: Add a separate function for initializing the "contained_*" fields from the "changed" field.
2009-09-30 14:31:59 +02:00
Henri Verbeet
664057ce6a
wined3d: Add a separate function for state block initialization.
2009-09-29 14:22:34 +02:00
Henri Verbeet
26db0be136
wined3d: Cleanup IWineD3DDeviceImpl_SetTexture() a bit.
2009-09-28 12:38:32 +02:00
Henri Verbeet
dca3c6e7c6
wined3d: Keep vertex declaration references in the stateblock.
2009-09-28 12:38:18 +02:00
Henri Verbeet
709aedf5f9
wined3d: Properly keep texture references in the stateblock.
2009-09-28 12:38:12 +02:00
Henri Verbeet
cd96c6e355
wined3d: Release the stateblock before destroying the GL context.
2009-09-25 15:15:49 +02:00
Henri Verbeet
47c84f4f7f
wined3d: Use the DXGI naming convention for all formats.
2009-09-25 15:15:44 +02:00
Henri Verbeet
c64da00de7
wined3d: Rename IWineD3DDevice::GetIndices() to IWineD3DDevice::GetIndexBuffer().
2009-09-25 15:14:52 +02:00
Henri Verbeet
60e32659a7
wined3d: Rename IWineD3DDevice::SetIndices() to IWineD3DDevice::SetIndexBuffer().
2009-09-25 15:14:44 +02:00
Henri Verbeet
789372afa8
wined3d: Don't free D3D pixel shaders until the wined3d pixel shader is destroyed.
2009-09-24 13:24:53 +02:00
Henri Verbeet
8aea1b1302
wined3d: Add a separate function for pixel shader initialization.
2009-09-24 13:24:27 +02:00
Henri Verbeet
ca05ef5dd0
wined3d: Don't free D3D vertex shaders until the wined3d vertex shader is destroyed.
2009-09-24 13:24:19 +02:00
Henri Verbeet
462decdfb9
wined3d: Add a separate function for vertex shader initialization.
2009-09-24 13:23:51 +02:00
Henri Verbeet
ec97383f6f
wined3d: Add support for ARB_framebuffer_object.
2009-09-23 12:37:00 +02:00
Henri Verbeet
66a7236590
wined3d: Don't free D3D vertex declarations until the wined3d vertex declaration is destroyed.
2009-09-23 12:36:28 +02:00
Henri Verbeet
5b8b97a737
wined3d: Cleanup vertex declaration initialization.
2009-09-22 16:17:20 +02:00
Henri Verbeet
93b0600829
wined3d: Don't free D3D buffers until the wined3d buffer is destroyed.
2009-09-18 08:55:25 -05:00
Henri Verbeet
22124bc5cb
wined3d: Add a separate function for buffer initialization.
2009-09-18 08:54:44 -05:00
Henri Verbeet
a8e8f763bf
wined3d: Don't free D3D textures until the wined3d texture is destroyed.
2009-09-18 08:54:34 -05:00
Henri Verbeet
de3bd86fb6
wined3d: Don't free D3D cube textures until the wined3d cube texture is destroyed.
2009-09-17 10:09:44 -05:00
Henri Verbeet
a286646f51
wined3d: Don't free D3D volume textures until the wined3d volume texture is destroyed.
2009-09-16 13:06:06 -05:00
Henri Verbeet
83b3d4f27a
wined3d: Move vtable initialization to the texture init functions.
2009-09-16 13:05:45 -05:00
Henri Verbeet
e9000d2e6c
wined3d: Don't free D3D volumes until the wined3d volume is destroyed.
2009-09-16 13:05:20 -05:00
Henri Verbeet
2b2d3de025
wined3d: Add a separate function for volume initialization.
2009-09-16 13:04:47 -05:00
Henri Verbeet
a5214c306f
wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
...
This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
2009-09-16 13:04:32 -05:00
Henri Verbeet
2b2fc827ce
wined3d: Remove unused parameters to drawPrimitive().
2009-09-11 12:09:14 +02:00
Henri Verbeet
560d63548d
wined3d: Remove trailing spaces.
2009-08-27 11:45:37 +02:00
Henri Verbeet
afc06ce748
wined3d: Get rid of a redundant memset() in device_stream_info_from_declaration().
2009-08-27 11:45:37 +02:00
Stefan Dösinger
52731a80c8
wined3d: Make it clear that glFlush and glFinish are WGL functions.
2009-08-26 14:35:41 +02:00
Henri Verbeet
458afd64bd
wined3d: Properly check if an attribute is used in IWineD3DDeviceImpl_ProcessVertices().
2009-08-21 11:10:26 +02:00
Henri Verbeet
4ec2b09d8f
wined3d: Don't check for a "representative" in the MarkStateDirty() functions.
...
States without representative should never be called. Arguably they shouldn't
exist in the first place, but allowing them simplifies the state table.
2009-08-21 11:10:21 +02:00
Henri Verbeet
8d0ad2cf36
wined3d: Remove a redundant IWineD3DDeviceImpl_MarkStateDirty() call.
...
We should now correctly track the relevant state per-context. The
IWineD3DDeviceImpl_SetViewport() call isn't quite correct for d3d8 and d3d9,
Stefan still has a patch for that.
2009-08-17 13:57:50 +02:00
Henri Verbeet
b8078fc747
wined3d: Use WINED3D_UNMAPPED_STAGE in some more places.
2009-08-17 13:57:50 +02:00
Henri Verbeet
7a0670392c
wined3d: Check the correct vertex sampler in device_unit_free_for_vs().
2009-08-17 13:57:50 +02:00
Henri Verbeet
8cf7aa2bdd
wined3d: Don't use a start index higher than MAX_COMBINED_SAMPLERS - 1 in device_map_vsamplers().
2009-08-17 13:57:50 +02:00
Henri Verbeet
a7251f0f4e
wined3d: Track render_offscreen in the context.
...
This makes sure the relevant states in FindContext() are actually marked dirty
when needed.
2009-08-06 17:26:30 +02:00
Henri Verbeet
7165bd19c1
wined3d: WINED3DTEXF_NONE only makes sense as a mip filter.
2009-08-05 11:20:43 +02:00
Henri Verbeet
da1e5573da
wined3d: Rename WineD3DContext to struct wined3d_context.
2009-08-03 15:01:48 +02:00
Henri Verbeet
be536ebe2f
wined3d: Get rid of activeContext.
2009-07-24 13:10:57 +02:00
Henri Verbeet
c8fe24d29e
wined3d: Explicitly pass the context to surface_load_ds_location().
2009-07-24 13:10:47 +02:00
Henri Verbeet
2c71b85334
wined3d: Explicitly pass the context to get_drawable_size().
2009-07-24 13:10:37 +02:00
Henri Verbeet
fb77678e9f
wined3d: Manage event queries in the context.
2009-07-24 13:10:28 +02:00
Henri Verbeet
4ab7af6575
wined3d: Manage occlusion queries in the context.
2009-07-24 13:10:19 +02:00
Henri Verbeet
357ea123d9
wined3d: get_drawable_size() needs a context.
2009-07-23 11:22:25 +02:00
Henri Verbeet
c114b04016
wined3d: Remove the useless lastThread field from IWineD3DDeviceImpl.
2009-07-21 14:23:06 +02:00
Henri Verbeet
2d7500600b
wined3d: Get rid of lastActiveRenderTarget.
2009-07-21 14:23:02 +02:00
Henri Verbeet
8402519c7a
wined3d: Call ModifyLocation on "target" in IWineD3DDeviceImpl_ClearSurface().
...
This is the same pointer, but lastActiveRenderTarget will go away.
2009-07-21 14:22:53 +02:00
Henri Verbeet
ee4d18cc83
wined3d: Pass NULL to ActivateContext() when we don't need a specific target.
...
Once we keep track of the wined3d context for each thread,
lastActiveRenderTarget won't do what we want here.
2009-07-21 14:22:44 +02:00
Henri Verbeet
3a63552fd1
wined3d: Skip some unnecessary FBO binds.
2009-07-20 13:35:11 +02:00
Henri Verbeet
710f6f8456
wined3d: Always use context_bind_fbo() to change the framebuffer binding.
2009-07-17 11:22:07 +02:00
Henri Verbeet
7485173849
wined3d: Pass the context instead of the device to the various context functions.
2009-07-17 11:22:07 +02:00
Henri Verbeet
69b7612265
wined3d: Get rid of struct glDescriptor.
...
In general it might not be a bad idea to group GL specific data into a
separate struct, but IWineD3DSurfaceImpl is currently the only thing that
bothers. It doesn't get it quite right either, since e.g. the PBO isn't in
glDescriptor either.
2009-07-10 12:13:24 +02:00
Henri Verbeet
038d939941
wined3d: Remove GetGlDesc() from the public IWineD3DSurface interface.
2009-07-10 12:13:09 +02:00
Henri Verbeet
2ac34bf231
wined3d: Add some missing float suffixes.
...
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Henri Verbeet
4075e45d81
wined3d: Add a WARN to IWineD3DDeviceImpl_SetFrontBackBuffers() about potentially being called without a GL context.
2009-06-29 12:30:37 +02:00
Henri Verbeet
7363b6e2e3
wined3d: Document GL context dependencies.
2009-06-26 12:05:07 +02:00
Henri Verbeet
4a137815db
wined3d: Make sure we have an active GL context in IWineD3DDeviceImpl_SetCursorProperties().
2009-06-25 11:47:34 +02:00
Henri Verbeet
94cd8656ea
wined3d: Make context_resource_released() responsible for activating a different GL context.
...
In case lastActiveRenderTarget is destroyed.
2009-06-25 11:47:24 +02:00
Henri Verbeet
11fd358cc6
wined3d: Make sure we have an active GL context in delete_opengl_contexts().
2009-06-25 11:47:09 +02:00
Stefan Doesinger
0188f96dd2
wined3d: Implement EvictManagedResources.
2009-06-19 14:54:04 +02:00
Henri Verbeet
9f252cd815
wined3d: Remove some useless code in IWineD3DDeviceImpl_SetLightEnable().
2009-06-18 15:17:27 +02:00
Henri Verbeet
41d93e1dd1
wined3d: Make sure we have a context in stretch_rect_fbo().
...
Specifically, in case the source surface was offscreen, we would sometimes to
GL calls without active context.
2009-06-18 15:17:27 +02:00
Henri Verbeet
88162fabb8
wined3d: Get rid of the pointers in WINED3DSURFACE_DESC.
2009-06-15 13:42:29 +02:00
Henri Verbeet
5f581975dc
wined3d: Introduce surface_init() to handle most of the surface initialization.
2009-06-15 13:42:28 +02:00
Henri Verbeet
4bc6b376e0
wined3d: Remove the useless "resource_type" parameter from IWineD3DDevice::CreateSurface().
2009-06-12 17:33:15 +02:00
Henri Verbeet
8f67918f1d
wined3d: Use WINED3DFMT_FLAG_COMPRESSED instead of checking for specific formats.
2009-06-12 17:33:15 +02:00
Henri Verbeet
e255f971e4
wined3d: Use the format info to calculate compressed surface size in IWineD3DDeviceImpl_CreateSurface().
2009-06-11 11:53:55 +02:00
Henri Verbeet
b052c6e8aa
wined3d: Remove some redundant s3tc extension checks.
...
If the extension isn't available to surface shouldn't have been created. We
don't do extension checks for all the other formats either.
2009-06-11 11:53:54 +02:00
Gerald Pfeifer
7856ac3c19
wined3d: Use & instead of && for bit test in IWineD3DDeviceImpl_CreateSurface().
2009-06-08 14:28:54 +02:00
Henri Verbeet
a2244051ef
wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments.
2009-06-08 12:44:22 +02:00
Henri Verbeet
97f320a77b
wined3d: Introduce volumetexture_init() to handle most of the volume texture initialization.
2009-06-03 11:39:16 +02:00
Henri Verbeet
b0ba731bd5
wined3d: Introduce cubetexture_init() to handle most of the cube texture initialization.
2009-06-03 11:39:04 +02:00
Henri Verbeet
5171a65d81
wined3d: Introduce texture_init() to handle most of the 2D texture initialization.
2009-06-03 11:38:50 +02:00
Henri Verbeet
451a416fcf
wined3d: Call resource_init() from basetexture_init().
2009-06-02 11:57:22 +02:00
Henri Verbeet
5654544725
wined3d: Add device resources from resource_init().
...
This is consistent with removing them from resource_cleanup().
2009-05-29 11:26:44 +02:00
Henri Verbeet
5e0f541621
wined3d: Remove ResourceReleased() from the public device interface.
2009-05-29 11:26:38 +02:00
Henri Verbeet
13a05caa97
wined3d: Remove the "declaration" parameter to IWineD3DDeviceImpl_CreateVertexShader().
...
Once upon a time this was used for creating fake vertex shader
attribute semantics for d3d8 shaders. We don't need this anymore since
device_stream_info_from_declaration() will use the vertex
declaration's output slot to load the data, if present. That also
avoids the potentially expensive matching of attribute semantics
between vertex shader and declaration for d3d8.
2009-05-28 12:42:18 +02:00
Henri Verbeet
f0e303b0f2
wined3d: Add the output signature to IWineD3DDevice_CreateVertexShader().
2009-05-26 13:49:55 +02:00
Henri Verbeet
1d7845dd33
wined3d: Pass a proper format desc to resource_init() in IWineD3DDeviceImpl_CreateBuffer().
2009-05-26 13:49:37 +02:00
Henri Verbeet
639b258200
wined3d: Add missing GL locking to IWineD3DDeviceImpl_Uninit3D().
2009-05-14 11:12:52 +02:00
Henri Verbeet
9a579a43b1
wined3d: Use the output signature to map SM4 pixel shader outputs to the appropriate register.
2009-05-11 12:43:00 +02:00
Henri Verbeet
2a5a6a3439
wined3d: Store the SM 1-3 opcode information tables in the SM 1-3 frontend.
2009-05-05 11:34:28 +02:00
Henri Verbeet
8d4c90496f
wined3d: Store the sampler type in struct shader_reg_maps.
...
Instead of the usage token.
2009-04-29 13:08:01 +02:00
Stefan Dösinger
3dc55010ea
wined3d: Fix a few more direct buffer accesses.
2009-04-28 13:10:02 +02:00
David Adam
33eb939390
wined3d: SetDepthStencilSurface is always called when AutoDepthStencil is enabled.
2009-04-24 11:51:27 +02:00
Henri Verbeet
6f33b97c94
wined3d: Get rid of the shared_handle parameter.
...
I don't expect us to support this in the near future, and right now it's just
dead code.
2009-04-23 14:22:06 +02:00
Stefan Dösinger
754b5cf2ad
wined3d: Deal with reserved shader constants in the backend.
...
This moves the GLSL and ARB specific reserved constants out of directx.c into
the get_caps methods of the shader backends. That way the number of reserved
constants remains in the backend.
GL_LIMITS({v/p}shader_constantsF) now contains the real number of constants as
advertised by GL instead of some mixture of GL info and backend implementation
specifics. This makes it easier for backends to decide how many constants to
use.
2009-04-10 11:22:55 +02:00
Stefan Dösinger
99d88c15ea
wined3d: Fix the drawRectPatch vertex count.
...
DrawPrimitive now accepts the number of vertices, not the number of
primitives. This code was forgotten in the patch that changed this.
We're drawing triangles, so we are drawing num_primitives * 3 vertices.
2009-04-10 11:14:45 +02:00
Stefan Dösinger
014c4bfc70
wined3d: Save some memory in vertex buffers.
...
In most cases we're fine with the vbo and glMapBuffer and never use the actual
heap memory copy. Try to stick to just the vbo copy and avoid allocating the
extra heap memory. In case it is needed(emulation or vertex conversion), fall
back to the old double buffering mode.
2009-04-10 11:14:32 +02:00
Stefan Dösinger
cb1c9dcda9
d3d: Remove the format from index buffers.
2009-04-09 16:28:25 +02:00
Stefan Dösinger
f0efa97413
wined3d: Remove the buffer fvf.
2009-04-09 16:28:10 +02:00
Henri Verbeet
877e252681
wined3d: Only update the swizzle and use map for streams that are actually used in device_stream_info_from_strided().
...
This fixes a regression introduced by d7c7c76850
and exposed by ef2d704183
. Unfortunately having
EXT_vertex_array_bgra support masks the problem, which is why the regression
tests didn't catch it.
2009-04-09 11:27:10 +02:00
Stefan Dösinger
513a493f00
wined3d: Merge IWineD3DIndexBuffer and IWineD3DBuffer.
2009-04-08 11:37:29 +02:00
Stefan Dösinger
2a7a237170
wined3d: Merge indexbuffer and buffer implementations.
2009-04-08 11:37:24 +02:00