Henri Verbeet
9d8c6326c0
wined3d: Remove stray tabs.
2009-01-09 14:06:14 +01:00
Henri Verbeet
ac914262ed
wined3d: Rewrite BeginStateBlock() to use CreateStateBlock() instead of duplicating the code.
2009-01-09 14:06:14 +01:00
Henri Verbeet
9d523ebd8f
wined3d: Remove a silly check in drawStridedInstanced().
2009-01-09 14:06:14 +01:00
Henri Verbeet
92488ca7c1
wined3d: Simplify checking if an attribute is used in loadNumberedArrays().
2009-01-09 14:06:14 +01:00
Henri Verbeet
d9e58e6591
wined3d: Failing HeapAlloc() should be an ERR.
2009-01-09 14:06:13 +01:00
Henri Verbeet
e028e3f7bd
wined3d: Use GL_ALIASED_POINT_SIZE_RANGE to retrieve the max point size.
2009-01-09 14:06:13 +01:00
Henri Verbeet
45a61d1ac4
wined3d: Enable GL_HALF_FLOAT_NV when NV_HALF_FLOAT is supported.
...
This makes more sense than the other way around.
2009-01-08 13:21:56 +01:00
Henri Verbeet
b1812c690c
wined3d: Add support for EXT_vertex_array_bgra.
...
This allows us to skip BGRA->RGBA color conversion for vertex attributes if
this extension is present.
2009-01-08 13:21:51 +01:00
Henri Verbeet
6791e6b752
wined3d: Simplify handling of swizzled attributes.
...
This should also be a little bit faster.
2009-01-08 13:21:43 +01:00
Henri Verbeet
cc447eac55
wined3d: Move position_transformed out of u.s in struct WineDirect3DVertexStridedData.
2009-01-08 13:21:31 +01:00
Henri Verbeet
1a1f5ec69d
wined3d: Cleanup drawStridedFast().
...
Remove some uncessary code and use more descriptive parameter names. Note that
max_vertex_idx isn't the same as "minIndex + calculatedNumberOfindices - 1"
but rather "minIndex + numberOfVertices - 1". calculatedNumberOfindices just
specifies the number of vertices that's drawn, while numberOfVertices
specifies the range of vertices that's drawn.
2009-01-08 13:21:23 +01:00
Henri Verbeet
5f8c62e45d
wined3d: Remove a redundant parameter to drawPrimitive().
...
startIdx should be the first index to draw, either from the vertex
array or the index array, depending on if the draw is indexed or
not. Having both at the same time wouldn't make sense.
2009-01-07 12:22:12 +01:00
Henri Verbeet
46eabd5b16
wined3d: Don't delete queries from the wrong context.
2009-01-07 12:22:02 +01:00
Henri Verbeet
0e8ed9bebb
wined3d: Simplify IWineD3DOcclusionQueryImpl_GetData().
2009-01-07 12:21:58 +01:00
Henri Verbeet
ab275ab487
wined3d: Make calling a query from the wrong context a FIXME.
...
We want to know if this happens a lot. If the query is always called
from a different context than the one that created it, occlusion
culling would effectively be disabled, which could have a significant
performance impact, depending on the type of objects being culled.
2009-01-07 12:21:49 +01:00
Henri Verbeet
691894d1ab
wined3d: Also apply the last sampler state.
...
In practice we don't implement WINED3DSAMP_DMAPOFFSET anyway, so this
is unlikely to make much of a difference.
2009-01-07 12:21:37 +01:00
Henri Verbeet
bddf5e76ea
wined3d: Convert textureState to a bitmap in struct SAVEDSTATES.
2009-01-06 12:45:52 +01:00
Henri Verbeet
a8697d90e4
wined3d: Renumber WINED3DTEXTURESTAGESTATETYPE enum elements.
...
Saves some space by not having unused entries is the arrays tracking these
states.
2009-01-06 12:45:43 +01:00
Henri Verbeet
e8ba733706
wined3d: Remove unused enum elements from WINED3DTEXTURESTAGESTATETYPE.
2009-01-05 12:41:31 +01:00
Henri Verbeet
fd33f0f97f
wined3d: Convert samplerState to a bitmap in struct SAVEDSTATES.
2009-01-05 12:41:17 +01:00
Henri Verbeet
c33b38117e
wined3d: Convert renderState to a bitmap in struct SAVEDSTATES.
2009-01-05 12:41:08 +01:00
Henri Verbeet
fc39831e4c
wined3d: Convert transform to a bitmap in struct SAVEDSTATES.
2009-01-05 12:40:57 +01:00
Stefan Dösinger
616ea53226
ddraw: Add a test for IDirectDrawSurface::GetDC.
2009-01-03 15:14:38 +01:00
Vincent Pelletier
23dcf61e61
wined3d: Make WARN about oversized texture output surface and texture sizes.
2009-01-03 14:55:31 +01:00
Henri Verbeet
9a889f6b0b
wined3d: Convert textures to a bitmap in struct SAVEDSTATES.
2009-01-03 14:55:31 +01:00
Henri Verbeet
39909f2a06
wined3d: Handle WINED3DFVF_XYZW in get_flexible_vertex_size().
...
Spotted by Chris Robinson.
2009-01-03 14:55:31 +01:00
Henri Verbeet
3c14b3936f
wined3d: Don't bother with the GLSL info log if nobody's looking.
2009-01-03 14:55:30 +01:00
Henri Verbeet
2e0212e998
wined3d: Fix the line number for some fglrx spam.
...
We added a #version line a while ago, so the line number for the
warning changed.
2009-01-03 14:55:30 +01:00
Allan Tong
fdd512deeb
wined3d: Add mapping for MOV instructions in shader_hw_map2gl.
2009-01-02 11:53:35 +01:00
Henri Verbeet
3b5c75d991
wined3d: Convert clipplane to a bitmap in struct SAVEDSTATES.
2009-01-02 11:53:04 +01:00
Henri Verbeet
52a900d4e8
wined3d: Convert streamSource and streamFreq to bitmaps in struct SAVEDSTATES.
2009-01-02 11:52:34 +01:00
Henri Verbeet
457037f4de
wined3d: Fix the value of HIGHEST_TRANSFORMSTATE.
...
The highest transform state should be 511.
2009-01-02 11:52:02 +01:00
Henri Verbeet
73e042496c
wined3d: Fix a few format specifiers in IWineD3DStateBlockImpl_Capture().
2009-01-02 11:51:54 +01:00
Henri Verbeet
0657e8d87a
wined3d: Use slightly nicer loops in device_map_fixed_function_samplers().
2009-01-02 11:51:46 +01:00
Henri Verbeet
3920d42f71
wined3d: Convert some BOOLs to bitfields in struct SAVEDSTATES.
2008-12-31 12:26:57 +01:00
Henri Verbeet
29a0d06518
wined3d: Convert some BOOLs to bitfields in struct IWineD3DDeviceImpl.
...
Also fills a 3 byte hole.
2008-12-31 12:26:33 +01:00
Henri Verbeet
3f12f59aa4
wined3d: Convert some BOOLs to bitfields in struct WineD3DContext.
...
Also happens to fill two 3 byte holes.
2008-12-31 12:26:23 +01:00
Henri Verbeet
813c7ed202
wined3d: Remove an unused field from the device.
2008-12-31 12:26:02 +01:00
Henri Verbeet
2b926db50d
wined3d: Make use_vs() and use_ps() work on a stateblock instead of a device.
...
Most callers work on a stateblock rather than a device, and the main fields
we check (vertexShader and pixelShader) are part of the stateblock as well.
2008-12-31 12:25:56 +01:00
Henri Verbeet
f197e8b1ca
wined3d: Handle D3DFVF_XYZW in ConvertFvfToDeclaration().
...
This is similar to 0bdab5f80c
.
2008-12-30 11:36:57 +01:00
Henri Verbeet
007c648c20
d3d: Correct some debug levels.
2008-12-30 11:36:50 +01:00
Henri Verbeet
6f5af4047f
wined3d: Get rid of the glname field in struct SHADER_OPCODE.
...
It's only used for shader_hw_map2gl() and vshader_hw_rsq_rcp(), and we
can handle those the same way we handle the GLSL equivalents.
2008-12-30 11:36:35 +01:00
Henri Verbeet
29b826b39e
wined3d: D3DRS_POINTSIZE_MIN is initially 0.0f for d3d8.
2008-12-29 12:16:52 +01:00
Henri Verbeet
de494ffe3c
wined3d: The initial value for D3DRS_POINTSIZE_MAX depends on the pointsize limit.
2008-12-29 12:16:42 +01:00
Francois Gouget
2166afceb7
Assorted spelling fixes.
2008-12-29 11:36:49 +01:00
Vincent Pelletier
143bd931b6
wined3d: Detect intel 945 GM.
2008-12-29 11:35:36 +01:00
Nick Burns
9dea6f7de5
wined3d: Fix glReadPixels call from read_from_framebuffer.
2008-12-26 13:42:17 +01:00
Andrew Talbot
f9762d6082
wined3d: Remove superfluous semicolons.
2008-12-24 19:59:14 +01:00
Maarten Lankhorst
4eca43e702
winex11.drv/wined3d: Fix tsx11 calling convention.
2008-12-23 12:51:44 +01:00
Nick Burns
c52fd346ef
wined3d: Fix a couple of typos in wined3d_gl.h
2008-12-22 14:14:52 +01:00
Rico Schüller
b061f64228
wined3d: Fix compilation for Windows build.
2008-12-22 10:29:14 +01:00
Henri Verbeet
02e4c33611
wined3d: Consistently use .xyzw for vector components.
2008-12-20 11:11:55 +01:00
Henri Verbeet
33f344882c
wined3d: Remove a useless FIXME.
2008-12-20 11:11:49 +01:00
Henri Verbeet
4a19d893e5
wined3d: Only apply shader constants that changed.
...
This improves performance a bit for applications that use a lot of
shaders with a lot of constants.
2008-12-20 11:11:45 +01:00
Henri Verbeet
684017c071
wined3d: Properly reset the stateblock.
2008-12-20 11:11:39 +01:00
Henri Verbeet
ef7365a4cd
wined3d: Set the initial viewport in InitStartupStateBlock().
...
>From 8aa3fb7ceb6fb93abf71520c852403284a9f8c76 Mon Sep 17 00:00:00 2001
From: Henri Verbeet <hverbeet@codeweavers.com>
Date: Fri, 19 Dec 2008 19:21:55 +0100
Subject: wined3d: Set the initial viewport in InitStartupStateBlock().
2008-12-20 11:11:34 +01:00
Henri Verbeet
a52edd7810
wined3d: Don't call allocate_shader_constants() from Init3D().
...
CreateStateBlock() should take care of that.
2008-12-19 18:05:02 +01:00
Roderick Colenbrander
086d949877
wined3d: Add GL_RG16F / GL_RG32F support using ARB_texture_rg.
2008-12-19 17:49:20 +01:00
Roderick Colenbrander
331fe08b54
wined3d: Add R32F using ARB_texture_rg.
2008-12-19 17:49:08 +01:00
Roderick Colenbrander
8cb84458d3
wined3d: Add R16F using ARB_texture_rg.
2008-12-19 17:49:02 +01:00
Roderick Colenbrander
7238bce79d
wined3d: Add GL_ARB_texture_rg / GL_EXT_texture_swizzle support. These extensions are needed for more efficient R32F/RG32F support.
2008-12-19 17:48:55 +01:00
Stefan Dösinger
690cbe76ac
wined3d: Make pixelshaders disable fog properly.
...
This is a first step towards cleaning up the fog mess. The fog
parameter is added to the pixelshader compile args structure. That way
multiple pshaders are compiled for different fog settings, and the
pixel shader can remove the fog line if fog is not enabled. That way
we don't need special fog start and end settings, and this allows us
to implement EXP and EXP2 fog in the future too.
2008-12-19 17:17:16 +01:00
Stefan Dösinger
7d92b54a97
wined3d: Use the ps_compile_args struct in glsl.
2008-12-19 17:17:04 +01:00
Stefan Dösinger
20189eb4f8
wined3d: Make use of ps_compile_args in arb shader.
2008-12-19 17:16:56 +01:00
Stefan Dösinger
30d542c3dd
wined3d: Make use of the ps_compile_args structure in glsl_shader.
...
Only a first step, many more occasions need fixing. This is an easy
one though.
2008-12-19 17:16:50 +01:00
Stefan Dösinger
61e581abb4
wined3d: Pass the ps_compile_args structures to the shader generation code.
2008-12-19 17:16:39 +01:00
Henri Verbeet
d099dde7a9
wined3d: Track shader constants in the shader backend.
2008-12-18 13:17:02 +01:00
Henri Verbeet
a14dab4937
wined3d: Don't mark shader constants dirty when we're recording a stateblock.
2008-12-18 13:16:52 +01:00
Henri Verbeet
0968cb9b6c
wined3d: Fix constant setting for the ARB backend.
2008-12-18 13:16:46 +01:00
Francois Gouget
cf7c8a2425
wined3d: Fix double const.
2008-12-17 15:28:39 +01:00
Henri Verbeet
73823ef5f6
wined3d: Remove the shader_cleanup() method from the shader backend.
2008-12-17 14:02:24 +01:00
Henri Verbeet
78ad5de8da
wined3d: Record floating point pixel shader constants in EndStateBlock() as well.
2008-12-17 14:02:09 +01:00
Henri Verbeet
4adb342327
wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice.
2008-12-17 14:02:03 +01:00
Stefan Dösinger
704f9ea5d1
wined3d: Get rid of IWineD3DPixelShaderImpl_GenerateShader.
2008-12-16 14:36:25 +01:00
Stefan Dösinger
2aa7a7fe16
wined3d: Avoid loading opengl32.dll.
...
This confuses applications like Steam, which hook d3d9 and opengl
functions. It sees that the application uses opengl32, but it doesn't
realize that d3d9 is wrapped to opengl. Thus it starts messing around
with wined3d's wgl context. It usually tries to draw geometry with the
context, but cannot deal with some of the obscure extensions we have
activated.
2008-12-16 14:36:17 +01:00
Stefan Dösinger
4bc5e760b6
wined3d: Initialize max_combined_samplers properly.
...
Otherwise it will be 0 if GL_ARB_multitexture is not available.
2008-12-16 14:36:02 +01:00
Stefan Dösinger
5315b7992d
wined3d: Correct a stage number.
2008-12-16 14:34:20 +01:00
Stefan Dösinger
31da3c0578
wined3d: Emulate GL_EXT_fog_coord.
2008-12-16 14:34:11 +01:00
Stefan Dösinger
d707f018df
wined3d: Remove some needless initializations.
...
They're not needed, they are handled by the state management anyway.
2008-12-16 14:32:43 +01:00
Stefan Dösinger
4b268c79d7
wined3d: Some GL_EXT_fog_coord prototype fixes.
2008-12-16 14:32:29 +01:00
Stefan Dösinger
0dc0444c14
wined3d: Reinstall the G16R16F format surface load fixup.
...
We cannot remove this because we still have to load the surface as
RGB. The shader may take care of setting the blue channel to 1.0 now,
but we still get the red and green channels loaded incorrectly if we
don't insert a blue channel before loading.
2008-12-16 14:32:11 +01:00
Stefan Dösinger
6ec741e766
wined3d: Set up the shaders when delaying fixed func applying.
2008-12-16 14:31:39 +01:00
Stefan Dösinger
199a3468bf
wined3d: Fake GL_ARB_multitexture.
2008-12-16 14:31:25 +01:00
Henri Verbeet
143fb431e0
wined3d: Fix use_vs() usage in vertexdeclaration().
2008-12-16 12:52:10 +01:00
Henri Verbeet
f3743fb402
wined3d: Shaders will never have a NULL function.
2008-12-16 12:52:04 +01:00
Henri Verbeet
46572f682c
wined3d: Refuse to create shaders with a NULL function.
2008-12-16 12:51:49 +01:00
Henri Verbeet
9011452243
wined3d: Simplify shader_generate_main() a bit.
2008-12-15 14:00:29 +01:00
Henri Verbeet
8553665cb1
wined3d: Move the shader version to reg_maps.
2008-12-15 14:00:26 +01:00
Henri Verbeet
dd094fe69d
wined3d: Explicitly pass the shader version to some more functions.
2008-12-15 14:00:21 +01:00
Stefan Dösinger
c0a715977d
wined3d: Remove a blank line in state.c.
2008-12-15 12:24:52 +01:00
Stefan Dösinger
c937278262
wined3d: Give ATIFS a pixel shader handler.
2008-12-15 12:24:38 +01:00
Henri Verbeet
3e035ddf05
wined3d: Don't leak memory on failure in allocate_shader_constants().
2008-12-12 11:40:44 +01:00
Henri Verbeet
7d29aecd6f
wined3d: Use a simpler way to calculate the number of texture levels.
...
It's probably slightly faster too.
2008-12-12 11:40:39 +01:00
Henri Verbeet
70ed814b95
wined3d: Get rid of the textureDimensions field in the state block.
2008-12-12 11:40:32 +01:00
Henri Verbeet
f36c377d0e
wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not the specific type.
2008-12-12 11:40:26 +01:00
Henri Verbeet
fb475c7c29
wined3d: Don't reparse the entire shader just to update the sampler types.
2008-12-12 11:40:20 +01:00
Stefan Dösinger
f2f90b6965
wined3d: Fix ARG_UNUSED and use it properly.
...
That bug was uncovered by Henri's change of the bitfield sizes.
2008-12-11 14:07:31 +01:00
Stefan Dösinger
fef73782ce
WineD3D: Abstract some ATIfs op debug TRACEs.
...
It makes the code more readable and will help us to merge the ALPHAOP
and COLOROP code.
2008-12-11 14:07:21 +01:00
Stefan Dösinger
4916cd5478
wined3d: Don't load INT and BOOL constants needlessly.
2008-12-11 14:06:04 +01:00
Henri Verbeet
441f515d08
wined3d: Don't trace the shader if nobody's looking.
2008-12-11 12:14:55 +01:00
Henri Verbeet
8124f5e14a
wined3d: shader_trace_init() shouldn't have side effects.
...
This moves setting baseShader.hex_version and baseShader.functionLength to
shader_get_registers_used(), where it's more appropriate.
2008-12-11 12:14:50 +01:00
Henri Verbeet
9541c346b3
wined3d: Remove some more unused code.
2008-12-11 12:14:40 +01:00
Henri Verbeet
15d497cb26
wined3d: baseShader.functionLength should be 0 when a NULL pFunction is passed.
2008-12-11 12:14:36 +01:00
Henri Verbeet
a2f259afff
wined3d: Get rid of the "len" variable in shader_trace_init().
2008-12-11 12:14:30 +01:00
Henri Verbeet
b409061337
wined3d: Make some constant arrays also static.
...
As pointed out by Dan Kegel.
2008-12-10 10:50:37 +01:00
Henri Verbeet
bcf0b4b128
wined3d: Compare & copy with the correct clipplane size in IWineD3DStateBlockImpl_Capture().
2008-12-10 10:50:30 +01:00
Henri Verbeet
4aa00e8a21
wined3d: Rename texture_stage_op.color_correction to texture_stage_op.color_fixup.
...
This is consistent with other uses of struct color_fixup_desc.
2008-12-10 10:50:24 +01:00
Henri Verbeet
4aeaba0d29
wined3d: Use the actual fixup for the stage in gen_ati_shader().
...
This fixes a regression introduced by commit
89139b7589
.
2008-12-10 10:50:18 +01:00
Henri Verbeet
ce4d03318b
wined3d: Fix some spelling errors.
2008-12-09 11:27:51 +01:00
Henri Verbeet
50a87e23e7
wined3d: Fix the IWineD3DVertexShader and IWineD3DPixelShader IUnknown methods.
...
IWineD3DVertexShader isn't supposed to implement IWineD3DPixelShader.
2008-12-09 11:27:32 +01:00
Henri Verbeet
4997bee1bf
wined3d: Add functions to initialize and free shader buffers.
2008-12-09 11:27:13 +01:00
Henri Verbeet
acbdd807b6
wined3d: Don't leak memory in IWineD3DPixelShaderImpl_GenerateShader().
...
This fixes a regression introduced by commit
0bf32b12f5
.
2008-12-09 11:27:02 +01:00
Henri Verbeet
f1f62fb5ce
wined3d: Remove some unused code.
2008-12-09 11:26:49 +01:00
Andrew Talbot
c3cdc671a4
wined3d: Remove unneeded address-of operators from array names.
2008-12-08 22:03:06 +01:00
Henri Verbeet
5ad3bbabda
wined3d: Avoid disabling numbered arrays if we're going to enable them afterwards anyway.
2008-12-08 12:28:31 +01:00
Henri Verbeet
9887d66dad
wined3d: Return early from shader_trace_init() when a NULL pFunction is passed.
...
This is mainly to reduce the size and indentation level of the if-block.
2008-12-08 12:28:27 +01:00
Henri Verbeet
e18629bedd
wined3d: Explicitly pass the shader version to shader_skip_unrecognized().
2008-12-08 12:28:20 +01:00
Henri Verbeet
6e677775ce
wined3d: Explicitly pass the shader version to shader_get_param().
2008-12-08 12:28:17 +01:00
Henri Verbeet
afd5a53bd0
wined3d: Load texture coordinates from the correct streams.
...
This fixes a regression introduced by commit
a2febdd200
.
2008-12-08 12:28:11 +01:00
Henri Verbeet
0c954ef743
wined3d: Explicitly pass the shader version to shader_dump_param() and shader_dump_arr_entry().
2008-12-05 11:59:09 +01:00
Henri Verbeet
71a8a77cf9
wined3d: Explicitly pass the shader version to shader_dump_decl_usage().
2008-12-05 11:59:06 +01:00
Henri Verbeet
a13df0e4ef
wined3d: Explicitly pass the version and instruction table to shader_get_opcode().
2008-12-05 11:59:02 +01:00
Henri Verbeet
af1bc3d9ed
wined3d: Remove a redundant condition in shader_get_opcode().
2008-12-05 11:58:58 +01:00
Henri Verbeet
a2febdd200
wined3d: Slightly improve drawStridedSlow() performance.
...
This moves a couple of checks outside of the main drawing loop, since
they're not going to change anyway.
2008-12-05 11:58:53 +01:00
Henri Verbeet
74acbf9c16
wined3d: Get rid of vcheckGLcall.
...
Everywhere it's used a regular checkGLcall will do just as well.
2008-12-04 12:00:29 +01:00
Stefan Dösinger
e04556bb16
wined3d: Fix D3DFMT_R32F, R16F, G16R16F, ... in the pixel shader.
...
This allows us to drop the load time conversion and the clear
readback hack and replaces it with a color fixup in the fixed
function pipeline replacement.
2008-12-04 12:00:15 +01:00
Henri Verbeet
89139b7589
wined3d: Make shader texture format fixups more generic.
...
Based on a patch by Stefan Dösinger. This is more flexible, and allows
the shader backend implementation to be simpler, since it doesn't have
to know about specific formats. The next patch makes use of this.
2008-12-04 11:59:58 +01:00
Henri Verbeet
9f2fa8ba25
wined3d: Remove sampled_format from IWineD3DBaseShaderClass, it isn't used anywhere.
2008-12-04 11:59:14 +01:00
Henri Verbeet
b451048eb7
wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
...
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Chris Robinson
7806e4d85a
wined3d: Make sure a context is set for query object generation.
2008-12-03 10:59:49 +01:00
Alexandre Julliard
6800d3dbb7
wined3d: Fix some macros definitions to make them proper C statements.
2008-12-03 10:03:45 +01:00
Henri Verbeet
5284fce1ac
wined3d: Disable checkGLcall when WINE_NO_DEBUG_MSGS is specified.
2008-12-03 09:49:14 +01:00
Henri Verbeet
70968e69ac
wined3d: Use a bitmask to store which bool and int constants are set.
...
Note that constants_set was never actually NULL for
shader_glsl_load_constantsB() and shader_glsl_load_constantsI().
2008-12-03 09:49:10 +01:00
Henri Verbeet
0ae60765de
wined3d: Make functions static where possible.
2008-12-03 09:47:35 +01:00
Henri Verbeet
2acf8d7947
wined3d: Rename resource functions to reflect that they're not COM functions.
2008-12-03 09:47:26 +01:00
Henri Verbeet
4d60b6633c
wined3d: Rename basetexture functions to reflect that they're not COM functions.
2008-12-03 09:47:16 +01:00
Alexandre Julliard
9c306e9871
wined3d: Make some functions and variables static.
2008-12-02 15:31:17 +01:00
Andrew Talbot
33e0d1610a
wined3d: Sign-compare warnings fix.
2008-12-02 14:12:39 +01:00
Henri Verbeet
92b93172df
wined3d: Remove some unused code.
2008-12-02 14:04:40 +01:00
Henri Verbeet
89241081f6
wined3d: IWineD3DBaseTexture and IWineD3DResource don't need Vtbl's.
2008-12-02 14:04:27 +01:00
Henri Verbeet
5532c990b6
wined3d: Const correctness fixes.
2008-12-02 14:04:15 +01:00
Henri Verbeet
7c0cb8c0c3
wined3d: Const correctness fixes for state.c.
2008-12-02 14:04:08 +01:00
Henri Verbeet
fec9820e56
wined3d: Handle a few "silent" FIXMEs more consistent with the rest of the code.
...
Also avoids needlessly initializing static variables.
2008-12-02 14:04:00 +01:00
Andrew Talbot
89509eb628
wined3d: Sign-compare warnings fix.
2008-12-01 14:25:52 +01:00
Marcus Meissner
f1271f846b
wined3d: Output the rectangles in the debug message.
2008-12-01 14:01:21 +01:00
Henri Verbeet
6f98f19703
wined3d: Const correctness fixes for drawprim.c.
2008-12-01 12:45:29 +01:00
Henri Verbeet
21b8535902
wined3d: Make the lpData member of WineDirect3DStridedData const.
2008-12-01 12:45:23 +01:00
Henri Verbeet
657a016ac5
wined3d: Fix the glWeightPointerARB prototype.
2008-12-01 12:45:18 +01:00
Henri Verbeet
50ebf26894
wined3d: Const correctness fixes for directx.c.
2008-12-01 12:45:10 +01:00
Henri Verbeet
942f82100a
wined3d: Remove some superfluous casts.
2008-12-01 12:45:01 +01:00
Andrew Talbot
f40afa87c6
wined3d: Sign-compare warnings fix.
2008-11-28 12:57:25 +01:00
Henri Verbeet
5326038aa8
wined3d: Const correctness fixes for surface_base.c.
2008-11-28 12:54:02 +01:00
Henri Verbeet
c7880e8916
wined3d: Make minMipLookup_noFilter and magLookup_noFilter const.
...
Note that minMipLookup and magLookup aren't particularly safe to use,
they're global arrays initialized from IWineD3DImpl_FillGLCaps(). The same
goes for the other global dynamic lookup tables.
2008-11-28 12:53:57 +01:00
Henri Verbeet
449c219eb0
wined3d: Const correctness fixes for device.c.
2008-11-28 12:53:41 +01:00
Henri Verbeet
f2b34c97cc
wined3d: Remove some unnecessary casts in process_vertices_strided().
...
lpData is already a pointer to BYTE. Note that the cast for the normal
data was actually wrong.
2008-11-28 12:53:33 +01:00
Henri Verbeet
31d8b27625
wined3d: Const correctness fixes for ati_fragment_shader.c.
2008-11-28 12:53:27 +01:00
Henri Verbeet
4cea13dec7
wined3d: Const correctness fixes for surface.c.
2008-11-26 12:05:27 +01:00
Henri Verbeet
fecfddfb3a
wined3d: Const correctness fixes for glsl_shader.c.
2008-11-26 12:05:21 +01:00
Henri Verbeet
d8f6e63541
wined3d: Const correctness fixes for arb_program_shader.c.
2008-11-26 12:05:14 +01:00
Henri Verbeet
cfb3bea895
wined3d: Make the SHADER_OPCODE_ARG parameter to shader handlers const.
2008-11-26 12:05:06 +01:00
Henri Verbeet
eb78c2a082
wined3d: Const correctness fixes for utils.c.
2008-11-26 12:04:56 +01:00
Henri Verbeet
f552c90c30
wined3d: Make some functions static.
2008-11-25 13:37:55 +01:00
Henri Verbeet
f0a816e8cb
wined3d: Slightly reduce the scope of fragment_palette_conversion.
2008-11-25 13:37:50 +01:00
Henri Verbeet
49b55f677e
wined3d: Don't call IWineD3DSurfaceImpl_GetData() from surface_gdi.c.
2008-11-25 13:37:45 +01:00
Henri Verbeet
b4f0b5bdd0
wined3d: Const correctness fixes.
2008-11-25 13:37:39 +01:00
Henri Verbeet
a6917b143d
wined3d: Use IDL to generate wined3d.h.
2008-11-25 13:37:22 +01:00
Stefan Dösinger
2f98fce9cf
wined3d: Put the ps compile parameters into the glsl program hashmap.
...
This avoids the double search for a pixel shader. The pixel shader
compilation parameter structure is recorded in the GLSL program
hashmap, together with the WineD3D pixel shader.
2008-11-25 13:07:23 +01:00
Stefan Dösinger
33482a732e
wined3d: Enable blue = 1.0 fixup for D3DFMT_V8U8.
...
The dx7 sdk demos need this.
2008-11-25 13:07:14 +01:00
Stefan Dösinger
0bf32b12f5
wined3d: Add the ability to duplicate GL pixel shaders.
...
Some stateblock parameters have to be compiled into the GL pixel
shader code, like lines for pixelformat fixups. This leads to problems
when applications switch those settings, requiring a recompilation of
the shader. This patch enables wined3d to have multiple GL shaders for
a D3D shader(pixel shaders only so far) to handle this more
efficiently.
2008-11-25 13:07:03 +01:00
Stefan Dösinger
aed9305c78
wined3d: Store shader IDs in the vs and ps impl structures.
2008-11-25 13:06:45 +01:00
Stefan Dösinger
dd8905543b
wined3d: Pass some stateblock values around directly.
...
This was suggested by Ivan quite a while ago, and we need it to better
handle conflicting texture format corrections and similar stateblock
value changes which until now required a recompilation of the entire
shader
2008-11-25 13:06:35 +01:00
Stefan Dösinger
ff767f4984
wined3d: Make the shader backend call CompileShader.
...
A number of considerations contribute to this:
1) The shader backend knows best which shader(s) it needs. GLSL needs
both, arb only one
2) The shader backend may pass some parameters to the compilation
code(e.g. which pixel format fixup to use)
3) The structures used in (2) are different in vs and ps, so a
baseshader::Compile won't work
4) The structures in (2) are wined3d-private structures, so
having a public method in the vtable won't work(its a bad idea
anyway).
2008-11-25 13:06:23 +01:00
Francois Gouget
c0e271c4de
wined3d: Remove WINAPI on static functions where not needed.
2008-11-25 11:49:57 +01:00
Roderick Colenbrander
273357264a
wined3d: Add registry key for overriding the pci vendor id.
2008-11-24 14:52:32 +01:00
Roderick Colenbrander
52d59718c7
wined3d: Add registry key for overriding pci device id.
2008-11-24 14:52:25 +01:00
Vincent Pelletier
f442bafb8a
wined3d: Add detection for NVIDIA's GTX 280.
2008-11-24 14:41:58 +01:00
Christian Costa
632d34651f
wined3d: Implement CONVERT_CK_RGB24 in d3dfmt_convert_surface.
2008-11-24 14:18:41 +01:00
Andrew Talbot
fdba8b8593
wined3d: Sign-compare warnings fix.
2008-11-21 11:29:12 +01:00
Henri Verbeet
ba78f072e2
wined3d: Remove some unused code.
2008-11-20 14:25:11 +01:00
Henri Verbeet
8899f3412b
wined3d: wined3d_gl.h should be internal to wined3d.
2008-11-20 14:24:56 +01:00
Stefan Dösinger
5c79a9f437
wined3d: Rename the fragment ffp desc structures.
...
This reflects the fact that they describe the fragment pipeline.
The vertex pipeline will use its own structures.
2008-11-20 12:17:45 +01:00
Stefan Dösinger
cd011661e6
d3d9: Test psize_min vs psize_max vs psize behavior.
...
Add a test that checks what happens if D3DRS_POINTSIZE, D3DRS_POINTSIZE_MIN
and POINTSIZE_MAX have conflicting values. D3DRS_POINTSIZE_MAX trumps
D3DRS_POINTSIZE_MIN, and both MIN and MAX clamp the D3DRS_POINTSIZE value if it is
outside of their range.
2008-11-20 12:17:18 +01:00
Stefan Dösinger
234e995bdc
wined3d: Make sure the arbfp pipeline replacement constants are loaded.
...
The code here skipped constant loading when a pixel shader was in use,
and only reloaded them on ffp use if the shader implementation used
ARB too. This way a e.g. texfactor change could get lost if GLSL
shaders are used, and the texfactor changed while a pixel shader was
in use.
2008-11-20 12:16:57 +01:00
Henri Verbeet
495fcc72a6
wined3d: Avoid using a stack buffer in a few places in shader_hw_map2gl().
2008-11-19 14:22:49 +01:00
Henri Verbeet
9b118cc345
wined3d: Give mov & mova their own handler.
2008-11-19 14:22:41 +01:00
Henri Verbeet
bd427f58a0
wined3d: Make it more obvious the pshader path in shader_hw_map2gl() doesn't handle opcodes without parameters.
2008-11-19 14:22:34 +01:00
Henri Verbeet
29f2fefc2b
wined3d: Fix the cube map coordinates in surface_blt_to_drawable().
...
I don't see how this can ever have worked properly.
2008-11-19 14:22:29 +01:00
Roderick Colenbrander
f571ecd23c
wined3d: Add two missing D3D8/D3D9 capabilities.
2008-11-10 12:57:30 +01:00
Stefan Dösinger
620a423b22
wined3d: Kill the GL_ATI_envmap_bumpmap code.
...
GL_ATI_envmap_bumpmap provides two things: Signed V8U8 pixel formats,
and bump mapping. The extension is only supported on fglrx, and this
driver also supports GL_ARB_fragment_program. Thus the bump mapping
code is never used on any driver out there. Furthermore, if it is
used, it tends to crash the driver
The signed pixel format is used, as it can be used by pixel shaders or
the ARBfp replacement. However, the format is broken in fglrx, and
negative values are clamped to 0.0. This results in test
failures. WineD3D has an alternative codepath using scale+bias to
enable V8U8 using a standard signed RGB which works correctly on
fglrx.
2008-11-04 11:41:14 +01:00
Stefan Dösinger
a8497a5545
wined3d: Fix the num blend values -> type match.
2008-11-04 11:40:37 +01:00
Michael Stefaniuc
efeab9d200
wined3d: Use the integer variant of zero instead of casting "0.0".
2008-11-04 11:26:05 +01:00
Stefan Dösinger
93af8d3631
d3d: Do not restore the display mode in ddraw.
2008-11-03 13:34:13 +01:00
Stefan Dösinger
8b38533f69
wined3d: Restore the fragment replacement prog after depth_blt.
...
The current code properly enabled/disabled GL_ARB_fragment_program
after a depth blit, but it did not restore the bound fragment program
properly. This leads to problems if a depth blit was done between two
draws without any change of the fragment processing settings.
2008-11-03 13:34:13 +01:00
Henri Verbeet
b11dd54258
wined3d: Remove another redundant NULL check (LLVM/Clang).
2008-11-03 11:49:46 +01:00
Henri Verbeet
dfde4c91e0
wined3d: vertexshader should never be NULL in generate_param_reorder_function() (LLVM/Clang).
2008-11-03 11:49:41 +01:00
Henri Verbeet
373a43442d
wined3d: Remove a FIXME that doesn't apply anymore.
2008-11-03 11:49:20 +01:00
Henri Verbeet
6e1b7333e6
wined3d: Print an error when drawStridedSlowVs() is called with 0 idxSize and non-NULL idxData (LLVM/Clang).
2008-10-31 12:58:43 +01:00
Henri Verbeet
c090471a49
wined3d: Properly break in get_argreg() (LLVM/Clang).
2008-10-31 12:58:37 +01:00
Henri Verbeet
795c4a77aa
wined3d: Handle projected cube textures.
2008-10-29 11:52:11 +01:00
Henri Verbeet
d262752aea
wined3d: Handle lack of NPOT support for depth blts.
2008-10-29 11:52:06 +01:00
Henri Verbeet
80818bfc8d
wined3d: Support some more depth blt texture types in surface_depth_blt().
2008-10-29 11:52:01 +01:00
Henri Verbeet
17ab7f6b83
wined3d: Support some more depth blt texture types for arb programs.
2008-10-29 11:51:54 +01:00
Tobias Jakobi
f4e0dec42e
wined3d: Fix typo in baseshader.c.
2008-10-28 13:26:01 +01:00
Henri Verbeet
c52a55d724
wined3d: Fix some indentation.
2008-10-28 12:46:51 +01:00
Henri Verbeet
092b51e82a
wined3d: Rename CreateAdditionalSwapChain to CreateSwapChain.
2008-10-28 12:46:46 +01:00
Henri Verbeet
b33ddbde6a
wined3d: Support some more texture types for GLSL depth blts.
2008-10-28 12:33:36 +01:00
Henri Verbeet
437b342424
wined3d: Pass explicit texcoords to depth blt.
2008-10-28 12:33:27 +01:00
Henri Verbeet
57401fcab2
wined3d: Pass the texture type to the shader depth blt function.
2008-10-28 12:33:18 +01:00
Henri Verbeet
4034a29f19
wined3d: Move depth_blt to surface.c.
2008-10-28 12:33:13 +01:00
Francois Gouget
69553c2514
wined3d: Fix the WineDirect3DCreate() export.
2008-10-27 12:37:27 +01:00
Henri Verbeet
7142754820
wined3d: Remove the SDKVersion parameter to WineDirect3DCreate().
2008-10-24 14:24:59 +02:00
Tobias Jakobi
e79d89ff40
wined3d: Fix some typos.
2008-10-21 11:53:40 +02:00
Henri Verbeet
bf187ed1e0
wined3d: Set the sampler only once in shader_glsl_select_depth_blt().
...
It (obviously) never changes.
2008-10-20 12:23:26 +02:00
Henri Verbeet
2188aa87d6
wined3d: Add support for EXT_framebuffer_multisample.
2008-10-20 12:23:16 +02:00
Roderick Colenbrander
728e61e78b
wined3d: Remove ENTER_GL/LEAVE_GL from VolumeTexture_PreLoad because it doesn't make any GL calls.
2008-10-20 11:39:01 +02:00
Roderick Colenbrander
3e3141da34
wined3d: Protect gl calls in Volume_LoadTexture with ENTER_GL/LEAVE_GL.
2008-10-20 11:38:54 +02:00
Roderick Colenbrander
47372928b8
wined3d: Fix recursive ENTER_GL in UpdateSurface.
2008-10-20 11:38:43 +02:00
Roderick Colenbrander
e848aed2b8
wined3d: ActivateContext caused a lot of recursive ENTER_GL calls while it is especially dangerous in here as this function can indirectly trigger GDI calls.
2008-10-20 11:38:36 +02:00
Roderick Colenbrander
b98a7b5082
wined3d: Fix recursive ENTER_GL in LoadLocation.
2008-10-20 11:38:19 +02:00
Roderick Colenbrander
e5ed8edb89
wined3d: Fix a recursive ENTER_GL in read_from_framebuffer.
2008-10-20 11:38:11 +02:00
Roderick Colenbrander
d4b4810ebe
wined3d: Prevent a recursive ENTER_GL before calling blitter->free_private.
2008-10-20 11:38:02 +02:00
Roderick Colenbrander
3a1aeef7c7
wined3d: Add ENTER_GL/LEAVE_GL to gen_yuv_shader.
2008-10-20 11:37:54 +02:00
Roderick Colenbrander
5163a360e0
wined3d: arbfp_blit_unset should call ENTER_GL/LEAVE_GL instead of the caller.
2008-10-20 11:37:46 +02:00
Roderick Colenbrander
8a002b09c1
wined3d: arbfp_set_shader_blit should handle ENTER_GL/LEAVE_GL instead of the caller.
2008-10-20 11:37:38 +02:00
Vitaliy Margolen
a2b2a4cf79
wined3d: Add one more FBO error status code.
2008-10-18 19:35:20 +02:00
Alexandre Julliard
6cfef95ce7
wined3d: Convert source files to utf-8.
2008-10-18 19:21:20 +02:00
Henri Verbeet
723f3656e5
wined3d: Modifying GL_TEXTURE_MIN_FILTER modifies both the MINFILTER and MIPFILTER sampler states.
2008-10-16 12:35:51 +02:00
Henri Verbeet
bd5abfb1e4
wined3d: Remove a redundant local variable in apply_draw_buffer().
2008-10-16 12:35:40 +02:00
Henri Verbeet
231e2c60b5
wined3d: The container is always non-NULL if GetContainer() succeeds.
2008-10-16 12:35:34 +02:00
Henri Verbeet
f5fbfe47d7
wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable().
2008-10-16 12:35:09 +02:00
Henri Verbeet
e22bda24c6
wined3d: Simplify texture target handling in surface_blt_to_drawable().
2008-10-15 15:22:11 +02:00
Henri Verbeet
c777f962a2
wined3d: We only need to enable texturing for a target if we're going to draw with it (without a shader).
...
Also, these enables cause problems if they're done while the context
is setup for blitting.
2008-10-15 15:22:06 +02:00
Henri Verbeet
2889b42a3f
wined3d: Cleanup properly if creating the context array fails in CreateAdditionalSwapChain().
2008-10-15 15:21:41 +02:00
Henri Verbeet
2bb7aa7252
wined3d: Don't crash in CreateAdditionalSwapChain() if the context array wasn't allocated yet.
2008-10-15 15:21:35 +02:00
Francois Gouget
0f38a60dd3
Assorted spelling fixes.
2008-10-10 14:14:05 +02:00
Henri Verbeet
a98b19cef5
wined3d: Pass the correct RECT to LoadLocation() in LockRect().
2008-10-10 12:27:21 +02:00
Henri Verbeet
cb472a3be7
wined3d: Declare diffuseColor and specularColor inside their respective blocks (LLVM/Clang).
2008-10-10 12:27:17 +02:00
Henri Verbeet
3643d59d5b
wined3d: Make sure some variables are always initialized.
2008-10-09 12:14:26 +02:00
Henri Verbeet
9aaccfe77f
wined3d: Correct some swizzles and write masks in arb_program_shader.
2008-10-09 12:14:21 +02:00
Henri Verbeet
af6636c21c
wined3d: Don't do GL calls without a context.
2008-10-09 12:14:15 +02:00
Henri Verbeet
3b2ac77e12
wined3d: Set the correct pow2Matrix for cube textures when NPOT textures are supported.
2008-10-09 12:14:08 +02:00
Henri Verbeet
8985b7a755
wined3d: Get rid of some redundant assignments (LLVM/Clang).
2008-10-09 12:14:01 +02:00
Henri Verbeet
937ceda47f
wined3d: Remove a redundant initialization of cfgs in CheckDepthStencilCapability (LLVM/Clang).
2008-10-09 12:13:53 +02:00
Henri Verbeet
e9daf92ae6
wined3d: Assign the correct "levels" variable (LLVM/Clang).
2008-10-09 12:13:43 +02:00
Kjell Rune Skaaraas
ed96dd72e3
wined3d: Implement IWineD3DResourceImpl_GetPriority and IWineD3DResourceImpl_SetPriority for resource management.
2008-10-08 14:17:03 +02:00
Henri Verbeet
31d6dbfd74
wined3d: Cleanup CreateAdditionalSwapChain error handling a bit (LLVM/Clang).
2008-10-08 12:16:54 +02:00
Henri Verbeet
0420f17b1f
wined3d: Remove a redundant initialization of cfgs in WineD3D_ChoosePixelFormat.
2008-10-08 12:16:48 +02:00
Henri Verbeet
d8c40f7641
wined3d: Print an error when drawStridedSlow() is called with 0 idxSize and non-NULL idxData (CID 509).
2008-10-08 12:16:35 +02:00
Henri Verbeet
c5fbf98ed2
wined3d: Enable lights on the correct swapchain.
2008-10-06 13:06:44 +02:00
Henri Verbeet
3a7fcec4d7
wined3d: Handle texture coordinates the same way we handle other vertex attributes.
2008-09-25 11:53:10 +02:00