Commit Graph

822 Commits

Author SHA1 Message Date
H. Verbeet 7f741f0414 wined3d: Use rev_tex_unit_map instead of assuming there's a 1:1 mapping between samplers and texture units. 2008-07-16 17:54:41 +02:00
Stefan Dösinger e7733eacb7 wined3d: Remove the atifs shader backend.
Since atifs is only doing the fragment pipeline replacement right now
there is no need for the shader backend structure any longer. The ffp
private data is stored in new fragment pipeline private data(which
could potentially be set to equal the shader private data if needed).
2008-07-14 11:43:09 +02:00
H. Verbeet 6129e92e99 wined3d: Destroy the shader backend after the stateblock.
Destroying the stateblock potentially references the shader backend.
If the stateblock has active shaders when it is released, the shader's
destructor will tell the shader backend to destroy the corresponding
resources. This was exposed by my patch that moved the glsl program
lookup table into the backend's private data.
2008-07-11 13:58:13 +02:00
H. Verbeet 54ae3ebfd4 wined3d: Destroy depth_blt resources in the backend's destructor.
No need to expose this in the interface.
2008-07-10 12:17:06 +02:00
H. Verbeet a85a5ffb1b wined3d: Store the glsl program lookup table in the backend's private data. 2008-07-09 10:42:57 +02:00
Stefan Dösinger 98faed8ff5 wined3d: Start the state splitup.
The idea of this patchset is to split the monolithic state set into 3
parts, vertex processing, fragment processing and other states(depth,
stencil, scissor, ...). The states will be provided in templates which
can be (mostly) independently combined, and are merged into a single
state table at device creation time. This way we retain the advantages
of the single state table and having the advantage of separated
pipeline implementations which can be combined without any manually
written glue code.
2008-07-08 10:45:56 +02:00
Stefan Dösinger 9be8f36c2e wined3d: Correct an off-by-one error in constant dirtification.
Constant numbers start at 0, and the loading loop has a for(i; i <
dirtyconsts; i++). This means that the highest dirty constant isn't
loaded correctly. Rather than replacing the < with <=, which would
make it impossible to have no dirty constant, add 1 to the dirty
constant counter.
2008-07-07 12:33:41 +02:00
H. Verbeet 4f77c29bcf wined3d: Track depth stencil location per-surface.
This gets rid of depth_copy_state in the device, and instead tracks
the most up to date location per-surface. This makes things a lot
easier to follow, and allows us to make a copy when switching depth
stencils in SetDepthStencilSurface().
2008-07-03 11:50:52 +02:00
H. Verbeet e7d0ef72ba wined3d: Use dst_fbo to do the depth blit.
This makes the depth copy independent of the currently attached render
targets. This is important for the next patch because it might do a
depth copy when the render targets aren't in a valid configuration
(SetDepthStencilSurface()).
2008-07-03 11:50:51 +02:00
H. Verbeet 22421b8476 wined3d: Make sure the FBO doesn't have any depth attachments in color_fill_fbo() and stretch_rect_fbo().
Currently this is already true, but the next patch will break that assumption.
2008-07-03 11:50:51 +02:00
Stefan Dösinger 8d930f6009 wined3d: Restore the gamma when destroying the swapchain. 2008-07-02 12:27:05 +02:00
Stefan Dösinger 2d4d18b59d wined3d: Delay render target activation.
The ActivateContext in SetRenderTarget was an old regression prevention,
but now it is time to remove it.
2008-07-02 12:25:12 +02:00
Stefan Dösinger c4eae160d7 wined3d: RENDERTARGET | AUTOGENMIPMAP are compatible.
The test used D3DPOOL_MANAGED which is mutually exclusive with
RENDERTARGET usage, thus the call failed.
2008-07-02 12:24:12 +02:00
H. Verbeet d5a8875b93 wined3d: Extract an attach_depth_stencil_fbo() function.
The idea is to make setting depth attachments a bit more consistent
with set_render_target_fbo()/attach_surface_fbo(). I've also got an
upcoming patch in my tree that needs this.
2008-07-02 11:37:31 +02:00
H. Verbeet a1a14fb2c3 wined3d: Get rid of a redundant local variable. 2008-07-02 11:37:25 +02:00
H. Verbeet 90b7efe2c4 wined3d: Delete depth_blt_texture on IWineD3DDeviceImpl_Uninit3D(). 2008-06-27 11:10:11 +02:00
H. Verbeet 35bdc00479 wined3d: Set the surface location to SFLAG_INSYSMEM for depth stencils on Reset. 2008-06-03 11:11:44 +02:00
Francois Gouget 42a61d7ed7 Assorted spelling fixes. 2008-05-06 16:10:20 +02:00
Andrew Talbot 0de14c37e5 wined3d: Remove unused variables. 2008-04-30 10:25:47 +02:00
Stefan Dösinger 1c9f1f8ddd wined3d: Support framebuffer reading from texture_rectangle sources. 2008-04-24 11:43:18 +02:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
David Adam 7df193676e wined3d: Fix a possible null dereference. 2008-04-21 16:54:00 +02:00
Chris Robinson fd823fc2d2 wined3d: Check for NULL vertex declarations. 2008-04-09 12:17:35 +02:00
Stefan Dösinger 481bcdfe2a wined3d: Disable MAG filters on formats that do not support them. 2008-04-09 11:53:35 +02:00
Stefan Dösinger 0cbd08b2b9 wined3d: Disable texture filtering on textures that do not support it.
OpenGL always offers filtering on all formats, and if the hardware
doesn't support it the driver falls back to software. Direct3D on the
other hand silently disables filtering, so that's what we should do too.
2008-04-09 11:48:13 +02:00
Stefan Dösinger 4bb54a1ab7 wined3d: Make the min mip lookup type a texture property. 2008-04-09 11:47:58 +02:00
Stefan Dösinger 67e0943ba3 wined3d: Store the number of aux buffers in the context. 2008-04-09 11:47:24 +02:00
Stefan Dösinger df2b1bea63 wined3d: Mark the SYSMEM copy outdated after releasing memory.
Strictly speaking this is redundant because the UnLoad before did the
job, but if we mess with the allocated memory we have to tell the
surface about that. Updating INDRAWABLE will automatically mark SYSMEM
outdated.
2008-04-08 11:59:46 +02:00
Rico Schüller 73d98ccd4e wined3d: Filter out invalid stuff in SetStreamSourceFreq(). 2008-04-07 21:19:57 +02:00
Alexander Dorofeyev 71ca80355d wined3d: move ENTER_GL in IWineD3DDeviceImpl_Init3D. 2008-04-07 21:18:28 +02:00
Alexander Dorofeyev 2157c7d76c wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ResourceReleased. 2008-04-07 21:17:37 +02:00
Alexander Dorofeyev a2017f4f21 wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ColorFill. 2008-04-07 21:17:31 +02:00
Alexander Dorofeyev 7c261553d0 wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_Uninit3D. 2008-04-07 21:17:26 +02:00
Francois Gouget 8a18e0e43a Assorted spelling fixes. 2008-04-07 13:36:18 +02:00
Alexander Dorofeyev d6ba069d9e wined3d: Improve detection of device palette change. 2008-04-03 11:31:57 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger ab86a4e963 wined3d: Catch D3DUSAGE_AUTOGENMIPMAP and D3DUSAGE_RENDERTARGET combos. 2008-04-01 20:31:59 +02:00
Stefan Dösinger a29a229324 wined3d: Refuse 3D initialization without opengl. 2008-04-01 20:31:44 +02:00
Stefan Dösinger f761b90801 wined3d: Free heapMemory, not allocatedMemory when adjusting the surface. 2008-03-27 11:19:05 +01:00
Alexander Dorofeyev 165970992a wined3d: Make device palettes dynamically allocated. 2008-03-27 11:09:06 +01:00
Stefan Dösinger 28fdebe404 wined3d: Alloc / free shader private data and blt stuff in Init3D/Uninit3D. 2008-03-25 19:48:24 +01:00
Stefan Dösinger ac57b4e2f5 wined3d: Free shader private data on reset.
Since the shader backend implementations might track opengl resources in
their private data inform them about reset calls. For example, the atifs
backend keeps track of the replacement shaders, which are lost during an
opengl context recreation.
2008-03-25 19:48:14 +01:00
Stefan Dösinger 84258723f9 wined3d: Make the state table a property of the shader backend. 2008-03-25 19:35:32 +01:00
Andrew Talbot 19c105c79c wined3d: Assign to structs instead of using memcpy. 2008-03-21 11:24:05 +01:00
Stefan Dösinger c5117dab68 wined3d: Set the fullscreen flag before the display Mode. 2008-03-11 12:11:52 +01:00
Stefan Dösinger c81b114269 wined3d: Only restore the style and exStyle when it is untouched. 2008-03-11 12:11:52 +01:00
Stefan Dösinger a9fb81b2ed wined3d: Only adjust windows in fullscreen mode to the screen. 2008-03-11 12:11:52 +01:00
Stefan Dösinger 107e80a79c wined3d: Implement a different constant dirtification algorithm.
Add a new property of the shader backend which indicates whether the
shader backend is able to dirtify single constants rather than
dirtifying vshader and pshader constants as a whole. Depending on this
a different Set*ConstantF implementation is used which marks constants
dirty. The ARB shader backend uses this and marks constants clean
after uploading.
2008-03-04 12:15:16 +01:00
Stefan Dösinger 32be503c62 wined3d: Give occlusion queries their own vtable. 2008-03-03 11:58:10 +01:00
Stefan Dösinger 071d4afb2b wined3d: Subclass queries. 2008-03-03 11:57:59 +01:00