Henri Verbeet
153d8d43aa
wined3d: Move stream state to wined3d_state.
2010-09-21 14:16:58 +02:00
Henri Verbeet
33dfb9539c
wined3d: Move the pixel shader to wined3d_state.
2010-09-20 13:48:13 +02:00
Henri Verbeet
d728d5f0ec
wined3d: Move texture bindings to wined3d_state.
2010-09-18 13:05:49 +02:00
Henri Verbeet
5a3a4ac77a
wined3d: Remove IWineD3DBaseTexture::GetTextureDimensions() from the public wined3d interface.
2010-09-18 13:05:44 +02:00
Ričardas Barkauskas
dc1356484c
wined3d: Add NVDB support.
2010-09-16 10:12:33 -05:00
Henri Verbeet
8fdfc736bf
wined3d: Move sampler states to wined3d_state.
2010-09-16 10:12:24 -05:00
Henri Verbeet
5b3c1a2082
wined3d: Move texture states to wined3d_state.
2010-09-16 10:12:17 -05:00
Henri Verbeet
597da9907a
wined3d: Move transforms to wined3d_state.
2010-09-16 10:12:06 -05:00
Henri Verbeet
5f6ced2767
wined3d: Move the material to wined3d_state.
2010-09-16 10:11:57 -05:00
Henri Verbeet
16d9c91b97
wined3d: Move the viewport to wined3d_state.
2010-09-15 10:33:26 -05:00
Henri Verbeet
937eb7e600
wined3d: Move the scissor rect to wined3d_state.
2010-09-15 10:33:20 -05:00
Henri Verbeet
1ef4f075c1
wined3d: Introduce a separate structure for stateblock states.
...
We'd like to not pass an entire stateblock to things like state handlers and
the shader backend, because those then use the stateblock to get to the
device and through there to all the rest of wined3d. This would also be
required for serialization of wined3d draw and state change commands into a
single GL context. Resource updates would be explicitly excluded from
serialization.
2010-09-15 10:33:14 -05:00
Henri Verbeet
6ce848bee4
wined3d: Introduce a structure for stream state.
2010-09-14 11:43:54 -05:00
Henri Verbeet
b68d257710
wined3d: Get rid of redundant comparisons against NULL / 0.
2010-09-14 09:43:33 -05:00
Joris Huizer
2fd50cb4b8
wined3d: Fix typo in checkGLcall.
2010-09-09 12:45:30 +02:00
Henri Verbeet
952dfe30be
wined3d: Translate before scaling for rhw as well in transform_projection().
2010-09-06 16:14:22 +02:00
Henri Verbeet
3a7f08a56f
wined3d: Rename wined3d_format_desc to wined3d_format.
2010-08-31 14:23:47 +02:00
Henri Verbeet
b233e7b301
wined3d: Rename the "format" field in wined3d_format_desc to "id".
2010-08-26 12:41:44 +02:00
Stefan Dösinger
515eb3d7c4
wined3d: MSVC fixes in state.c.
2010-08-02 12:55:23 +02:00
Henri Verbeet
c411b45da9
wined3d: Use a more consistent name for the normalized texrect "extension".
2010-07-21 09:33:18 +02:00
Henri Verbeet
e8ac9bbd7f
wined3d: Get rid of GLINFO_LOCATION.
2010-05-25 13:29:00 +02:00
Henri Verbeet
b5cec57690
wined3d: Set the state.c GLINFO_LOCATION to *gl_info.
2010-05-25 13:28:14 +02:00
Michael Stefaniuc
6d89364ad1
wined3d: Avoid using the long type.
2010-05-21 18:58:04 +02:00
Henri Verbeet
5dff410254
wined3d: Explicitly pass GL info to buffer_get_sysmem().
2010-05-21 14:37:52 +02:00
Henri Verbeet
d5b68e7640
wined3d: Make sure all fields of the fragment pipe caps are always initialized.
2010-05-03 13:50:45 +02:00
Henri Verbeet
958b523707
wined3d: Store texture sub-resources in IWineD3DBaseTextureClass.
2010-04-25 07:26:51 -05:00
Henri Verbeet
c5de1e1045
wined3d: Store the depth/stencil surface as an IWineD3DSurfaceImpl pointer in the device.
2010-04-20 11:14:42 +02:00
Henri Verbeet
c7a1848656
wined3d: Store render targets as IWineD3DSurfaceImpl pointers in the device.
2010-04-20 11:14:30 +02:00
Henri Verbeet
43e89cb981
wined3d: Prune unsupported world matrix transform states.
2010-04-13 21:13:54 +02:00
Henri Verbeet
284e92def9
wined3d: Validate some more states.
2010-04-08 12:26:07 +02:00
Henri Verbeet
e24473d531
wined3d: Update shader constants on viewport changes.
...
Otherwise the vertex shader will see stale posFixup values.
2010-04-08 12:25:51 +02:00
Henri Verbeet
cece23c7c9
wined3d: Get rid of state_nogl().
...
It's unused, all states that have this as handler have a 0 representative.
2010-04-08 12:25:43 +02:00
Henri Verbeet
3f79ba3019
wined3d: Add an extensionless STATE_INDEXBUFFER handler.
2010-04-08 12:25:38 +02:00
Henri Verbeet
23bfdecd8b
wined3d: Verify all render states have a handler.
2010-04-02 10:36:17 +02:00
Henri Verbeet
2e5976a8c5
wined3d: Move handling of the unimplemented WINED3DRS_BORDERCOLOR state to ddraw.
2010-04-02 10:35:54 +02:00
Henri Verbeet
e62771f7f7
wined3d: Add a state handler for WINED3DRS_ZVISIBLE.
2010-04-02 10:35:37 +02:00
Henri Verbeet
ef34b0ba06
wined3d: Verify state representatives represent themselves.
...
This ensures there's no multilevel indirection in the state table.
2010-04-02 10:35:30 +02:00
Henri Verbeet
8afeb34559
wined3d: Add a state table entry for WINED3DRS_INDEXEDVERTEXBLENDENABLE.
2010-04-01 18:12:42 +02:00
Henri Verbeet
f4330add39
wined3d: Verify each state table entry has either a handler or a representative.
2010-04-01 18:12:42 +02:00
Henri Verbeet
57cfd613a5
wined3d: Explicitly set the state handler to NULL for states with a representative.
...
We should never call the handler for states that have a rep.
2010-04-01 18:12:42 +02:00
Henri Verbeet
f70193b915
wined3d: Use the rep instead of the apply function to determine if a state is used.
2010-04-01 18:12:42 +02:00
Henri Verbeet
03c472bff0
wined3d: Don't call directly into the state table.
2010-04-01 18:12:42 +02:00
Henri Verbeet
a298f37a9a
wined3d: Add a state table entry for WINED3DRS_TWEENFACTOR.
2010-03-31 16:32:57 +02:00
Henri Verbeet
6e1ed1c167
wined3d: Print a FIXME/WARN for all unsupported vertex blend flags.
2010-03-31 16:32:52 +02:00
Henri Verbeet
941c7da08e
wined3d: Don't warn about independent color write masks when the masks are all the same.
2010-03-26 10:29:34 +01:00
Henri Verbeet
4651dd86bf
wined3d: Implement independent color write masks.
2010-03-26 10:29:29 +01:00
Henri Verbeet
f2bcd32bff
wined3d: Replace some VTRACEs with proper TRACEs.
2010-03-18 10:24:51 +01:00
Henri Verbeet
4c7bcb883b
wined3d: Set the texture stage limit based on the fragment pipe caps.
2010-02-05 10:06:08 +01:00
Henri Verbeet
576ea95803
wined3d: Remove the unused device type parameter from the shader backend's get_caps() function.
2010-02-04 13:39:27 +01:00
Henri Verbeet
040452ad90
wined3d: Update the stream info before applying states.
2010-02-03 13:54:02 +01:00
Henri Verbeet
31d51fb175
wined3d: Preload textures before applying states.
2010-02-03 13:54:02 +01:00
Henri Verbeet
d66f5345e6
wined3d: Prune invalid states from the state table.
2010-01-29 13:30:06 +01:00
Henri Verbeet
19516bf69f
wined3d: Add some basic state table validation.
2010-01-29 13:30:05 +01:00
Henri Verbeet
a3e1a6f2ee
wined3d: Use correct texture stage limits in a couple of places.
2010-01-28 11:08:14 +01:00
Henri Verbeet
69861cf873
wined3d: Get rid of the depth range hack.
2010-01-27 11:16:07 +01:00
Henri Verbeet
fe1024ae4f
wined3d: Add a FIXME for missing ARB_depth_clamp support.
2010-01-27 11:15:45 +01:00
Henri Verbeet
98568f0ba1
wined3d: Add support for ARB_vertex_array_bgra.
2010-01-26 12:08:27 +01:00
Henri Verbeet
5bac33d358
wined3d: Remove a few redundant context dereferences.
2010-01-05 12:19:09 +01:00
Henri Verbeet
f50b4c7d71
wined3d: Move "wrap_lookup" to struct wined3d_gl_info.
2010-01-04 11:41:28 +01:00
Henri Verbeet
2c0edb94e3
wined3d: Fix WINED3DRS_DEPTHBIAS handling.
2009-12-31 12:12:17 +01:00
Henri Verbeet
ea2f7a2739
wined3d: Remove some redundant returns.
2009-12-30 13:31:26 +01:00
Henri Verbeet
b3defd4c80
wined3d: Rename "wineD3DDevice" to "device".
2009-12-10 11:54:47 +01:00
Henri Verbeet
bfe6695d30
wined3d: Only disable blending for offscreen targets.
2009-12-09 13:51:08 +01:00
Anders Jonsson
58b203e798
wined3d: Fix typo.
2009-11-16 13:47:49 +01:00
Henri Verbeet
be8026adf6
wined3d: directly pass gl_info to stream_info_element_from_strided().
2009-10-29 13:09:37 +01:00
Henri Verbeet
111307dfba
wined3d: Get rid of the GL_SUPPORT macro.
2009-10-29 13:09:33 +01:00
Henri Verbeet
48e03bc189
wined3d: Introduce a separate structure for various OpenGL implementation limits.
2009-10-29 13:09:27 +01:00
Henri Verbeet
6be41fd59a
wined3d: Get rid of GL_LIMITS.
2009-10-22 10:46:05 +02:00
Henri Verbeet
55047f811a
wined3d: Fix some GLINFO_LOCATION abuse.
2009-10-22 10:45:57 +02:00
Henri Verbeet
9dd78e13d5
wined3d: Printing a FIXME once only works if the relevant BOOL is static (LLVM/Clang).
2009-10-16 13:37:21 +02:00
Henri Verbeet
3bc9d1894d
wined3d: Rename PLIGHTINFOEL to something less awful.
2009-10-14 11:26:17 +02:00
Stefan Dösinger
eda00d97ad
d3d9: Test viewports that are bigger than the surface.
2009-10-02 15:06:38 +02:00
Henri Verbeet
47c84f4f7f
wined3d: Use the DXGI naming convention for all formats.
2009-09-25 15:15:44 +02:00
Henri Verbeet
a25ac586c6
wined3d: Add a state handler for WINED3DRS_SOFTWAREVERTEXPROCESSING.
2009-09-25 15:15:08 +02:00
Henri Verbeet
078273afa6
wined3d: Add support for ARB_depth_clamp.
2009-09-01 14:05:45 +02:00
Henri Verbeet
59c017c8bd
wined3d: Properly check if an attribute is used in state_normalize().
2009-08-26 12:10:42 +02:00
Henri Verbeet
6ef17134d2
wined3d: Properly check if an attribute is used in transform_texture().
2009-08-26 12:10:38 +02:00
Henri Verbeet
bda89180e1
wined3d: Properly check if an attribute is used in streamsrc().
2009-08-25 11:09:40 +02:00
Henri Verbeet
7823679e20
wined3d: Properly check if an attribute is used in state_colormat().
2009-08-24 15:17:33 +02:00
Henri Verbeet
850232810d
wined3d: Properly check if an attribute is used in loadTexCoords().
2009-08-24 15:17:33 +02:00
Henri Verbeet
e48350a471
wined3d: Properly check if an attribute is used in loadVertexData().
2009-08-24 15:17:32 +02:00
Henri Verbeet
4ec2b09d8f
wined3d: Don't check for a "representative" in the MarkStateDirty() functions.
...
States without representative should never be called. Arguably they shouldn't
exist in the first place, but allowing them simplifies the state table.
2009-08-21 11:10:21 +02:00
Henri Verbeet
b2e543b22f
wined3d: Add a state handler for WINED3DRS_DEBUGMONITORTOKEN.
2009-08-21 11:10:15 +02:00
Henri Verbeet
5a24a02ad5
wined3d: Pass the context's gl_info to state handlers.
2009-08-19 14:45:34 +02:00
Henri Verbeet
ffb38da024
wined3d: Try to force a top-left filling convention.
2009-08-19 14:45:09 +02:00
Henri Verbeet
f7918b978f
wined3d: Make the "luminanceparams" shader_reg_maps member a bitmap.
2009-08-12 13:22:50 +02:00
Henri Verbeet
95bb4c0486
wined3d: Make the "bumpmat" shader_reg_maps member a bitmap.
2009-08-12 13:22:44 +02:00
Henri Verbeet
3bf0ad4528
wined3d: Explicitly pass the context to the shader_select() handler.
2009-08-07 12:11:06 +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
da1e5573da
wined3d: Rename WineD3DContext to struct wined3d_context.
2009-08-03 15:01:48 +02:00
Henri Verbeet
2c71b85334
wined3d: Explicitly pass the context to get_drawable_size().
2009-07-24 13:10:37 +02:00
Henri Verbeet
43e6686a78
wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info.
2009-07-17 11:22:07 +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
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
Tobias Jakobi
05c4d0a8b0
wined3d: Fix comments about NP2 fixup.
2009-07-02 11:57:01 +02:00
Henri Verbeet
7363b6e2e3
wined3d: Document GL context dependencies.
2009-06-26 12:05:07 +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
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
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
2cb8f42168
wined3d: Support clipplanes with GLSL.
...
This is the Nth attemt to make clipping work with GLSL shaders. The patch now
uses the GLSL quirk table to handle cards that need a custom varying for
gl_ClipPos, and the code is adapted to the changed state table and shader
backend system.
2009-05-18 13:59:16 +02:00
Henri Verbeet
b35e469d9d
wined3d: Document functions that depend on the caller to do GL locking.
2009-05-15 10:25:41 +02:00
Henri Verbeet
91c3a5eac1
wined3d: Directly call basetexture_apply_state_changes().
...
All the implementations of IWineD3DBaseTexture::ApplyStateChanges() forward to
basetexture_apply_state_changes().
2009-05-13 11:55:01 +02:00
Stefan Dösinger
668328a697
wined3d: Work around a bad crash in fglrx.
2009-05-08 12:16:50 +02:00
Stefan Dösinger
3dc55010ea
wined3d: Fix a few more direct buffer accesses.
2009-04-28 13:10:02 +02:00
Tobias Jakobi
6e970c5d95
wined3d: glsl: Enable load_np2fixup_constants.
2009-04-10 14:00:58 +02:00
Stefan Dösinger
2a7a237170
wined3d: Merge indexbuffer and buffer implementations.
2009-04-08 11:37:24 +02:00
Tobias Jakobi
94a7cd42ed
wined3d: Simplify sampler_texmatrix using pow2Matrix_identity.
2009-03-31 12:40:30 +02:00
Tobias Jakobi
38239be58c
wined3d: GLSL: Implement texrect coord fixup.
2009-03-31 12:40:21 +02:00
Henri Verbeet
ef2d704183
wined3d: Store the format_desc itself in struct wined3d_stream_info_element.
2009-03-30 15:11:24 +02:00
Stefan Dösinger
8d4ac8ac1b
wined3d: Remove a TODO.
...
init_materials() doesn't exist, and I don't know what the TODO means with
primitive type (the diffuse stuff is already handled properly).
2009-03-30 14:21:08 +02:00
Henri Verbeet
4434d00f84
wined3d: Unify vertex and texture formats.
...
Some fields should be redundant now, eg. gl_vtx_type and glType. I'll leave
that for a different patch to fix though.
2009-03-27 15:51:25 +01:00
Henri Verbeet
d7c7c76850
wined3d: Use separate structures for ddraw style strided data and wined3d's internal stream info.
2009-03-27 15:51:25 +01:00
Henri Verbeet
c0c1c42288
wined3d: Pass the number of components to glVertexBlendARB().
2009-03-26 14:48:16 +01:00
Henri Verbeet
663e5a6a4c
wined3d: Simplify the "transformed" check in state_lighting().
...
It doesn't really matter if lighting is enabled or not if we don't have
position data.
2009-03-26 14:48:10 +01:00
Henri Verbeet
6afd97cc9f
wined3d: Remove unused attributes from WineDirect3DVertexStridedData.
...
These are essentially unused, and mostly just complicate the code.
2009-03-26 14:47:52 +01:00
Henri Verbeet
42e31a4242
wined3d: Fix a few sign compare warnings.
2009-03-25 11:12:30 +01:00
Henri Verbeet
771fe7fd8a
wined3d: Implement WINED3DTSS_TCI_SPHEREMAP.
2009-03-25 11:12:07 +01:00
Henri Verbeet
3234a4af2d
wined3d: Reduce the number of checkGLcall's in tex_coordindex() a bit.
2009-03-25 11:12:02 +01:00
Henri Verbeet
61cd872fa7
wined3d: Print a FIXME in tex_coordindex() when NV_TEXGEN_REFLECTION isn't supported.
2009-03-25 11:11:57 +01:00
Henri Verbeet
f63313fe3e
wined3d: Fix the indentation in tex_coordindex().
...
The indentation here is pretty horrible. Also removes a couple of fairly
useless comments.
2009-03-25 11:11:32 +01:00
Henri Verbeet
8255dde127
wined3d: Print a warning when the stage isn't mapped to a valid texture unit in tex_coordindex().
2009-03-25 11:11:24 +01:00
Henri Verbeet
a56e3a102b
wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry().
2009-03-13 11:29:10 +01:00
Henri Verbeet
1dcf222ab2
wined3d: Get rid of some calls to getFormatDescEntry().
...
Use the format description stored in the resource instead.
2009-03-12 13:09:55 +01:00
Henri Verbeet
4ff5736edf
wined3d: Don't compare texUnitMap entries to -1.
2009-03-09 14:39:34 +01:00
Henri Verbeet
a3df476706
wined3d: Buffer object ID's are supposed to be unsigned.
2009-03-09 14:39:18 +01:00
Henri Verbeet
aa3027a604
wined3d: Merge IWineD3DVertexBuffer with IWineD3DBuffer.
...
That still leaves IWineD3DIndexBuffer, but that code is also mostly similar,
except for the conversion code (which will be unused there).
2009-03-06 15:35:58 +01:00
Stefan Dösinger
6012475e59
wined3d: Properly update last_was_pshader.
2009-02-24 16:57:30 +01:00
Henri Verbeet
828f42cb1f
wined3d: Add some traces to state handlers.
...
Should make it a bit clearer what's happening in some cases.
2009-02-19 12:53:44 +01:00
Stefan Dösinger
4386a827e9
wined3d: Pass the requested srgb flag to PreLoad.
...
Add a new wined3d-internal PreLoad function to textures and surfaces
that takes a parameter specifying wether the rgb or srgb texture
should be loaded.
2009-02-17 12:51:36 +01:00
Stefan Dösinger
c585b4de99
wined3d: Duplicate GL textures for srgb switching.
...
This reduces the number of srgb switching reloads quite a lot. The only
situation in which a reload is needed is if the rgb copy is modified on the GL
side and the srgb copy is needed.
2009-02-17 12:48:05 +01:00
Henri Verbeet
bae1ec98ca
wined3d: Don't use drawStridedFast() for drawing pretransformed vertices.
...
This was exposed by adding EXT_vertex_array_bgra support, previously we would
almost never hit this because color data being present would already prevent
us from using drawStridedFast(). Thanks to Stefan for spotting this.
2009-01-23 13:12:58 +01:00
Henri Verbeet
0cc5f0d3eb
wined3d: Don't use drawStridedFast() when pointsize data is present.
2009-01-23 13:12:52 +01:00
Henri Verbeet
e82eef28f9
wined3d: Take EXT_vertex_array_bgra into account in send_attribute() and loadNumberedArrays().
2009-01-23 13:12:47 +01:00
Stefan Dösinger
50109aa969
wined3d: Get rid of last_was_foggy_shader & friends.
...
The fog settings do not depend on wether the shader writes to oFog or not,
instead they depend on the FOGVERTEXMODE and FOGTABLEMODE settings, and if a
vertex shader is bound at all.
It works the same way as with the fixed function, and having a vertex shader
is the same as using pretransformed vertices, just that the fog coord comes
from the shader instead of the specular color:
FOGTABLEMODE != NONE: The Z coord is used, oFog is ignored
FOGTABLEMODE == NONE, with VS: oFog is used
FOGTABLEMODE == NONE, no VS, XYZ: Z is used
FOGTABLEMODE == NONE, no VS, XYZRHW: diffuse color is used
2009-01-20 12:45:40 +01:00
Henri Verbeet
44240eff27
wined3d: Remove some comments.
2009-01-15 12:43:32 +01:00
Stefan Dösinger
365e1f3b07
wined3d: Avoid hooking non-fog glEnable/glDisable calls.
...
This prevents fallout from the GL_EXT_fog_coord emulation. glEnable
and glDisable calls other than those that change GL_FOG are not
hooked. The glEnableWINE and glDisableWINE functions can be used to
add other hooks too if ever needed.
2009-01-12 13:03:47 +01:00
Stefan Dösinger
1deafcb5a7
wined3d: Split the remains of state_fog.
2009-01-12 13:02:49 +01:00
Stefan Dösinger
061087811f
wined3d: Remove the apply_pshader_fog state handler.
...
The fog doesn't depend on pixel shaders any longer(but still vice
versa), so we don't need this state any more.
2009-01-12 13:02:39 +01:00
Stefan Dösinger
2dd18635c9
wined3d: Move fogdensity and fogcolor to the fragment pipeline.
2009-01-12 13:02:29 +01:00
Stefan Dösinger
7c21147dcd
wined3d: Remove the pixelshader fogstart/fogend optimization.
2009-01-12 13:01:49 +01:00
Allan Tong
29dd286d79
wined3d: Add code to cleanup device multistate_funcs.
2009-01-10 17:43:11 +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
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
cc447eac55
wined3d: Move position_transformed out of u.s in struct WineDirect3DVertexStridedData.
2009-01-08 13:21:31 +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
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
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
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
31da3c0578
wined3d: Emulate GL_EXT_fog_coord.
2008-12-16 14:34:11 +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
8553665cb1
wined3d: Move the shader version to reg_maps.
2008-12-15 14:00:26 +01:00
Stefan Dösinger
c0a715977d
wined3d: Remove a blank line in state.c.
2008-12-15 12:24:52 +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
b409061337
wined3d: Make some constant arrays also static.
...
As pointed out by Dan Kegel.
2008-12-10 10:50:37 +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
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
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
b451048eb7
wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
...
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Alexandre Julliard
6800d3dbb7
wined3d: Fix some macros definitions to make them proper C statements.
2008-12-03 10:03:45 +01:00
Alexandre Julliard
9c306e9871
wined3d: Make some functions and variables static.
2008-12-02 15:31:17 +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
Henri Verbeet
21b8535902
wined3d: Make the lpData member of WineDirect3DStridedData const.
2008-12-01 12:45:23 +01:00
Henri Verbeet
d8f6e63541
wined3d: Const correctness fixes for arb_program_shader.c.
2008-11-26 12:05:14 +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
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
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
Tobias Jakobi
e79d89ff40
wined3d: Fix some typos.
2008-10-21 11:53:40 +02:00
Alexandre Julliard
6cfef95ce7
wined3d: Convert source files to utf-8.
2008-10-18 19:21:20 +02:00
Henri Verbeet
9e3b9f8b41
wined3d: Add a checkGLcall() at the end of loadTexCoords().
...
To prevent GL errors in loadTexCoords from showing up in different state handlers
2008-09-17 20:50:04 +02:00
Henri Verbeet
99981f2604
wined3d: Remove some assumptions that PreLoad() will always bind the texture.
2008-09-17 20:49:38 +02:00
Henri Verbeet
27b8f719ca
wined3d: Fix the half pixel offset.
...
Turns out the original fix was correct for fixed function, but for the
wrong reason. The shader path was already correct. This fixes a
regresssion introduced by 932e95c111
.
2008-09-10 12:03:42 +02:00
Henri Verbeet
932e95c111
wined3d: Translate one pixel down after flipping for offscreen rendering.
2008-09-08 14:09:29 +02:00
Stefan Dösinger
fe64fe5ef8
wined3d: Fix uploading higher transform matrices.
2008-09-05 11:23:30 +02:00
Henri Verbeet
5fd7a59e70
wined3d: Use the correct representative for texture transform states.
2008-09-04 11:15:09 +02:00
Francois Gouget
9c63e186c6
wined3d: Add a '\n' to Wine traces.
2008-09-02 13:59:11 +02:00
Stefan Dösinger
af8d268a39
wined3d: Handle projected textures properly in arbfp and atifs.
...
GL_ARB_fragment_program and GL_ATI_fragment_shader can disable
projected textures properly, and they can also handle
D3DTTFF_PROJECTED | D3DTTFF_COUNT3 properly.
2008-08-28 11:24:49 +02:00
Stefan Dösinger
a580325a47
wined3d: Remove some more junk code.
2008-08-28 11:24:49 +02:00
Stefan Dösinger
8f20b882bb
wined3d: Handle texture transforms in the TEXTURETRANSFORMFLAGS state.
...
This is a nop by itself, but it makes it easier for fragment pipelines
to read WINED3DTSS_TEXTURETRANSFORMFLAGS.
2008-08-27 13:21:24 +02:00
Stefan Dösinger
8dcc6b66dc
wined3d: Clean up the texbeml parameter forward.
...
There's no point in separating scale and luminance since they're
uploaded at the same time. We still want to separate the stages
though.
2008-08-27 13:21:24 +02:00
Stefan Dösinger
ec94c2ea99
wined3d: Don't enable texture dimensions with shaders.
...
ARB and GLSL don't need that. If a shader backend like atifs or nvts
need it in the future, the shader backend should deal with that rather
than the ffp pipeline.
2008-08-21 13:33:20 +02:00
Stefan Dösinger
bfe7067973
wined3d: Ask the ffp/shader/blit implementation about format support.
...
If a format is not supported natively by opengl, a shader may be able
to convert it. Up to now, CheckDeviceFormat had magic knowldge which
GL extensions lead to which supported format. This patch adds
functions that allow CheckDeviceFormat to ask the actual
implementation for its capabilities.
2008-08-20 12:26:02 +02:00
Stefan Dösinger
a7d5b1e9a5
wined3d: Move the pshader fog update to the vertex pipeline.
2008-08-05 14:09:36 +02:00
Stefan Dösinger
370b8299ab
wined3d: Honor the texcoordindex when setting the texture matrix.
2008-07-24 11:56:02 +02:00
Stefan Dösinger
eea2c95727
wined3d: Move set_tex_op(_nvrc) to their specific files.
2008-07-22 13:01:45 +02:00
Stefan Dösinger
448fee2879
wined3d: Whitespace fix.
2008-07-22 13:01:07 +02:00
Stefan Dösinger
c088edeae7
wined3d: Use GL_ARB_texture_non_power_of_two emulation.
...
ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).
Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.
2008-07-18 11:41:09 +02:00
Stefan Dösinger
55ab14a4ed
wined3d: Move an VBO support check to the state template.
2008-07-18 11:40:19 +02:00
Stefan Dösinger
dc203d36c9
wined3d: Remove more dead code.
...
The opengl extension mentioned in that code was never finished, and as
far as I know there is no way to make use of tangent data in the d3d
fixed function pipeline as well.
2008-07-18 11:40:12 +02:00
Stefan Dösinger
e5f42f91b6
wined3d: Remove GL_EXT_vertex_weighting stubs.
2008-07-18 11:40:00 +02:00
Stefan Dösinger
ebc77732c1
wined3d: Move the vertexblend support check to the template.
2008-07-18 11:39:44 +02:00
Stefan Dösinger
f981afd7d3
wined3d: Check for ATI_ENVMAP_BUMPMAP in the template.
...
Note that GL_ATI_envmap_bumpmap is not the same as
GL_ATI_fragment_shader. envmap_bumpmap is used together with the
regular opengl ffp pipeline and is not used (other than for
pixelformats) if GL_ATI_fragment_shader is used.
2008-07-18 11:39:38 +02:00
Stefan Dösinger
8bb11dad76
wined3d: Only register the np2 texture fixup if needed.
2008-07-18 11:39:18 +02:00
Stefan Dösinger
d247953687
wined3d: Test for multisampling in the template.
2008-07-17 11:45:00 +02:00
Stefan Dösinger
9c1b6581c6
wined3d: Move the point sprite support test into the template.
2008-07-17 11:44:54 +02:00
Stefan Dösinger
94e455343d
wined3d: Split the psizemax state handler.
2008-07-17 11:44:48 +02:00