Commit Graph

2606 Commits

Author SHA1 Message Date
Henri Verbeet d95ae08ad4 wined3d: Get rid of the wantsDepthStencilBuffer in IWineD3DSwapChainImpl. 2008-09-23 12:25:04 +02:00
Roderick Colenbrander 0362ee3d16 wined3d: UpdateSurface should take into account the offset from the source rectangle. 2008-09-22 13:19:57 +02:00
Roderick Colenbrander c13b3f6179 wined3d: Re-add a comment which got lost. 2008-09-22 12:20:42 +02:00
Henri Verbeet f84680e66c wined3d: Don't try to draw with unsupported attribute data types. 2008-09-22 12:20:34 +02:00
Henri Verbeet 3862347bce wined3d: Fix a memory leak. 2008-09-22 12:20:28 +02:00
Henri Verbeet 76de76e508 wined3d: Destroy FBO entries in the context. 2008-09-22 12:20:24 +02:00
Henri Verbeet 459673da1a wined3d: Make sure update_minfilter and update_magfilter are initialized. 2008-09-22 12:20:18 +02:00
Stefan Dösinger 2e6717ab79 wined3d: Initialize standalone surface parameters. 2008-09-22 12:20:13 +02:00
Allan Tong 43f2ec33bf wined3d: Fix Geforce9 detection. 2008-09-19 12:09:57 +02:00
Henri Verbeet 45820046e8 wined3d: Create a FBO for each combination of render targets and depth stencil.
The main reason for this change is crappy performance for reconfiguring FBOs.
2008-09-19 11:30:00 +02:00
Henri Verbeet 3a8ab00fe1 wined3d: Get rid of context_set_depth_stencil_fbo().
Integrate clearing the depth stencil attachment in context_attach_depth_stencil_fbo().
2008-09-19 11:29:48 +02:00
Henri Verbeet 8f2ed870f1 wined3d: Get rid of context_set_render_target_fbo().
Integrate clearing the attachment in context_attach_surface_fbo().
2008-09-19 11:29:39 +02:00
Henri Verbeet 734b31e00b wined3d: Handle drawbuffers in context_apply_fbo_state() instead of context_set_render_target_fbo(). 2008-09-19 11:29:27 +02:00
Henri Verbeet 9533a5cbbf wined3d: Split off a function for applying an attachment's filter states. 2008-09-19 11:29:18 +02:00
Henri Verbeet a269236649 wined3d: Move FBO handling functions to context.c. 2008-09-19 11:29:13 +02:00
Henri Verbeet 9e3b9f8b41 wined3d: Add a checkGLcall() at the end of loadTexCoords().
To prevent GL errors in loadTexCoords from showing up in different state handlers
2008-09-17 20:50:04 +02:00
Henri Verbeet 9e955d3a28 wined3d: Make the debug channels more consistent. 2008-09-17 20:49:57 +02:00
Henri Verbeet 728932f2eb wined3d: Don't needlessly bind the texture in PreLoad(). 2008-09-17 20:49:47 +02:00
Henri Verbeet 17330c03de wined3d: Don't assume the texture is bound in IWineD3DVolumeImpl_LoadTexture(). 2008-09-17 20:49:42 +02:00
Henri Verbeet 99981f2604 wined3d: Remove some assumptions that PreLoad() will always bind the texture. 2008-09-17 20:49:38 +02:00
Henri Verbeet 53a7951230 wined3d: Clarify a comment. 2008-09-17 20:49:33 +02:00
Henri Verbeet 147ec1a1a4 wined3d: Use the internal format for renderbuffer storage.
Note that using GL_DEPTH_COMPONENT instead of eg. GL_DEPTH_COMPONENT24
will work, but will create a renderbuffer with the format of the
onscreen depth buffer.
2008-09-16 22:34:03 +02:00
Henri Verbeet ad658c22b8 wined3d: IWineD3DCubeTextureImpl implements IID_IWineD3DCubeTexture, not IID_IWineD3DTexture. 2008-09-16 22:33:54 +02:00
Henri Verbeet 047e42da08 wined3d: Improve a TRACE. 2008-09-16 22:33:46 +02:00
Henri Verbeet ee49230cd2 Make some ARB program structs and functions private to the backend. 2008-09-16 22:33:42 +02:00
Henri Verbeet c2178eb64f wined3d: Make some GLSL structs and functions private to the backend. 2008-09-16 22:33:35 +02:00
Roderick Colenbrander e3e113383e wined3d: Degrade an ERR to a TRACE. 2008-09-15 11:29:20 +02:00
Tobias Jakobi 36cf25b598 wined3d: Fix long int warnings. 2008-09-12 13:33:00 +02:00
Tobias Jakobi 6e1194f06e wined3d: Fix SHOW_FRAME_MAKEUP debug dump code. 2008-09-12 13:30:02 +02:00
Stefan Dösinger ae7572217d wined3d: Some ARB code fixes. 2008-09-11 11:43:34 +02:00
Stefan Dösinger 035729ab97 wined3d: Don't disable arbfp if the pipeline replacement is in. 2008-09-11 11:43:30 +02:00
Henri Verbeet d51ea01159 wined3d: Reset the auto depth stencil. 2008-09-10 12:05:31 +02:00
Henri Verbeet 4987ffff1f wined3d: Correct a comment. 2008-09-10 12:03:48 +02:00
Henri Verbeet 27b8f719ca wined3d: Fix the half pixel offset.
Turns out the original fix was correct for fixed function, but for the
wrong reason. The shader path was already correct. This fixes a
regresssion introduced by 932e95c111.
2008-09-10 12:03:42 +02:00
Henri Verbeet 932e95c111 wined3d: Translate one pixel down after flipping for offscreen rendering. 2008-09-08 14:09:29 +02:00
Jeff Zaroyko 6a14bcc824 wined3d: Add missing HeapFree. 2008-09-08 12:31:43 +02:00
Francois Gouget e1797b530d wined3d: Remove spaces before '\n' in Wine traces. 2008-09-05 13:39:08 +02:00
Stefan Dösinger fe64fe5ef8 wined3d: Fix uploading higher transform matrices. 2008-09-05 11:23:30 +02:00
Stefan Dösinger 271f56c9f1 wined3d: Close a pshader on-off switching loophole. 2008-09-05 11:23:19 +02:00
Stefan Dösinger c36e033856 wined3d: Fix the pixelformat selection logic. 2008-09-05 11:23:09 +02:00
Stefan Dösinger 421b6558c1 wined3d: Pack the ffp_desc structure better. 2008-09-05 11:22:55 +02:00
Henri Verbeet 81effcf30d wined3d: Set the viewport to the texture size in depth_blt(). 2008-09-05 10:50:55 +02:00
Stefan Dösinger da1030f36c wined3d: Compressed surface sizes are multiples of 4.
Since those surfaces are stored in blocks, the 4 pixel step doesn't only apply to surfaces < 4, but
also to surfaces bigger than that, with a non-multiple-of-4 size.
2008-09-04 12:44:00 +02:00
Alexander Dorofeyev 78312704d9 wined3d: Remove obsolete code & ModifyLocation TODO.
This fbo logic appears to have already been implemented in ModifyLocation.
2008-09-04 12:29:57 +02:00
Alexander Dorofeyev 1bcd6e4508 wined3d: Get rid of gl buffer variable in BltOverride.
Uses This == dstSwapchain->frontBuffer instead as suggested by Henri Verbeet.
2008-09-04 12:29:50 +02:00
Alexander Dorofeyev 7c38816819 wined3d: Remove glDrawBuffer calls in BltOverride.
Handled in ActivateContext, must be remains of pre-context management code.
2008-09-04 12:29:42 +02:00
Alexander Dorofeyev 5c7f2906ee wined3d: Make the condition to enter p8 conversion shader path more strict.
This prevents shader path from being entered for an offscreen surface
when there is p8 render target and fixes failures in ddraw visual test
(with opengl rendering and RTL_READDRAW mode) and visual glitches in
Red Alert.
2008-09-04 12:29:35 +02:00
Rico Schüller 525e30e6b7 wined3d/d3d9: Set the initial scissorrect to the dimesions of the backbuffer from the first swapchain of the device. 2008-09-04 12:26:59 +02:00
Henri Verbeet 615f75faec wined3d: IWineD3DSurface_PreLoad() doesn't do an implicit glBindTexture() anymore.
This was exposed by moving texture id generation from Preload() to BindTexture().
2008-09-04 11:15:33 +02:00
Henri Verbeet 632102cd14 wined3d: Correct a TRACE and remove an incorrect comment. 2008-09-04 11:15:24 +02:00
Henri Verbeet 4b354e8e62 wined3d: Fix a variable name inside a VTRACE. 2008-09-04 11:15:17 +02:00
Henri Verbeet 5fd7a59e70 wined3d: Use the correct representative for texture transform states. 2008-09-04 11:15:09 +02:00
Henri Verbeet d37c6fc0a9 wined3d: Depth stencil tracking depends on the value of This->render_offscreen. 2008-09-04 11:15:01 +02:00
Henri Verbeet 4b6887b8e3 wined3d: Be more careful when deleting FBOs.
Clear all attachments before deleting FBOs. It should be valid to
delete FBOs that still have attachments, but for some reason the
nvidia drivers don't like it. The resulting memory corruption can be
pretty nasty, and this workaround seems clean enough.
2008-09-04 11:14:53 +02:00
Alexander Dorofeyev e13d0efb01 wined3d: Remove glFlush in RealizePalette.
glFlush was added to surface_blt_to_drawable some time ago, which is a
more general fix and makes this one superfluous.
2008-09-03 13:14:52 +02:00
Alexander Dorofeyev 379f400990 wined3d: Add glFlush when clearing the front buffer in ClearSurface. 2008-09-03 13:14:52 +02:00
Stefan Dösinger ab74030ec5 wined3d: Optimize the projected bump map handling. 2008-09-02 14:56:57 +02:00
Stefan Dösinger d5f05c59c7 ddraw: Beware of the surface type when checking for format support. 2008-09-02 14:56:26 +02:00
Stefan Dösinger d60ece20b5 wined3d: Implement secondary color in the arbfp ffp pipeline. 2008-09-02 14:56:15 +02:00
Stefan Dösinger 8b1727ae62 wined3d: Report incorrect filtering settings in ValidateDevice. 2008-09-02 14:56:06 +02:00
Stefan Dösinger 422eebd2c3 wined3d: BLENDTEXTUREALPHAPM reads the texture. 2008-09-02 14:55:57 +02:00
Stefan Dösinger 3b48660f43 wined3d: Implement YV12 support for emulated overlays.
This is the prefered format of many codecs, and for some codecs this
is the only supported output format. As usual I try to handle all the
conversion in the GPU and keep the CPU involvement minimal to gain the
full performance of PBO transfers.
2008-09-02 14:55:50 +02:00
Francois Gouget 9c63e186c6 wined3d: Add a '\n' to Wine traces. 2008-09-02 13:59:11 +02:00
Francois Gouget 4823b2c7bf Assorted spelling fixes. 2008-09-02 13:58:21 +02:00
Henri Verbeet b4f43e372e wined3d: Remove useless hash_table_t typedef. 2008-08-29 12:26:55 +02:00
Stefan Dösinger af8d268a39 wined3d: Handle projected textures properly in arbfp and atifs.
GL_ARB_fragment_program and GL_ATI_fragment_shader can disable
projected textures properly, and they can also handle
D3DTTFF_PROJECTED | D3DTTFF_COUNT3 properly.
2008-08-28 11:24:49 +02:00
Stefan Dösinger ec4955630e wined3d: Silence some format spam. 2008-08-28 11:24:49 +02:00
Stefan Dösinger acc893c5cf wined3d: Handle projected+bump mapped textures in atifs. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 4635315655 wined3d: Replace a #if 0 with if(0). 2008-08-28 11:24:49 +02:00
Stefan Dösinger a580325a47 wined3d: Remove some more junk code. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 750973cec5 wined3d: Remove BaseTexture::UnBindTexture. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 005e5e868e wined3d: Replace an #if 0 with if(0). 2008-08-28 11:24:49 +02:00
Stefan Dösinger 462ddaa254 wined3d: Make the texture stage mapping nvrc independent. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 0e2713a1e1 wined3d: Remove unneeded code.
The fixed function backend disables the extension. Also messing
with the final combiner shouldn't be needed if nvrc is disabled.
2008-08-27 13:21:24 +02:00
Stefan Dösinger a674ae71ae wined3d: Remove dead code. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 43fe6b0bcf wined3d: Remove some junk. 2008-08-27 13:21:24 +02:00
Stefan Dösinger dda59e361c wined3d: Update the arbfp shader on a texturetransformflags change. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 8f20b882bb wined3d: Handle texture transforms in the TEXTURETRANSFORMFLAGS state.
This is a nop by itself, but it makes it easier for fragment pipelines
to read WINED3DTSS_TEXTURETRANSFORMFLAGS.
2008-08-27 13:21:24 +02:00
Stefan Dösinger 8dcc6b66dc wined3d: Clean up the texbeml parameter forward.
There's no point in separating scale and luminance since they're
uploaded at the same time. We still want to separate the stages
though.
2008-08-27 13:21:24 +02:00
Stefan Dösinger b294e43206 wined3d: D3DTOP_DOTPRODUCT3 colorop overrides the alphaop.
Note that the fix is only implemented in the arbfp and atifs fragment
pipeline. Unfortunately nvrc doesn't support dot3 as alpha operation.
2008-08-27 13:21:24 +02:00
Stefan Dösinger 97b57931d0 wined3d: Advertise a few line caps. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 6bbcc5050b wined3d: Disable D3DFMT_R3G3B2. 2008-08-27 13:21:23 +02:00
Stefan Dösinger 9b94c0abb9 wined3d: Make the alphaop == colorop matching a bit smarter. 2008-08-26 12:07:41 +02:00
Stefan Dösinger 4767be8cde wined3d: The final luminance factor is clamped. 2008-08-26 12:07:41 +02:00
Stefan Dösinger f8ead75566 wined3d: Declare the texture factor when D3DTOP_BLENDFACTORALPHA is used. 2008-08-26 12:07:41 +02:00
Stefan Dösinger 9a6bc683e1 wined3d: Use the correct texture limit.
We have to use the texture limit of the fragment pipeline in use here,
not the fixed function GL texture limit.
2008-08-26 12:07:41 +02:00
Stefan Dösinger 8fc2cfe432 wined3d: Fix projected bump mapping. 2008-08-26 12:07:41 +02:00
Stefan Dösinger 6c6a6a2e61 wined3d: Implement D3DTA_ALPHAREPLICATE in arbfp and atifs.
Also adds a simple test for this. In the fixed function and nvrc/nvts
code this already works properly.
2008-08-26 12:07:41 +02:00
Stefan Dösinger 6c12b81552 wined3d: Implement D3DTOP_BUMPENVMAPLUMINANCE. 2008-08-26 12:07:41 +02:00
Stefan Dösinger e8b9f167d6 wined3d: Fix the texcoord size mask.
There is room for 8 texture coordinates, not just 4.
2008-08-26 12:07:41 +02:00
Stefan Dösinger e110f2c680 wined3d: Don't retry less strict formats if a match was found. 2008-08-25 12:26:26 +02:00
Stefan Dösinger 61a900fdfc wined3d: Fix the drawStridedSlow callback function calling convention.
Since some of those function pointers are direct GL functions the function
prototype needs the WINE_GLAPI calling convention. This makes prevents
drawStridedSlow from crashing with USE_WIN32_OPENGL.
2008-08-25 12:26:17 +02:00
Stefan Dösinger ec633bf789 wined3d: Disable D3DFMT_A2W10V10U10. 2008-08-25 12:25:33 +02:00
Stefan Dösinger 1043a04673 wined3d: Disable D3DFMT_A4L4. 2008-08-25 12:25:23 +02:00
Stefan Dösinger f39e122477 wined3d: Add fixed function sRGB write correction. 2008-08-25 12:25:13 +02:00
Stefan Dösinger 6c87a66355 wined3d: Get a GL context before creating a PBO. 2008-08-25 12:24:43 +02:00
Stefan Dösinger ba58adaaf6 wined3d: Remove a few texture initializations.
This is done by LoadLocation now.
2008-08-25 12:24:33 +02:00
Stefan Dösinger f0f32912a6 wined3d: Make sure the pixel shader is compiled.
If we're heading out of the pixelshader handler early, and a pixel
shader is in use, the pixel shader may not be compiled. The vertex
shader handler then checks if the pixel shader is dirty, and calls the
shader backend to apply the shader if it isn't.  Thus, in the case of
GLSL, the shader code could attempt to link an uncompiled shader into
the program. This isn't much of a problem because when the fog is
applied, the pixel shader is compiled and the program re-linked.
2008-08-25 12:24:24 +02:00
Stefan Dösinger 5b77a2f90b wined3d: Override the default filter of conditional np2 textures. 2008-08-25 12:24:06 +02:00
Chris Robinson 9f82368908 wined3d: Use the proper internal type for some formats. 2008-08-25 12:23:00 +02:00