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
1c7f39ed1e
wined3d: Use CTXUSAGE_RESOURCELOAD for fb->texture reads.
...
There is no need for _BLIT usage. RESOURCELOAD should be faster.
2008-07-02 12:24:54 +02:00
Stefan Dösinger
74c5684f90
wined3d: Update the blit ortho on size changes.
...
SetupForBlit sets up the GL viewport and projection matrix for
screen-cordinate access to the framebuffer. These settings were not
updated if the other gl states were already set up for blitting. Guild
Wars reads back an offscreen rendered texture from the framebuffer,
which currently sets up CTXUSAGE_BLIT, then changes the render target,
and draws to the texture, which has to be reloaded from system memory
before it can be rendered to(since GW loaded some data into it). If the
two render targets had different size this failed.
2008-07-02 12:24:35 +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
d76de4eede
wined3d: Specify the GLSL language version our shaders are written to.
...
This prevents some driver warnings when using language features from
1.20, like "first class arrays".
2008-07-01 12:26:05 +02:00
H. Verbeet
d5cbb8375e
wined3d: Use ModifyLocation() to force a reload on color key change.
...
Just unsetting SFLAG_INTEXTURE doesn't work for FBOs because the
drawable and texture are the same there (and ModifyLocation() is the
correct way to do this anyway). Fixes another ddraw test failure with
FBO ORM.
2008-07-01 12:25:54 +02:00
H. Verbeet
8d6dc9daa7
wined3d: Move setting a palette up a couple of lines in BltOverride().
...
This prevents a few failures in the ddraw tests when using FBOs due to
using P8 surfaces without a palette set.
2008-06-30 12:47:34 +02:00
H. Verbeet
469e791f00
wined3d: Invert "upsidedown" in fb_copy_to_texture_direct() and fb_copy_to_texture_hwstretch() rather than BltOverride().
...
This inversion is specific to the blit implementation being used,
stretch_rect_fbo() doesn't need it.
2008-06-30 12:47:25 +02:00
H. Verbeet
90b7efe2c4
wined3d: Delete depth_blt_texture on IWineD3DDeviceImpl_Uninit3D().
2008-06-27 11:10:11 +02:00
H. Verbeet
ad59eaf998
wined3d: Report WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING.
...
As far as I can tell we support post ps blending in combination with
MRTs fine. Tabula Rasa needs this cap in order to enable some of the
higher graphics settings.
2008-06-27 11:10:04 +02:00
Francois Gouget
756b401f8d
wined3d: Add a trailing '\n' to a couple of shader_addline() calls.
2008-06-26 21:08:35 +02:00
H. Verbeet
c433562a68
wined3d: Explicitly enable depth buffer writing in depth_blt().
...
This prevents conflicts with WINED3DRS_ZWRITEENABLE.
2008-06-25 10:43:08 +02:00
H. Verbeet
ebcb5f23a1
wined3d: Half float formats need ARB_TEXTURE_FLOAT as well.
...
Currently we only check if ARB_HALF_FLOAT_PIXEL is supported. This is
not enough, we need ARB_TEXTURE_FLOAT as well. This fixes some errors
when running the d3d9 visual test with Mesa swrast.
2008-06-23 12:55:08 +02:00
H. Verbeet
02a2ba9d2f
wined3d: Report post pixelshader blending on WINED3DFMT_A16B16G16R16F.
2008-06-23 12:55:02 +02:00
Roderick Colenbrander
ee3bbccf6e
wined3d: Update the Nvidia driver version to 173.41 and also put it in the right format e.g. 7.15.11.7341 instead of 7.15.10.17341.
2008-06-23 12:53:45 +02:00
H. Verbeet
e081d69bc1
wined3d: Report WINED3DFMT_FLAG_FILTERING on WINED3DFMT_D24X8.
...
We report this for WINED3DFMT_D24S8, so there should be no reason
WINED3DFMT_D24X8 can't do it. Fixes a regression in 3DMark06.
2008-06-20 11:20:05 +02:00
H. Verbeet
c835b00a36
wined3d: Handle depth formats like any other format in CheckDeviceFormat.
...
Currently depth formats are handled separately from the other formats,
but depth formats can support things like filtering as well, so we
should check those caps as well.
2008-06-20 11:19:58 +02:00
H. Verbeet
a6fa6a4a31
wined3d: Use gl_Color and gl_SecondaryColor to support more varyings in SM3.0 shaders.
...
SM3.0 requires 10 4 component float varyings for passing stuff between
vertex and pixel shaders. GF7 and earlier report 8 generic varyings +
gl_Color and gl_SecondaryColor in GLSL. This patch allows us to use
gl_Color and gl_SecondaryColor to get 2 extra varyings, which some
games, like C&C3 with highest gfx settings, require.
2008-06-19 11:47:52 +02:00
H. Verbeet
4a4ab5f2ae
wined3d: Add support for ARB_color_buffer_float.
2008-06-19 11:47:34 +02:00
Roderick Colenbrander
88b4f29222
wined3d: Add a Geforce9 driver version (right now garbage is returned).
2008-06-18 15:21:56 +02:00
Stefan Dösinger
535e61892c
wined3d: Only read back offscreen targets on a target change.
...
This avoids calling PreLoad needlessly on a thread change during offscreen
rendering and breaks up the endless recursion due to lastTID != newTID.
2008-06-13 10:15:48 +02:00
Stefan Dösinger
78d963039b
wined3d: Do not PreLoad the new render target.
...
There is no reason to do that, now that the SetGLTextureDesc bug is
fixed. This avoids an infinite recursion because PreLoad calls
ActivateContext at some point.
2008-06-13 10:15:26 +02:00
Stefan Dösinger
6ab3d17104
wined3d: Remove a broken AddDirtyRect call.
2008-06-13 10:15:02 +02:00
Roderick Colenbrander
b73b2eca47
wined3d: Update ATI GPUs.
2008-06-09 12:40:22 +02:00
Roderick Colenbrander
38a98f6789
wined3d: Update nvidia GPUs.
2008-06-09 12:40:10 +02:00
Stefan Dösinger
2173fde722
wined3d: Avoid float->string conversion in arb shaders.
2008-06-06 10:28:24 +02:00
Roderick Colenbrander
0ca7d443ac
wined3d: Add a WineD3D_ChoosePixelFormat line.
2008-06-03 11:17:27 +02:00
Roderick Colenbrander
042d0394dc
wined3d: Add a registry key to allow/disallow multisampling.
...
Right now it is set to disabled due to an Nvidia GLXBadDrawable
bug. Second there is some issue (driver bug too?) in FBO mode.
2008-06-03 11:17:09 +02:00
Stefan Dösinger
cd7825c893
wined3d: Hardcode local constants with glUniform4fvARB.
2008-06-03 11:13:59 +02:00
Stefan Dösinger
e4413f2012
wined3d: Give local constants a shader type prefix.
2008-06-03 11:13:09 +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
H. Verbeet
3687207a04
wined3d: Fix WINED3DTOP_MULTIPLYADD for ATI cards.
2008-06-03 11:11:30 +02:00
H. Verbeet
8e6c7aaf1f
wined3d: Fix the nvrc implementation of WINED3DTOP_MULTIPLYADD and WINED3DTOP_LERP.
2008-05-27 12:04:22 +02:00
H. Verbeet
e891a9938a
wined3d: Add WINED3DTOP_ADDSIGNED2X to debug_d3dtop().
2008-05-27 12:04:11 +02:00
Andrew Talbot
c58e59f40f
wined3d: Remove unneeded "extern" from function definition.
2008-05-22 11:29:05 +02:00
Roderick Colenbrander
bd5c02e245
wined3d: Request a WGL depth stencil capable pixel format by default until we have proper SetDepthStencilSurface support.
2008-05-19 20:20:35 +02:00
Alexander Dorofeyev
2027b0587d
wined3d: Only copy front buffer to screen in gdi RealizePalette.
2008-05-14 21:51:14 +02:00
Alexander Dorofeyev
a25651138a
wined3d: Activate context for the right target in surface_blt_to_drawable.
2008-05-12 13:27:44 +02:00
Alexander Dorofeyev
e1c60caa42
wined3d: glFlush when updating front buffer.
...
Fixes screen not updating or getting updated inconsistently when apps blit to
front buffer or lock it when RenderTargetLockMode=readtex, as happens in e.g.
Red Alert 2 and also in p8_primary_test in ddraw tests.
2008-05-12 13:27:40 +02:00
Andrew Talbot
aeb3ba2869
wined3d: Remove test for value of unsigned variable being less than zero.
2008-05-12 11:42:17 +02:00
Ben Mayhew
a3f503f876
wined3d: Only display Missing vbo streams fixme once.
2008-05-12 11:41:59 +02:00
Alexander Dorofeyev
b8a5742358
wined3d: Set alpha to index even when there is no palette.
...
Fixes a failure in p8_primary_test when running with opengl ddraw renderer.
2008-05-09 11:20:01 +02:00
Alexander Dorofeyev
6d86e7f861
wined3d: Use source colorkey when passed KEYSRC or KEYSRCOVERRIDE.
...
Fixes failure in p8_primary_test when using opengl ddraw renderer.
2008-05-09 11:19:39 +02:00
Francois Gouget
633ee950a1
Assorted spelling fixes.
2008-05-07 12:07:11 +02:00
Francois Gouget
42a61d7ed7
Assorted spelling fixes.
2008-05-06 16:10:20 +02:00
Roderick Colenbrander
7b5561cbb8
wined3d: Allow stencil support when it wasn't requested on broken drivers.
2008-05-05 21:03:39 +02:00
Roderick Colenbrander
e3b662bb20
wined3d: At the start of RemoveContextFromArray numContexts is decreased by 1, the loop which loops through the whole array doesn't take this into account.
...
Discovered by Peter Oberndorfer.
2008-05-05 12:53:52 +02:00
Roderick Colenbrander
cb0f0af131
wined3d: We don't want double buffering in pbuffer mode.
2008-05-01 18:11:26 +02:00
Roderick Colenbrander
96c770d9bf
wined3d: In window mode (!pbuffer) we want both a window drawable format and double buffering.
2008-05-01 18:11:26 +02:00
Roderick Colenbrander
02bab6edbe
wined3d: Fix typo in pixel format trace.
2008-05-01 18:11:26 +02:00
Alexandre Julliard
dad21bbcbf
makefiles: List the static libraries as normal imports instead of extra libs.
2008-04-30 14:23:55 +02:00
Andrew Talbot
0de14c37e5
wined3d: Remove unused variables.
2008-04-30 10:25:47 +02:00
Roderick Colenbrander
628e4eece3
wined3d: Add multisampling support.
2008-04-30 10:23:25 +02:00
Roderick Colenbrander
4428cc32de
wined3d: Fix a few small bugs in WineD3D_ChoosePixelFormat.
2008-04-29 12:47:07 +02:00
Roderick Colenbrander
34d06a5e96
wined3d: Also use WineD3D_ChoosePixelFormat for pbuffers.
2008-04-28 13:27:51 +02:00
Roderick Colenbrander
a38e5a95ef
wined3d: Let WineD3D_ChoosePixelFormat operate on the pixel format database we store at WineD3D startup.
2008-04-28 13:27:51 +02:00
Roderick Colenbrander
31dc00a073
wined3d: Store more information about pixel formats. This is needed for some WineD3D_ChoosePixelFormat restructuring.
2008-04-28 13:27:51 +02:00
Roderick Colenbrander
ec5400b4f8
wined3d: Split WGL pixel format selection code off from CreateContext.
2008-04-28 13:27:51 +02:00
Stefan Dösinger
663bfb773c
wined3d: Remove an unused variable.
2008-04-24 22:10:08 +02:00
Stefan Dösinger
9b25935757
wined3d: Fix DP2ADD in GLSL.
...
DP2ADD returns a scalar, and fglrx (correctly) complains that it can't
assign that to a 3 component vector.
2008-04-24 22:09:47 +02:00
Stefan Dösinger
dc07ddb531
wined3d: Fix the GL_ATI_separate_stencil codepath.
...
glStencilFuncSeparateATI does not take a face argument, instead it
sets the front and back facing functions at once. This means the
renderstate_stencil_twosided helper function is somewhat pointless for
this extension.
2008-04-24 22:09:36 +02:00
Stefan Dösinger
bcb0f7cc22
wined3d: More fglrx spam.
2008-04-24 22:09:21 +02:00
Roderick Colenbrander
f0307d9366
wgl: Add a wine specific WGL extension which allows you to change the pixel format multiple times.
2008-04-24 12:32:38 +02:00
Stefan Dösinger
9ee7e42de8
wined3d: Call activate_dimensions from the atifs code.
2008-04-24 11:54:28 +02:00
Stefan Dösinger
5d49dea373
d3d9: Add a test for NP2 stretchrect.
2008-04-24 11:43:18 +02:00
Stefan Dösinger
1c9f1f8ddd
wined3d: Support framebuffer reading from texture_rectangle sources.
2008-04-24 11:43:18 +02:00
Stefan Dösinger
e3bd5b6dcd
wined3d: Use the shader backend to enable / disable atifs and nvts.
...
The previous logic assumed that if NVTS or ATIFS are available they
will be used. This happens to be true for NVTS, but ATIFS is only used
if neither ARBFP nor GLSL are supported. This breaks fixed function
fragment processing on ATI r300 and newer cards
2008-04-24 11:37:17 +02:00
Austin English
c531e2abdb
Spelling fixes.
2008-04-23 12:31:07 +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
Alexander Dorofeyev
35979b920a
wined3d: Prevent console spamming in drawPrimitive.
2008-04-21 14:22:42 +02:00
Alexander Dorofeyev
db36665be5
wined3d: Add missing check for p8 primary in surface_download_data.
2008-04-21 14:22:35 +02:00
Roderick Colenbrander
f2753d7189
wined3d: Add palette re-upload support for cards with hardware palette support.
...
Before it was broken and when it worked it was slow due to unneeded
gpu -> cpu -> gpu copying.
2008-04-21 13:36:19 +02:00
Marcus Meissner
8d8b7ffbc7
wined3d: Handle out of array bounds state.
2008-04-17 11:40:39 +02:00
Jörg Höhle
b36d4a1d51
wined3d: Fix missing break inside switch in SetAutoGenFilterType.
2008-04-14 23:50:13 +02:00
Chris Robinson
fd823fc2d2
wined3d: Check for NULL vertex declarations.
2008-04-09 12:17:35 +02:00
Stefan Dösinger
3e5899b38d
d3d9: Some Windows drivers set undefined attributes to 0.0.
2008-04-09 11:55:22 +02:00
Stefan Dösinger
fb8fde81d1
wined3d: Disable blending when clearing.
2008-04-09 11:53:44 +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
a22203adeb
wined3d: Make the mag filter lookup a separate array.
...
This makes it easier to make this a per texture / per adapter property.
Somewhen we should rename the remaining lookup type in the general
lookup table to wraplookup.
2008-04-09 11:48:30 +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
98b56c3ff0
wined3d: Report D3DUSAGE_QUERY_WRAPANDMIP support.
2008-04-09 11:47:49 +02:00
Stefan Dösinger
67e0943ba3
wined3d: Store the number of aux buffers in the context.
2008-04-09 11:47:24 +02:00
Alexander Dorofeyev
7c8b8e0a93
wined3d: Set isInDraw later in drawPrimitive.
...
This should fix the problem that in LoadLocation SFLAG_INTEXTURE path gl calls
can be made without activating context, due to isInDraw checks.
2008-04-08 13:20:34 +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
Stefan Dösinger
0de167db9e
wined3d: Put implicit surfaces into drawable on unload.
...
If we mark the sysmem copy up to date we would have to take care about
allocating it. As explained in the comment, INDRAWABLE is a saner
choice
2008-04-08 11:59:28 +02:00
Rico Schüller
a44da70d63
wined3d: Improve drawStridedInstanced().
2008-04-07 21:20:07 +02:00
Rico Schüller
73d98ccd4e
wined3d: Filter out invalid stuff in SetStreamSourceFreq().
2008-04-07 21:19:57 +02:00
Alexander Dorofeyev
65f9abc88d
wined3d: Move PreLoad to avoid calling it with gl lock held.
2008-04-07 21:18:47 +02:00
Alexander Dorofeyev
7f2257ca55
wined3d: Add device->isInDraw checks in LoadLocation.
...
Prevents calling ActivateContext while holding gl lock, e.g. when preloading
texture in sampler().
2008-04-07 21:18:36 +02:00
Alexander Dorofeyev
71ca80355d
wined3d: move ENTER_GL in IWineD3DDeviceImpl_Init3D.
2008-04-07 21:18:28 +02:00
Alexander Dorofeyev
b949190dcd
wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue.
2008-04-07 21:18:18 +02:00
Alexander Dorofeyev
93fefdf94d
wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_Issue.
2008-04-07 21:18:12 +02:00
Alexander Dorofeyev
84553fd864
wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_GetData.
2008-04-07 21:18:06 +02:00
Alexander Dorofeyev
2711b84601
wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_GetData.
2008-04-07 21:18:00 +02:00