Henri Verbeet
0479fb13b5
wined3d: Explicitly pass the context to drawStridedSlow().
2009-08-07 12:11:10 +02:00
Henri Verbeet
3bf0ad4528
wined3d: Explicitly pass the context to the shader_select() handler.
2009-08-07 12:11:06 +02:00
Stefan Dösinger
c6d3e75482
wined3d: Not all cards support float16 filtering.
2009-08-06 17:26:31 +02:00
Henri Verbeet
4c1b3de936
wined3d: Call the shader_load_np2fixup_constants() handler directly from inside the shader backend.
2009-08-06 17:26:30 +02:00
Henri Verbeet
03686cb6bd
wined3d: Explicitly pass the context to the shader_load_constants() handlers.
2009-08-06 17:26:30 +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
b04e992a65
wined3d: Set the WINED3DTEXF_NONE entry in the minification lookup table to GL_NEAREST.
...
Although WINED3DTEXF_NONE is not a valid minification filter, having it in the
tables simplifies the lookup. GL_NEAREST is more appropriate than GL_LINEAR
though.
2009-08-06 17:26:29 +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
9e8f7898c9
wined3d: Get rid of the ANISOTROPIC entry from the filter lookup tables.
...
Anisotropy and texture filters are orthogonal in GL. In D3D
D3DTEXF_ANISOTROPIC just selects the best (linear) filter type and enables
anisotropy.
2009-08-05 11:20:36 +02:00
Henri Verbeet
62ac872b36
wined3d: Remove a redundant check from basetexture_get_autogen_filter_type().
...
This is already initialized to an appropriate value in basetexture_init().
Also fix the indentation while we're at it.
2009-08-05 11:20:24 +02:00
Henri Verbeet
a86f31658b
wined3d: Move texture filter lookup table initialization to basetexture_init().
2009-08-05 11:20:19 +02:00
Henri Verbeet
351d6de818
wined3d: Add functions to lookup texture filters.
2009-08-05 11:20:09 +02:00
Henri Verbeet
0f161dc10f
wined3d: Remove some unused code.
2009-08-05 11:19:59 +02:00
Stefan Dösinger
2858f67a2a
wined3d: Enable WINED3DFMT_R16G16B16A16_UNORM.
2009-08-05 11:19:46 +02:00
Stefan Dösinger
f3b39d9085
wined3d: Preload the correct texture location.
2009-08-05 11:19:35 +02:00
Stefan Dösinger
f53451ddac
wined3d: Only use WINE_normalized_texrect if ARB_texture_np2 is supported.
2009-08-05 11:19:26 +02:00
Stefan Dösinger
2e9362d0fb
wined3d: ARB clipplane init needs the helper constant.
2009-08-05 11:19:14 +02:00
Henri Verbeet
d4159adbc8
wined3d: Statically initialize the filter lookup tables.
...
Also add some comments.
2009-08-04 13:04:23 +02:00
Henri Verbeet
b30a31e09a
wined3d: Set a more appropriate value for the ANISOTROPIC/NONE min/mip filter.
2009-08-04 13:04:11 +02:00
Henri Verbeet
25fe98e02b
wined3d: Don't disable mipmapping if we lack EXT_texture_filter_anisotropic.
...
These don't have a whole lot to do with each other.
2009-08-04 13:04:05 +02:00
Henri Verbeet
efb78aca64
wined3d: Update the WINED3DSAMP_MAGFILTER state even if we didn't recognize the value.
...
It's a bit pointless to keep printing FIXMEs after the first time.
2009-08-04 13:03:44 +02:00
Henri Verbeet
10906e6b8e
wined3d: Set the initial value of WINED3DTEXSTA_MAXANISOTROPY to 1.
2009-08-04 13:03:40 +02:00
Henri Verbeet
2f3e993e7e
wined3d: Properly calculate GL_TEXTURE_MAX_ANISOTROPY_EXT.
2009-08-04 13:03:34 +02:00
Henri Verbeet
b7812932bc
wined3d: Don't respecify compressed textures in surface_upload_data().
...
Passing NULL to glCompressedTexImage2DARB() doesn't work particularly well
when both client storage and PBOs are enabled. Also, two years is long enough
to give driver developers a chance to fix the bug this was supposed to work
around.
2009-08-03 15:01:55 +02:00
Henri Verbeet
da1e5573da
wined3d: Rename WineD3DContext to struct wined3d_context.
2009-08-03 15:01:48 +02:00
Henri Verbeet
1d647283d5
wined3d: Don't use the GL texture flags to determine if a format is a depth stencil in CheckDepthStencilCapability().
...
The OpenGL implementation might not support ARB_depth_texture, but that
doesn't mean we can't use the format for the depth buffer.
2009-08-03 15:01:34 +02:00
Henri Verbeet
43bfb240ad
wined3d: Use the context's current render target the get the swapchain drawable size.
...
"surface" might point to the frontbuffer while we're rendering to the
backbuffer, etc.
2009-08-03 15:01:25 +02:00
Henri Verbeet
0047c55e86
wined3d: Handle destruction of a context's current render target.
2009-08-03 15:01:18 +02:00
Henri Verbeet
9baf7864c5
wined3d: Return proper NULLs from CreateContext().
2009-07-24 13:11:01 +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
Leonid Lobachev
f6cc091d75
wined3d: Add missing calling convention specifiers.
2009-07-23 13:20:29 +02:00
Henri Verbeet
357ea123d9
wined3d: get_drawable_size() needs a context.
2009-07-23 11:22:25 +02:00
Henri Verbeet
ea2caa9ba1
wined3d: Return the activated context from ActivateContext().
2009-07-23 11:22:22 +02:00
Henri Verbeet
85e2c05e4f
wined3d: Explicitly pass the wined3d context to context_apply_draw_buffer().
2009-07-23 11:22:18 +02:00
Henri Verbeet
9253bbcb05
wined3d: Get rid of last_device.
2009-07-23 11:22:13 +02:00
Henri Verbeet
401e99b0c0
wined3d: Remove some unnecessary code.
...
Now that we don't depend on activeContext and lastActiveRenderTarget to be
non-NULL this code can go.
2009-07-23 11:22:08 +02:00
Henri Verbeet
57ccdb7e36
wined3d: Don't reuse contexts marked for destruction.
2009-07-23 11:22:03 +02:00
Henri Verbeet
e5d621c081
wined3d: Try to reuse the thread's current context in FindContext().
2009-07-22 14:42:51 +02:00
Henri Verbeet
9ceda3a6fd
wined3d: Move some context selection code from ActivateContext() to FindContext().
2009-07-22 14:42:51 +02:00
Henri Verbeet
219d3abdd1
wined3d: Simplify FindContext() a bit.
2009-07-22 14:42:51 +02:00
Henri Verbeet
ce436a76e2
wined3d: Get rid of getActiveContext().
2009-07-22 14:42:50 +02:00
Henri Verbeet
377cda97e7
wined3d: Avoid destroying contexts that are current in another thread.
2009-07-22 14:42:50 +02:00
Henri Verbeet
1a43030664
wined3d: Keep track of a thread's wined3d context.
2009-07-22 14:42:50 +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
223b9d5c01
wined3d: Get rid of lastActiveRenderTarget in FindContext().
2009-07-21 14:22:58 +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
6c0c1671b2
wined3d: Keep track of a context's current render target.
2009-07-21 14:22:49 +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
e6f55c2650
wined3d: Remove an unused struct member.
2009-07-20 13:35:15 +02:00
Henri Verbeet
3a63552fd1
wined3d: Skip some unnecessary FBO binds.
2009-07-20 13:35:11 +02:00
Henri Verbeet
dedd62c0e2
wined3d: Recognize the SM4 log opcode.
2009-07-20 13:35:07 +02:00
Stefan Dösinger
e06997359f
wined3d: Set the highest dirty marker after marking shader constants dirty.
2009-07-20 12:23:14 +02:00
Stefan Dösinger
cd7f43b00d
wined3d: Don't activate a context unless we need one.
2009-07-20 12:23:07 +02:00
Henri Verbeet
a80247f58b
wined3d: Avoid redundant FBO binds.
...
Apparently this is an expensive operation for certain drivers, even if the
binding doesn't actually change.
2009-07-17 11:22:07 +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
a01616a6c3
wined3d: Store a pointer to wined3d_gl_info in struct WineD3DContext.
2009-07-17 11:22:07 +02:00
Henri Verbeet
43e6686a78
wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info.
2009-07-17 11:22:07 +02:00
Henri Verbeet
50f5abcad9
wined3d: Recognize the SM4 dp4 opcode.
2009-07-16 16:03:40 +02:00
Henri Verbeet
03acf9d207
wined3d: Recognize the SM4 dp3 opcode.
2009-07-16 16:03:36 +02:00
Henri Verbeet
7539cd5c85
wined3d: Recognize the SM4 rsq opcode.
2009-07-16 16:03:32 +02:00
Henri Verbeet
d6ffe00cd2
wined3d: Recognize the SM4 constant buffer register type.
2009-07-16 16:03:28 +02:00
Henri Verbeet
c4f8845bc9
wined3d: Recognize SM4 arrays.
...
This is for SM4 constant buffers, which look like cb<x>[<y>]. At some later
point we should probably translate pre-SM4 constants to constant buffers.
2009-07-16 16:03:23 +02:00
Stefan Dösinger
9d14dcab68
wined3d: Use the unmodified source in MOVA.
...
The code removed by this patch was a leftover from the time when we tried to
emulate MOVA with a plain ARL, which only supports one source in plain ARB.
This breaks the more sophisticated MOVA and 4 component ADDR register we have
now however.
2009-07-16 11:15:45 +02:00
Stefan Dösinger
6a04c2d5cc
wined3d: Don't call glGetError if nobody is listening.
2009-07-16 11:15:40 +02:00
Henri Verbeet
ae8e8ac73f
wined3d: Check the return values for some wgl calls.
2009-07-15 13:24:24 +02:00
Henri Verbeet
476c83522b
wined3d: Remove the remains of an ATI_fragment_shader hack.
...
This was originally added as a workaround for a Mesa bug by commit
ddf52dda15
. The other half of the hack has since
been removed. This code causes problems when wglDeleteContext() from a
different thread causes our current context to be destroyed, since
wglGetCurrentContext() will return a destroyed context in that case. That is a
flaw in our wgl implementation, since wglDeleteContext() shouldn't allow a
context that's current in a different thread to be destroyed, but this hack is
a bad idea regardless.
2009-07-15 13:24:19 +02:00
Stefan Dösinger
3c2fa6aea4
wined3d: Set the depth blit helper texture address mode to clamp.
...
On ATI cards we use the driver's GL_ARB_texture_non_power_of_two emulation to
support conditional NP2 textures without having to deal with the denormalized
coordinates. The default GL_TEXTURE_2D address mode is incompatible with
GL_ARB_texture_rectangle however.
2009-07-15 13:17:12 +02:00
Stefan Dösinger
387d337a70
wined3d: EXP and EXPP are scalar operations.
2009-07-15 13:17:02 +02:00
Stefan Dösinger
2bfdff198c
wined3d: Check the correct constant limit.
2009-07-10 13:07:33 +02:00
Stefan Dösinger
17769497eb
wined3d: Drop the color0 mov optimization if the src is overwritten.
2009-07-10 13:07:33 +02:00
Stefan Dösinger
8a6553da14
wined3d: Only use 4 component specular colors if GL allows it.
2009-07-10 13:07:33 +02:00
Henri Verbeet
38cb9d02b1
wined3d: Take geometry shaders into account in shader_glsl_load_constantsB().
2009-07-10 12:13:29 +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
60e0997c79
wined3d: Simplify the GLSL sRGB write code.
2009-07-10 12:13:03 +02:00
Stefan Dösinger
c0e5c8f481
wined3d: Update Nvidia driver versions.
2009-07-09 12:47:39 +02:00
Stefan Dösinger
cfd0652980
wined3d: Add Intel GMA X3100 to our card DB.
2009-07-09 12:47:33 +02:00
Stefan Dösinger
37b73478f1
wined3d: An indirect address op can adjust min and max at the same time.
2009-07-09 12:47:24 +02:00
Henri Verbeet
9cf7888002
wined3d: Fix some cast-qual warnings.
2009-07-09 11:38:07 +02:00
Henri Verbeet
95d9b1271f
wined3d: Get rid of the useless "fragcolor" variable in shader_glsl_generate_pshader().
2009-07-09 11:38:05 +02:00
Henri Verbeet
483d552e21
wined3d: Allow shader_buffer_init() to fail.
2009-07-09 11:38:02 +02:00
Henri Verbeet
40b411958b
wined3d: Rename "SHADER_BUFFER" to something sane.
2009-07-09 11:37:58 +02:00
Henri Verbeet
bddc4d3f0d
wined3d: Reuse the shader buffer between shaders.
2009-07-09 11:37:53 +02:00
Henri Verbeet
6211643bf5
wined3d: Fix a sign compare warning in shader_vaddline().
2009-07-08 20:14:44 +02:00
Henri Verbeet
e41831990d
wined3d: Fix a sign compare warning in glsl_shader.c.
2009-07-08 20:14:35 +02:00
Henri Verbeet
949cd089d5
wined3d: Trace the D3D shader in find_glsl_vshader() / find_glsl_pshader().
...
It's quite useful to know to which D3D shader a GLSL shader corresponds.
2009-07-08 20:14:32 +02:00
Henri Verbeet
6d8e1e52c8
wined3d: Avoid destroying the currently active context for non-implicit swapchains.
2009-07-08 20:14:25 +02:00
Henri Verbeet
7089128d2a
wined3d: Implement a A8R8G8B8 to X8R8G8B8 surface format converter.
2009-07-08 20:14:21 +02:00
Erik Inge Bolsø
48995f3354
wined3d: Fix Nvidia GTX series misdetection.
2009-07-08 20:13:25 +02:00
Henri Verbeet
3484d46a36
wined3d: Replace some shader_is_pshader_version() calls with plain type checks.
2009-07-07 11:50:35 +02:00
Henri Verbeet
699f68cdee
wined3d: Get rid of some pointers in WINED3DADAPTER_IDENTIFIER.
...
This also avoids some unchecked strcpy() calls.
2009-07-07 11:50:30 +02:00
Henri Verbeet
32fd8f2130
wined3d: checkGLcall() doesn't need a \n.
2009-07-07 11:50:22 +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
7ec911adeb
wined3d: Avoid an unnecessary strcpy().
2009-07-07 11:49:54 +02:00
Henri Verbeet
c9257aed85
wined3d: Avoid a forward declaration.
2009-07-06 14:35:27 +02:00
Henri Verbeet
4571455fea
wined3d: Remove the gl_renderer field from WineD3D_GL_Info.
2009-07-06 14:35:27 +02:00
Henri Verbeet
b2331ec79b
wined3d: Get rid of the unused gl_version and glx_version fields.
2009-07-06 14:35:27 +02:00
Henri Verbeet
966f8f452d
winedd3d: Get rid of a useless trace.
...
gl_card isn't initialized yet here, and GL_RENDERER is already printed
earlier.
2009-07-06 14:35:27 +02:00
Henri Verbeet
ad0ef46a39
wined3d: Get rid of the redundant "return_value" variable.
2009-07-06 14:35:27 +02:00
Alexandre Julliard
56af92b073
makefiles: Regenerate the source lists using make_makefiles.
2009-07-03 13:26:38 +02:00
Henri Verbeet
17688365ed
wined3d: Don't accept NULL as a valid result from glGetString().
2009-07-03 13:05:52 +02:00
Henri Verbeet
532b99078e
wined3d: Don't abuse blending to disable color writes in surface_depth_blt().
2009-07-03 13:05:52 +02:00
Henri Verbeet
23ce9d72b8
wined3d: Get rid of wined3d_fake_gl_context_cs.
2009-07-03 13:05:52 +02:00
Henri Verbeet
4cacf2e08f
wined3d: Use a proper structure for storing initial GL context information.
2009-07-03 13:05:51 +02:00
Henri Verbeet
db6ea72201
wined3d: Get rid of the silly refcount for the "fake" GL context.
2009-07-02 12:01:02 +02:00
Henri Verbeet
b5da7f49d3
wined3d: Don't reuse random GL contexts during initialization.
...
Obviously there's no guarantee about the state of such a context. The specific
problem is that it might have GL_UNPACK_CLIENT_STORAGE_APPLE enabled, causing
some glTexImage2D() calls to fail, but it's a bad idea in general.
2009-07-02 12:00:50 +02:00
Henri Verbeet
50e9ad66e2
wined3d: Clear the last device in WineD3D_CreateFakeGLContext().
2009-07-02 12:00:44 +02:00
Henri Verbeet
670d9ad90b
wined3d: Check if formats support blending when attached to an FBO.
...
Remove the post-pixelshader blending flag if the format doesn't. Note that the
patch doesn't enforce this restriction yet, it only adjusts the reported
format capabilities.
2009-07-02 12:00:38 +02:00
Henri Verbeet
6feb7c62ca
wined3d: Make sure the rtInternal format is supported.
2009-07-02 12:00:31 +02:00
Tobias Jakobi
05c4d0a8b0
wined3d: Fix comments about NP2 fixup.
2009-07-02 11:57:01 +02:00
Tobias Jakobi
0caebe5f51
wined3d: Force NP2 constant reload in shader_arb_select.
2009-07-02 11:56:57 +02:00
Tobias Jakobi
ef280280c2
wined3d: Implement shader_arb_load_np2fixup_constants.
2009-07-02 11:56:51 +02:00
Tobias Jakobi
e29babbf6d
wined3d: Add NP2 fixup code to shader_hw_sample (ARB).
2009-07-02 11:56:45 +02:00
Tobias Jakobi
034fa4268c
wined3d: Add NP2 fixup code to shader_arb_generate_pshader.
2009-07-02 11:56:39 +02:00
Tobias Jakobi
ec30e9a85e
wined3d: Add arb_ps_np2fixup_info structure and improve structure packing for arb_ps_compiled_shader.
2009-07-02 11:56:33 +02:00
Tobias Jakobi
2d532a1597
wined3d: Add ps_arb_max_local_constants.
2009-07-02 11:56:27 +02:00
Stefan Dösinger
c82da7d975
wined3d: Don't dirtify too many shader constants.
...
If we have start = 4, count = 3, the highest dirty constant is the one with index 6. start + count gives 7,
so it already includes the zero-based array correction. Don't add an additional 1.
Additionally to the inefficiency of looking at one extra constant, this causes problems if the driver
rejects loading 257 constants on the initial load. In this case no constant is loaded if
GL_EXT_gpu_program_parameters is used.
2009-07-01 13:14:34 +02:00
Henri Verbeet
40bc47901c
wined3d: Use flags for driver quirks.
2009-07-01 11:41:44 +02:00
Henri Verbeet
c475789bb6
wined3d: Move the driver_quirk structure to directx.c.
2009-07-01 11:41:38 +02:00
Henri Verbeet
50419daa11
wined3d: Try to activate the original context for queries.
2009-07-01 11:41:33 +02:00
Henri Verbeet
ca69ec0e85
wined3d: Recognize geometry shaders in shader_trace_init().
2009-07-01 11:41:27 +02:00
Henri Verbeet
5df58b7f89
wined3d: Replace "pshader" checks with explicit type checks in shader_get_registers_used().
2009-07-01 11:41:21 +02:00
Henri Verbeet
1911adcea5
wined3d: Consolidate "color0_mov" handling a bit.
2009-06-30 12:55:45 +02:00
Henri Verbeet
02a0614aa1
wined3d: Use dst_param.reg.idx to index reg_maps->texcoord_mask.
2009-06-30 12:55:40 +02:00
Henri Verbeet
03702e1de3
wined3d: Remove some redundant pshader checks.
2009-06-30 12:55:24 +02:00
Henri Verbeet
592361be38
wined3d: Pass the shader type to shader_record_register_usage().
2009-06-30 12:55:19 +02:00
Henri Verbeet
5b6877ee62
wined3d: Remove shader_is_version_token().
2009-06-30 12:55:11 +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
f57967c983
wined3d: Always check the result of wglMakeCurrent().
2009-06-29 12:30:28 +02:00
Henri Verbeet
40565211fb
wined3d: Prevent GL calls from DestroyContext() if we failed to make the GL context current.
...
This can happen if the window is destroyed before the device is released.
2009-06-29 12:30:24 +02:00
Henri Verbeet
6df3f23bca
wined3d: Add some missing GL locking to init_format_fbo_compat_info().
2009-06-29 12:30:18 +02:00
Stefan Dösinger
d5e2c14225
wined3d: Add a NOP ret handler to GLSL.
2009-06-29 12:28:49 +02:00
Stefan Dösinger
d4312ebb16
wined3d: Add the vertex shader footer in the main function.
2009-06-29 12:28:40 +02:00
Stefan Dösinger
5befed21f6
wined3d: Write the vshader footer in a separate function.
2009-06-29 12:28:31 +02:00
Stefan Dösinger
5859d87754
wined3d: Implement function calls with NV exts.
2009-06-29 12:28:21 +02:00
Stefan Dösinger
031401a070
wined3d: ARB*p is already on after a depth blit.
2009-06-29 12:28:13 +02:00
Stefan Dösinger
9d63585352
wined3d: Don't disable ARBfp if the replacement pipeline is used.
...
If the replacement pipeline is used, ARBfp is always on. Disabling it
can break shaders or the replacement pipeline, because the shader and
ffp code assumes the extension is on.
2009-06-29 12:28:06 +02:00
Stefan Dösinger
1f8761219b
wined3d: Only update the screen when the frontbuffer was changed.
...
There is no need to copy the frontbuffer to the screen when the backbuffer was
modified...
2009-06-29 12:27:55 +02:00
Francois Gouget
5aac7fe783
wined3d: Add a trailing '\n' to a FIXME() trace.
2009-06-26 14:40:21 +02:00
Henri Verbeet
7363b6e2e3
wined3d: Document GL context dependencies.
2009-06-26 12:05:07 +02:00
Henri Verbeet
626baad817
wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette().
2009-06-26 12:05:00 +02:00
Henri Verbeet
1b306c25e2
wined3d: Make sure we have an active GL context before calling surface_remove_pbo().
2009-06-26 12:04:57 +02:00
Henri Verbeet
db5b126da6
wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad().
2009-06-26 12:04:53 +02:00
Henri Verbeet
181442a6a2
wined3d: Make sure queries have an active GL context.
2009-06-26 12:04:48 +02:00
Stefan Dösinger
d1cd08b7b3
wined3d: Honor WINED3DSPSM_NOT in ARB.
2009-06-26 12:02:29 +02:00
Stefan Dösinger
8fb1e2acfb
wined3d: Jump to the else branch if cond is false, not endif.
2009-06-26 12:02:18 +02:00
Stefan Dösinger
a07b50c94c
wined3d: Support writemasks on texkill in ARB.
2009-06-26 12:02:12 +02:00
Stefan Dösinger
3a327908de
wined3d: Initialize the used clip planes even if no clip emulation is used.
2009-06-26 12:02:07 +02:00
Stefan Dösinger
4d86eac60a
wined3d: Unclamp vertex colors for 3.0 shaders in ARB if needed.
2009-06-26 12:02:01 +02:00
Stefan Dösinger
f69fb5c011
wined3d: POW and LOG operate on the absolute value.
2009-06-26 12:01:54 +02:00
Stefan Dösinger
bd14b6e2b4
wined3d: IFC requires GL_NV_fragment_program2.
2009-06-26 12:01:44 +02:00
Stefan Dösinger
d4854b636c
wined3d: Beware of double negations.
2009-06-26 12:01:36 +02:00
Tobias Jakobi
a9f912466b
wined3d: Force NP2 fixup constant reloading in shader_glsl_select.
2009-06-25 14:34:13 +02:00
Tobias Jakobi
ef7f769be6
wined3d: Enable constant packing for NP2 texcoord fixup.
...
Previously every texture that was flagged for NP2 fixup used a vec2
uniform in the shader to store texture dimensions. Turns out that the
GLSL compilers just maps vec2 to vec4, so essentially wasting 2
floats. The new code only uses vec4 uniforms but packs dimensions info
of 2 textures into a single uniform.
2009-06-25 14:34:13 +02:00
Tobias Jakobi
7906774339
wined3d: Add ps_np2fixup_info structure.
2009-06-25 14:34:13 +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
5dcbc40581
wined3d: Make sure we have an active GL context in context_resource_released().
2009-06-25 11:47:28 +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
964f4b0157
wined3d: Make sure we have an active GL context in buffer_PreLoad().
2009-06-25 11:47:16 +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
Henri Verbeet
f98c6e3cff
wined3d: Allow the existence of other shader types in get_loop_control_const().
2009-06-24 11:28:50 +02:00
Henri Verbeet
943ed4e1e9
wined3d: Eliminate a redundant local variable in get_loop_control_const().
2009-06-24 11:28:45 +02:00
Henri Verbeet
aec6d319fa
wined3d: Avoid a redundant copy.
2009-06-24 11:28:38 +02:00
Henri Verbeet
fd8ebebe56
wined3d: Use a proper structure for "loop_control".
2009-06-24 11:28:33 +02:00
Henri Verbeet
4caf43ddb7
wined3d: Add some missing GL locking documentation to arb_program_shader.c.
2009-06-24 11:28:27 +02:00
Austin English
a4f2d3d18e
wined3d: Fix a compiler warning.
2009-06-24 11:25:09 +02:00
Stefan Dösinger
e0ec956b3d
wined3d: Fix pixelshader ifc.
...
The NVfp2 control flow uses the D3D syntax, and doesn't need the inversed
branch condition we're using in the vertex shader.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
444b7ac7e5
wined3d: Use a local parameter for the position fixup.
...
I don't like that I have to do this because the posFixup is in all
vertex programs, so its at the same position and could be loaded
globally. Unfortunately, there are only 256 env parameters usually,
which makes it impossible for any shader to use c256, even if it does
not use indirect addressing, and so we can't claim 256 constant
support.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
7ffd10da28
wined3d: Find the clip texcoord before compiling.
...
The best is to put this together with the rest of the shader_arb_priv initialization.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
e64d48371f
wined3d: Add a function to control use of NV_vp2 clipplanes.
...
I find it helpful for debugging to have this controlled at a central place,
without having to disable the entire GL extension or manually find all the
places where GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION) controls clipplane use. It
is useful for debugging the emulation code on NV cards and for debugging mac
driver issues.
2009-06-23 15:53:00 +02:00
Stefan Dösinger
85af0b2943
wined3d: Don't emulate clipplanes with ffp vp and fix a wrong if condition.
...
b2f09fd204
accidentally got the
device->vs_clipping check wrong. The FFP replacement should emulate
clipping if GL can't do this natively with vertex shaders, not the
other way. Also don't emulate clipping if we're using fixed function
vertex processing because (a) clipping is always supported by GL in
this case, and (b), fragment.texcoord[7] is undefined. (Or in the
worst case set to something bad by the app).
2009-06-23 15:53:00 +02:00
Henri Verbeet
114b5bdefb
wined3d: Fix a comment.
...
This was actually broken by 122af07a30
.
2009-06-23 11:48:10 +02:00
Gerald Pfeifer
569b448e13
wined3d: Fix logical condition in find_clip_texcoord().
2009-06-22 13:25:27 +02:00
Henri Verbeet
e5e4d1e9a7
wined3d: Add an rtInternal fallback for WINED3DFMT_R16G16_UNORM.
2009-06-22 12:59:21 +02:00
Henri Verbeet
404f4f7321
wined3d: Get rid of some asserts.
2009-06-22 12:59:16 +02:00
Henri Verbeet
7598ab2c84
wined3d: Get rid of DEBUG_SINGLE_MODE.
2009-06-22 12:59:04 +02:00
Henri Verbeet
9a58f37cd3
wined3d: Move the num_untracked_materials lookup out of the main drawing loop.
2009-06-22 12:58:59 +02:00
Henri Verbeet
37491bb5d1
wined3d: Simplify the transformed position fixup a bit.
2009-06-22 12:58:54 +02:00
Stefan Dösinger
95788401af
wined3d: GLSL 1.20 includes gl_FragData[] syntax.
...
This means we don't have to enable ARB_draw_buffers explicitly.
2009-06-22 11:27:20 +02:00
Stefan Dösinger
3845b37a21
wined3d: Advertise SM 3.0 in ARB if the extensions are available.
2009-06-22 11:27:11 +02:00
Stefan Dösinger
e211a0b4a4
wined3d: Enable Shader Model 2.0 in ARB.
...
If the needed constants are available, we can support all vs_2_0 and ps_2_0
requirements with the plain ARB extensions. We cannot however, run SM 2.0a or
SM 2.0b.
2009-06-22 11:27:05 +02:00
Stefan Dösinger
e1c6b73e2d
wined3d: Make the ARB index offset work with emulated MOVA.
2009-06-22 11:26:57 +02:00
Stefan Dösinger
77820d5ea5
wined3d: XXXC CC doesn't work even with NV_FP2 on.
2009-06-22 11:26:50 +02:00
Stefan Dösinger
26d17fe04c
wined3d: Implement MRTs in ARB.
2009-06-22 11:26:43 +02:00
Stefan Dösinger
bb8bcf5878
wined3d: Reload the first 8 constants on a 1.x and != 1.x ps switch.
...
ps 1.x constants are clamped to [-1;1], constants in >= 2.0 pshaders
are not. This means we have to reload constants when switching between
those shader types in ARB. In GLSL this is not a concern because
constants are tied to program objects and are reloaded on a shader
change anyway.
2009-06-22 11:26:33 +02:00
Stefan Dösinger
2364ce08e5
d3d9: Add a SGN test.
2009-06-22 11:26:14 +02:00
Stefan Dösinger
20401fa9af
wined3d: Invalidate the srgb tex in surface::unload.
2009-06-22 11:25:57 +02:00
Robert Key
89b08bc6e2
wined3d: Add missing HD 3400 renderer string.
2009-06-19 14:54:58 +02:00
Stefan Doesinger
0188f96dd2
wined3d: Implement EvictManagedResources.
2009-06-19 14:54:04 +02:00
Stefan Doesinger
b2f09fd204
wined3d: Emulate clipplanes in ARB if the NV extensions are not available.
...
This patch tries to find a free texture coordinate to load up to 4 clip
coordinates into the pixel shader, and uses KIL to throw away fragments
that are cut by a clipplane. If no free texture coordinate is found,
clipping is not done. If more than 4 clipplanes are used, only the first
4 are actually enabled. That should be pretty rare though.
2009-06-19 14:54:00 +02:00
Stefan Doesinger
7baf7c6518
wined3d: Implement vertex texture fetch in ARB.
2009-06-19 14:53:50 +02:00
Stefan Doesinger
f1e97cdfbc
wined3d: Don't run out of varyings because of clipplanes.
2009-06-19 14:53:43 +02:00
Stefan Doesinger
b53b5909ff
wined3d: Handle SM 3.0 varyings in ARB.
2009-06-19 14:53:20 +02:00
Henri Verbeet
dcc490e82f
wined3d: Don't load a rendertarget just because alpha test is enabled.
...
Unlike the depth test, the alpha test doesn't compare to the existing fragment
but against a reference value.
2009-06-19 13:52:47 +02:00
Henri Verbeet
51902b89fb
wined3d: Remove a redundant ActivateContext() call in IWineD3DSurfaceImpl_UnlockRect().
...
The various LoadLocation() handlers already take care of activating an
appropriate context.
2009-06-18 15:17:27 +02:00
Henri Verbeet
c7b684f345
wined3d: Simplify IWineD3DSurfaceImpl_LockRect() a bit.
2009-06-18 15:17:27 +02:00
Henri Verbeet
9f252cd815
wined3d: Remove some useless code in IWineD3DDeviceImpl_SetLightEnable().
2009-06-18 15:17:27 +02:00
Henri Verbeet
550a3bbf96
wined3d: Reuse the FBO for check_fbo_compat().
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
Stefan Doesinger
3aaa530ca9
wined3d: Properly load the y correction.
2009-06-18 15:17:26 +02:00
Stefan Doesinger
7d5285acc1
wined3d: Properly free srgb textures.
2009-06-18 15:17:26 +02:00
Michael Abbott
2e119a2718
wined3d: Remove division from inner loop.
2009-06-18 15:17:26 +02:00
Yann Droneaud
a203876cc7
wined3d: Improved ATI Radeon HD 4xxx detection.
2009-06-17 12:43:20 +02:00
Stefan Doesinger
c9ef1ed28c
wined3d: Deal with instructions that do not support _SAT.
2009-06-17 12:24:43 +02:00
Stefan Doesinger
a7b605af64
wined3d: Implement D3DSPDM_PARTIALPRECISION support.
2009-06-17 12:24:35 +02:00
Stefan Doesinger
dfd338de77
wined3d: Add modifier support to tex and friends.
2009-06-17 12:20:54 +02:00
Stefan Doesinger
7856c1c26f
wined3d: Fix texm3x3pad.
...
The register number is already in the name we got from get_register_name,
don't add it twice.
2009-06-17 12:20:48 +02:00
Stefan Doesinger
cd348ac897
wined3d: Use bitfields for reg_maps uses* members.
2009-06-17 12:19:45 +02:00
Stefan Doesinger
58c3a0c832
wined3d: Implement vpos and vface.
2009-06-17 12:19:31 +02:00
Stefan Doesinger
ae600fe0c8
wined3d: Implement texldl in ARB.
2009-06-17 12:19:15 +02:00
Henri Verbeet
60317d027a
wined3d: Avoid some unneeded rendertarget copies.
2009-06-17 12:13:07 +02:00
Henri Verbeet
8be020776b
wined3d: Avoid some unneeded depthstencil copies.
2009-06-17 12:13:07 +02:00
Henri Verbeet
2c009e4d87
wined3d: Only initialize unused components of varyings that are read.
2009-06-17 12:13:07 +02:00
Henri Verbeet
fccb3d82fd
wined3d: Fall back to backbuffer offscreen rendering if FBOs are unavailable.
...
Backbuffer appears to be a better choice than PBuffer at the moment, since
PBuffer appears to be somewhat broken.
2009-06-17 12:13:07 +02:00
Henri Verbeet
dad6c311ec
wined3d: Fix a typo.
2009-06-17 12:13:07 +02:00
Stefan Doesinger
4830a29101
wined3d: Implement texldd in ARB.
2009-06-16 13:57:34 +02:00
Stefan Doesinger
2f6a713805
wined3d: Use flags instead of bools to control shader_hw_sample.
2009-06-16 13:57:30 +02:00
Stefan Doesinger
e608ef856e
wined3d: Implement IFC in ARB.
2009-06-16 13:57:20 +02:00
Stefan Doesinger
dfefbcd00d
wined3d: Implement break and breakc.
2009-06-16 13:57:15 +02:00
Stefan Doesinger
c220bafa2c
wined3d: Unroll loops in ARB if needed.
...
This is needed to allow us to claim vs_2_0 support with plain
GL_ARB_vertex_program. vs_2_0 allows loops without breaks.
2009-06-16 13:57:04 +02:00
Henri Verbeet
23231d5a62
wined3d: Add format conversions for some depth stencil formats.
...
Although these formats aren't lockable, we still explicitly set the initial
surface data when creating the texture. Unfortunately that means we'll need
the conversion functions, even though all they'll ever convert will be zeroes.
2009-06-16 13:37:06 +02:00
Henri Verbeet
88162fabb8
wined3d: Get rid of the pointers in WINED3DSURFACE_DESC.
2009-06-15 13:42:29 +02:00
Henri Verbeet
fede35d1c5
wined3d: Introduce surface_calculate_size().
2009-06-15 13:42:28 +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
bbfdfb2f1f
wined3d: Introduce surface_gdi_cleanup().
2009-06-15 13:42:28 +02:00
Henri Verbeet
32613eb628
wined3d: Introduce surface_cleanup().
2009-06-15 13:42:28 +02:00
Henri Verbeet
7599520321
wined3d: Avoid checking depth/stencil and compressed formats in init_format_fbo_compat_info().
...
Checking these is somewhat pointless since they should never be
color-renderable according to the FBO spec. This patch also happens to avoid
dereferencing a NULL pointer inside fglrx.
2009-06-12 17:33:15 +02:00
Henri Verbeet
669891c817
wined3d: Respect the "srgb" parameter to IWineD3DSurfaceImpl_BindTexture().
...
This is mostly for consistency, standalone surfaces can't be used for
texturing, so in practice "srgb" should always be FALSE in this path.
2009-06-12 17:33:15 +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
71e12ae936
wined3d: Use the compressed format info in IWineD3DBaseSurfaceImpl_LockRect().
2009-06-12 17:33:15 +02:00
Rico Schüller
3ea66d6026
wined3d: Don't allow a negative lock_count in buffer_Unmap.
2009-06-11 13:23:25 +02:00
Henri Verbeet
5fbf895da6
wined3d: Use the format info to calculate compressed surface pitch in IWineD3DBaseSurfaceImpl_GetPitch().
2009-06-11 11:53:55 +02:00
Henri Verbeet
da12ac05a4
wined3d: Use the format info to calculate compressed surface size in IWineD3DBaseSurfaceImpl_SetFormat().
2009-06-11 11:53:55 +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
1ad485ff83
wined3d: Improve some TRACEs in init_format_fbo_compat_info().
2009-06-11 11:53:54 +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
Stefan Dösinger
3f5936f6f7
wined3d: Don't set unloaded arrays to zero.
...
This causes memory corruption on MacOS, even if the app does not
reference undeclared arrays. Trying to avoid potential breakage in
broken apps which provoke undefined behavior is pointless if it causes
actual breakage in well-behaved apps (on ill-behaved drivers).
2009-06-10 11:52:58 +02:00
Stefan Dösinger
8e259d9fcd
wined3d: A small atifs bump map improvement.
...
Thanks to Roland Scheidegger from Tungsten Graphics for the suggestion to
replace the 2 movs + dp2add with two MADs, where one can conveniently be
coissued with the other dp2add.
2009-06-10 11:52:24 +02:00
Stefan Dösinger
258d99d289
wined3d: Implement dsy in ARB.
2009-06-10 11:52:15 +02:00
Stefan Dösinger
51cdc9d361
wined3d: Implement loops with the NV extensions.
2009-06-10 11:52:01 +02:00
Stefan Dösinger
298bd3c50d
wined3d: Store the bumpmap ARB constants in ARB structures.
2009-06-10 11:51:49 +02:00
Henri Verbeet
e83fa982ca
wined3d: Use the format info for doing compressed surface blits in BltFast().
2009-06-10 11:51:12 +02:00
Henri Verbeet
61fd875bb4
wined3d: Store compression information about compressed formats.
2009-06-10 11:51:04 +02:00
Henri Verbeet
9d71a5f1e0
wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
2009-06-10 11:50:57 +02:00
Henri Verbeet
a25e63c62d
wined3d: Check the correct extensions in d3dfmt_get_conv().
...
According to Stefan these are either typos or leftovers from using GL_HILO8_NV.
2009-06-10 11:50:44 +02:00
Henri Verbeet
5ac8a7b054
wined3d: Set explicitly sized internal formats for color key conversion in d3dfmt_get_conv().
2009-06-10 11:50:31 +02:00
Henri Verbeet
910455e435
wined3d: Add some FIXMEs about blitting with unsupported fixups.
2009-06-09 17:01:14 +02:00
Henri Verbeet
621da64245
wined3d: Get rid of the silly pointers in WINED3DVOLUME_DESC.
2009-06-09 17:01:14 +02:00
Henri Verbeet
08d95233e3
wined3d: Don't modify the internal format in d3dfmt_get_conv().
...
For most conversions the internal format is irrelevant. Color key conversions
are an exception, because they need to ensure an alpha channel is present.
2009-06-09 17:01:14 +02:00
Henri Verbeet
fcf6a27a9b
wined3d: Simplify some code in set_glsl_shader_program().
2009-06-09 17:01:14 +02:00
Henri Verbeet
a6dc31e442
wined3d: Avoid comparing shader compile args if the relevant shader isn't present.
2009-06-09 17:01:14 +02:00
Frank Richter
6136884120
d3d9: Fix bitmask for A2R10G10B10 format.
2009-06-08 16:22:18 +02:00
Gerald Pfeifer
6d1a76fb10
wined3d: Fix (and simplify) the ATI case in IWineD3DImpl_FillGLCaps.
2009-06-08 14:29:01 +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
7422babd88
wined3d: Set FBO stencil attachments for relevant depth stencil formats.
2009-06-08 12:44:27 +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
13aea3a131
wined3d: Use GL_DEPTH32F_STENCIL8 for WINED3DFMT_D24FS8.
2009-06-08 12:44:17 +02:00
Henri Verbeet
4bc2180821
wined3d: Use GL_DEPTH_COMPONENT32F for WINED3DFMT_D32F_LOCKABLE.
2009-06-08 12:44:13 +02:00
Henri Verbeet
d3bc045f26
wined3d: Add support for the ARB_depth_buffer_float extension.
2009-06-08 12:44:08 +02:00
Henri Verbeet
f8c4832276
wined3d: Use GL_DEPTH24_STENCIL8_EXT for depth stencil formats.
2009-06-05 15:19:56 +02:00
Henri Verbeet
d08f4fb5f5
wined3d: Add support for EXT_packed_depth_stencil.
2009-06-05 15:19:56 +02:00
Henri Verbeet
a5876bb91e
wined3d: Use FBOs for offscreen rendering by default.
2009-06-05 15:19:40 +02:00
Henri Verbeet
fb7531599f
wined3d: Only use stretch_rect_fbo() on surfaces that are FBO attachable.
2009-06-05 15:19:35 +02:00
Henri Verbeet
786408fb95
wined3d: Check FBO compatibility on all formats with a GL format.
...
Instead of just the ones that have a fallback specified.
2009-06-05 14:43:25 +02:00
Henri Verbeet
b93c3b3253
wined3d: Set texture filtering to NEAREST in check_fbo_compat().
2009-06-05 14:43:25 +02:00
Henri Verbeet
0571ebcee3
wined3d: Add extension detection to the GL format template table.
2009-06-05 14:43:25 +02:00
Henri Verbeet
a2440aed7e
wined3d: Add extension detection for ARB_depth_texture.
2009-06-05 14:43:25 +02:00
Henri Verbeet
daeb86d620
wined3d: Don't use the vertex/pixel shader when we're not supposed to.
...
This also avoids removing programs from lists they're not in in
delete_glsl_program_entry().
2009-06-05 14:43:25 +02:00
Henri Verbeet
cae6a32b08
wined3d: Check the result from wine_rb_get() before using it in WINE_RB_ENTRY_VALUE.
2009-06-05 14:43:25 +02:00
Henri Verbeet
a44f84fdf7
wined3d: Add a proper enum value for "no extension".
...
This would allow an extension check for ARB_COLOR_BUFFER_FLOAT to work.
2009-06-04 12:19:02 +02:00
Henri Verbeet
0a059aafbe
wined3d: Check FBO compatibility after the fixups are applied.
2009-06-04 12:18:47 +02:00
Henri Verbeet
faaea93573
wined3d: Remove WINED3DFMT_R16G16B16A16_SNORM from the GL formats template.
...
This entry obviously can't work correctly.
2009-06-04 12:18:42 +02:00
Henri Verbeet
0cf49767ad
wined3d: Remove entries without an internal format from the GL formats template.
2009-06-04 12:18:33 +02:00
Henri Verbeet
37bdcd6b9b
wined3d: Free priv->stack in shader_glsl_free().
2009-06-04 12:18:27 +02:00
Henri Verbeet
ad6279de9f
wined3d: Replace the wined3d hash table with the generic red-black tree.
2009-06-03 11:40:14 +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
9e69b86a03
wined3d: Introduce volumetexture_cleanup().
2009-06-03 11:39:09 +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
aabb51286d
wined3d: Introduce cubetexture_cleanup().
2009-06-03 11:38:55 +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
Stefan Dösinger
2afcb794f2
wined3d: Implement clipplanes in the ARB backend.
...
Using GL_NV_vertex_program2_option so far. If we're really desparate we can
handle some cases without the extension by using a custom varying and texkill
in the fragment program.
2009-06-02 12:09:54 +02:00
Stefan Dösinger
1276b090b4
wined3d: Update clipplanes on a shader-fixed function switch.
...
The view matrix that was set at the time the clipplane was applied is
hardcoded into the clipplane. With vertex shaders clip planes ignore
the view matrix in d3d. We implement that, but this also means that
the clip planes potentially change when we switch between vs and fixed
func.
2009-06-02 12:09:46 +02:00
Stefan Dösinger
dfc9141458
wined3d: Use condition code for sRGB write correction if available.
...
This gives a small performance improvement. Don't enable NVfp for it though,
because the NVfp penalty is bigger than the gain from this patch. But if NVfp
is enabled anyway, make use of it.
2009-06-02 12:09:38 +02:00
Stefan Dösinger
7e1100d0e4
wined3d: Handle LRP in vertex shaders.
...
The ARB "LRP" instruction is a fragment program only instruction. It is
however valid in vs_2_0+ vertex shaders, so we have to emulate it.
2009-06-02 12:09:26 +02:00
Henri Verbeet
22022cf8b3
wined3d: Create a texture_cleanup() function.
2009-06-02 11:57:22 +02:00
Henri Verbeet
451a416fcf
wined3d: Call resource_init() from basetexture_init().
2009-06-02 11:57:22 +02:00
Henri Verbeet
812ee5208c
wined3d: Partially revert 7433eb76b5
.
...
The write mask sizes for the input and output semantics can be different,
resulting in compilation failure.
2009-06-02 11:57:22 +02:00
Stefan Dösinger
38076e08ca
wined3d: Add a comment about texbem and X2D.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
de12f880ce
wined3d: Don't enable the NV frag extensions if we don't need them.
...
Enabling the NV extensions occupies a temp register for some reason. Avoid
needlessly enabling it.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
5a07bacd36
wined3d: Write result.color in one mov.
...
Otherwise the Nvidia assembler needs one temp reg.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
050735be79
wined3d: Revert "WineD3D: use CMP instead of SLT and SGE in sRGB correction".
...
This reverts patch ba35760f9f
.
The original patch did not achive its goal, because CMP is a macro that is
expanded to SLT, SGE, MUL, MAD, at least on nvidia hardware. To make matters
worse, it uses a temporary register, and the assembler usually is not clever
enough to find a free temporary from the shader code. If we generate the code
outselves we can pick one of our temps for this job.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
8665ee5906
wined3d: Use Rx registers for sRGB correction if possible.
...
This removes another reason to declare TA, TB and TC.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
7168b62323
wined3d: Use NRM from GL_NV_fragment_program2 if available.
2009-05-29 11:27:51 +02:00