Alexander Dorofeyev
7c8b8e0a93
wined3d: Set isInDraw later in drawPrimitive.
...
This should fix the problem that in LoadLocation SFLAG_INTEXTURE path gl calls
can be made without activating context, due to isInDraw checks.
2008-04-08 13:20:34 +02:00
Rico Schüller
a44da70d63
wined3d: Improve drawStridedInstanced().
2008-04-07 21:20:07 +02:00
Alexander Dorofeyev
5ccf91b705
wined3d: LEAVE_GL when exiting with error in tesselate_rectpatch.
2008-04-07 21:17:49 +02:00
Stefan Dösinger
b1d8af7926
wined3d: Update copyright lines.
2008-04-02 20:22:42 +02:00
Alexander Dorofeyev
3d2bdf52cd
wined3d: Handle zero primitive count.
2008-03-24 20:40:13 +01:00
Stefan Dösinger
1424e7fd09
wined3d: Make Clear aware of the depth stencil sharing.
2008-02-05 12:37:01 +01:00
Stefan Dösinger
3d2aa7afa0
wined3d: De-Statify depth blit opengl resources.
2008-02-05 12:33:15 +01:00
Andrew Talbot
b3a58a2486
wined3d: Remove unneeded casts.
2008-01-24 11:41:36 +01:00
Austin English
3471f841a1
wined3d: Spelling fixes.
2008-01-18 12:53:33 +01:00
Stefan Dösinger
b5f925cae0
wined3d: Implement half float vertex buffer conversion.
2007-12-21 13:13:56 +01:00
Stefan Dösinger
aaa0e5090a
wined3d: Add a test for 16 bit floats.
2007-12-20 12:10:16 +01:00
Stefan Dösinger
2d90449500
wined3d: Fixed function vertex attribute types are flexible.
2007-12-20 10:49:42 +01:00
Stefan Dösinger
a3c2fb9e64
wined3d: Store if half float conversion is needed in the decl.
2007-12-20 10:48:16 +01:00
Stefan Dösinger
7a1d35e513
wined3d: Emulate half float vertices if GL_NV_half_float is not there.
2007-12-19 12:19:27 +01:00
Michael Stefaniuc
a526ad6cbc
wined3d: Fix a "ordered comparison of pointer with integer zero".
2007-12-11 14:59:54 +01:00
Gerald Pfeifer
f4ec0a209b
wined3d: Fix error handling in fixed_get_input().
2007-12-05 13:47:10 +01:00
Stefan Dösinger
e4f8a2da2b
wined3d: Depth stencil fixes.
2007-11-14 11:58:36 +01:00
Stefan Dösinger
948292dbc3
wined3d: Move texture -> drawable blits to LoadLocation.
2007-11-01 12:37:43 +01:00
Stefan Dösinger
dcff7dc213
wined3d: Begin centralizing surface location management.
2007-10-26 15:17:19 +02:00
Stefan Dösinger
4c51db896c
wined3d: Check for NULL streams.
2007-09-20 15:53:19 +02:00
Stefan Dösinger
282696b4f6
wined3d: Supply texture coords even if no texture is bound and pshaders are used.
2007-08-31 19:32:46 +02:00
Stefan Dösinger
643d1e8847
wined3d: Tidy up the vbo removal from the strided data.
2007-08-30 11:57:18 +02:00
Stefan Dösinger
8c9c084004
wined3d: Use 0/0/0 as normal if no normal is supplied.
2007-08-30 11:57:18 +02:00
Stefan Dösinger
4779a27eed
wined3d: Remove the D3DTTFF_PROJECTED handling from drawStridedSlow.
2007-08-28 11:55:33 +02:00
Stefan Dösinger
fe0f0eb48a
wined3d: Some texture transform fixes.
2007-08-27 18:28:43 +02:00
Stefan Dösinger
6ec6c941fa
wined3d: BaseVertexIndex can be negative.
2007-08-27 12:00:42 +02:00
Stefan Dösinger
98bc83be7c
wined3d: Fall back to drawStridedSlow if fog coords are used.
2007-08-23 13:33:22 +02:00
H. Verbeet
3c609c11e7
wined3d: UBYTE4 data shouldn't be normalized.
2007-08-20 22:24:48 +02:00
Hernan Rajchert
6aead911fb
wined3d: Fixed error message when glDrawElement fails.
2007-08-13 11:32:07 +02:00
Stefan Dösinger
b8dd5839ef
wined3d: Store the position_transformed flag in the vdecl.
2007-08-08 15:32:00 +02:00
Stefan Dösinger
06e51c21e1
wined3d: Determine used streams at vdecl creation.
2007-08-08 15:32:00 +02:00
Roderick Colenbrander
e77da5ef8a
wined3d: Don't call ActivateContext between ENTER_GL/LEAVE_GL.
2007-08-07 12:36:32 +02:00
H. Verbeet
82245cb5d7
wined3d: Properly load FLOAT16_2 and FLOAT16_4 vertex data.
2007-08-02 12:18:41 +02:00
Francois Gouget
5266e57975
Assorted spelling fixes.
2007-07-31 21:37:50 +02:00
H. Verbeet
e652128fdf
wined3d: Pass the correct target to glMultiTexCoord.
2007-07-25 13:02:44 +02:00
H. Verbeet
fc4c73902a
wined3d: Trace the declaration element type in primitiveDeclarationConvertToStridedData().
2007-07-24 11:25:52 +02:00
Stefan Dösinger
97cd8bab1b
wined3d: Print the fixed and unfixed vertex warning only when needed.
2007-07-10 13:30:42 +02:00
Stefan Dösinger
26ebe396c3
wined3d: Implement high order patches.
2007-07-06 19:32:47 +02:00
H. Verbeet
5b7758f80c
wined3d: Increase the sizes of texturing related arrays, in order to support vertex textures.
2007-06-26 11:57:17 +02:00
H. Verbeet
440ca84680
wined3d: Fix various incorrect uses of GL_LIMITS(texture_stages) and GL_LIMITS(sampler_stages).
2007-06-22 12:19:10 +02:00
H. Verbeet
c60bdca5b0
wined3d: Make use of the texUnitMap in drawStridedSlow as well.
2007-06-21 13:10:40 +02:00
Stefan Dösinger
b081cbaf40
wined3d: Emulate tracking of multiple material properties.
2007-06-21 13:09:30 +02:00
Stefan Dösinger
030b92a2f6
wined3d: Remove the FVF codepath from drawprim.
2007-06-21 13:09:08 +02:00
Stefan Dösinger
a460a2df43
wined3d: Store the gl information in a per adapter structure and initialize it only once.
2007-06-11 13:51:06 +02:00
H. Verbeet
45b531fcea
wined3d: Make sure the color buffer is not modified by depth_blt().
2007-06-06 12:10:39 +02:00
Stefan Dösinger
adb9b13b81
wined3d: Implement vertex blending using GL_ARB_vertex_blend.
2007-05-03 14:24:46 +02:00
Bernd Buschinski
aff22d0472
wined3d: Fix drawStridedSlow typo.
2007-04-18 13:13:17 +02:00
H. Verbeet
8d3c078e6c
wined3d: Disable the scissor test for depth blits.
2007-04-10 21:39:32 +02:00
H. Verbeet
c9b178b594
wined3d: Fixup FBO depth attachments when the depth attachment is larger than the render target.
2007-04-09 12:39:23 +02:00
H. Verbeet
3d4e054b55
wined3d: Handle FBO attachments slightly more efficiently.
2007-04-09 12:38:53 +02:00
Stefan Dösinger
a9e04dd87f
wined3d: Index buffer data is unsigned.
2007-04-07 10:58:25 +02:00
Fabian Bieler
7cedd56d24
wined3d: Implement linear fog with pixel shader.
2007-03-23 12:30:23 +01:00
Francois Gouget
e11ca0a7fd
wined3d: Remove space before '\n' in trace.
2007-03-14 12:10:47 +01:00
Stefan Huehner
4d1d01f266
Mark several functions as static.
2007-03-13 13:35:12 +01:00
H. Verbeet
30ee071eb9
wined3d: Disable vertex shaders when transformed vertices are used.
2007-03-13 11:55:55 +01:00
H. Verbeet
b22ca33a85
wined3d: 11 space indent is ugly.
2007-03-13 11:54:08 +01:00
Stefan Dösinger
603e7933ea
wined3d: Blit the offscreen texture into the drawable if needed.
...
When using pbuffer or back buffer offscreen rendering the content of
the drawable will have been overwritten. Thus the texture has to be
written into the drawable. An exception is the (pretty common) case
that the whole render target is cleared before rendering to it.
2007-03-12 12:02:05 +01:00
Stefan Dösinger
c54a0fc2cf
wined3d: Rework surface dirtification.
...
Previously the surfaces stored a flag if the system memory copy was
ahead of the gl copy(SFLAG_DIRTY) or the gl copy is
ahead(SFLAG_GLDIRTY). The pbuffer copy was 'managed' differently using
SFLAG_INPBUFFER and SFLAG_INTEXTURE.
This patch replaces them with 3 flags, INSYSMEM, INPBUFFER and
INTEXTURE which specify which copy contains the most up to date
copy. It is perfectly valid to have more than one of those flags
set. One must be set at least (except at init, when no content is in
the surface yet). When one copy is modified, the flags for the others
are removed.
2007-03-07 12:18:14 +01:00
Stefan Dösinger
2a90bc2c7a
wined3d: Remove dead code from drawprim.c.
2007-02-21 10:57:50 +01:00
Stefan Dösinger
fb1469c47d
wined3d: Do not print the fixed / unfixed vertices warning with shaders.
2007-02-21 10:55:14 +01:00
Stefan Dösinger
a9d681c3ad
wined3d: With FVFs only one stream is used.
2007-02-20 11:50:26 +01:00
Stefan Dösinger
59ae2a56fb
wined3d: Use VBOs for index buffers.
2007-02-20 11:50:10 +01:00
H. Verbeet
498f9c507a
wined3d: Use WINED3DSTREAMSOURCE_INSTANCEDATA rather than D3DSTREAMSOURCE_INSTANCEDATA.
2007-02-15 11:15:25 +01:00
Stefan Dösinger
0feddccfe3
wined3d: Instancing emulation.
2007-02-14 20:46:25 +01:00
H. Verbeet
32e5cac2be
wined3d: Get rid of the vertexDeclaration field in IWineD3DVertexShaderImpl.
2007-02-14 13:54:29 +01:00
H. Verbeet
8f0884066f
wined3d: Add WINED3DDECLUSAGE, use it.
2007-02-14 13:50:22 +01:00
Stefan Dösinger
8cae0e4d07
wined3d: Dirtify the render targets, not the primary swapchain on draws.
2007-02-14 12:27:23 +01:00
Stefan Dösinger
c1623d4e7b
wined3d: Use the context manager to prepare for drawing.
2007-02-13 12:03:40 +01:00
Stefan Dösinger
380930dc54
wined3d: Store dirty states per context.
2007-02-13 11:55:07 +01:00
Stefan Dösinger
c739c387b6
wined3d: Add a per context structure for context management.
2007-02-13 11:50:14 +01:00
Stefan Dösinger
354fdae524
wined3d: Implement per stream offsets.
2007-01-17 11:24:04 +01:00
Stefan Dösinger
1d3abdeeaa
wined3d: Store the stream number in the strided structure.
2007-01-17 11:23:54 +01:00
Stefan Dösinger
71f923a6d2
wined3d: Improve drawStridedSlow a bit.
2007-01-17 11:23:41 +01:00
Stefan Dösinger
9b4920996e
wined3d: Move material applying to the state table.
2007-01-10 22:00:34 +01:00
Stefan Dösinger
dfeb40cbff
wined3d: Remove the invymat from drawprim.c.
2007-01-10 22:00:25 +01:00
Stefan Dösinger
329670c7f1
wined3d: Do not reset the material.
2007-01-10 22:00:17 +01:00
Stefan Dösinger
9f2e0fa2e0
wined3d: Do not try to read the vertex decl when the stateblock isn't finalized.
2007-01-08 21:00:14 +01:00
Stefan Dösinger
d47ec21280
wined3d: Vertex buffers can use the declaration from the device.
2007-01-08 20:59:57 +01:00
Stefan Dösinger
b310e98693
wined3d: Clean up drawprim a bit.
2007-01-08 20:59:38 +01:00
Stefan Dösinger
09ab812e79
wined3d: Avoid negative draw start indices.
2007-01-08 20:58:11 +01:00
Stefan Dösinger
8e37fcd266
wined3d: Move applying shader constants to the state table.
2007-01-08 20:57:57 +01:00
Stefan Dösinger
799770b992
wined3d: Apply shaders in their state handlers.
2007-01-08 20:56:51 +01:00
Stefan Dösinger
7e314011fb
wined3d: Move debugging fixmes from drawprim to the stream source handler.
2007-01-08 20:56:36 +01:00
Stefan Dösinger
27bac24acb
wined3d: Re-add the fixed function stream source trace.
2007-01-08 20:56:06 +01:00
Stefan Dösinger
d5f18e6a63
wined3d: Move applying the gl stream sources to the state table.
2007-01-08 20:55:51 +01:00
Stefan Dösinger
e26e3ee5f3
wined3d: Remove d3ddevice_set_ortho.
2007-01-03 11:19:55 +01:00
Stefan Dösinger
82bd0790ed
wined3d: Move the projection matrix into its own state.
2007-01-03 11:19:45 +01:00
Stefan Dösinger
20de200fa3
wined3d: Move the functionality of primitiveInitState to the state table.
2007-01-03 11:17:08 +01:00
Stefan Dösinger
438c172841
wined3d: Move decoding the vertex declaration to the vertexshader state handler.
2007-01-03 11:10:01 +01:00
Stefan Dösinger
04ce141940
wined3d: Pass the user pointer strided structure via the device implementation.
2007-01-03 11:03:03 +01:00
Stefan Dösinger
71631f7638
wined3d: Use the baseVertexIndex in the stateblock.
2007-01-03 11:02:51 +01:00
Stefan Dösinger
091f9c28e4
wined3d: Put the decoded strided data structure into the device.
2007-01-02 12:29:04 +01:00
H. Verbeet
bf250285ff
wined3d: Restore texture bindings in the FBO code.
2006-12-26 12:37:38 +01:00
H. Verbeet
d6010edee0
wined3d: Copy the depth buffer after all dirty states are applied.
2006-12-26 12:37:29 +01:00
Stefan Dösinger
22e2a5aca5
wined3d: Add pixel shaders to the state table.
2006-12-20 17:09:21 +01:00
Stefan Dösinger
666b507766
wined3d: Move samplers to the state table.
2006-12-20 17:07:56 +01:00
Stefan Dösinger
bd6a6ad2c0
wined3d: Move WINED3DTSS_ALPHAOP to the state table.
2006-12-20 17:06:10 +01:00
Stefan Dösinger
762af471e8
wined3d: Move WINED3DTSS_COLOROP to the state table.
2006-12-20 17:06:00 +01:00
Stefan Dösinger
1e264e5dd4
wined3d: Temporary disable nvrc junk texture skipping.
2006-12-20 17:05:11 +01:00
Stefan Dösinger
062b6ffc5c
wined3d: Catch nop render state changes.
2006-12-19 16:53:18 +01:00
Stefan Dösinger
7532c759f1
wined3d: Add the state dirtification infrastructure.
2006-12-19 16:53:00 +01:00
Dmitry Timoshkov
47ffd7ae95
wined3d: Make some data const.
2006-12-14 20:11:41 +01:00
Markus Amsler
c40501db50
Revert "d3d: Remove AddRef from IWineD3DDevice_GetSwapChain.".
...
This reverts commit f84f687e6d
.
2006-11-30 16:03:59 +01:00
H. Verbeet
8a7f427948
wined3d: Select the right shader backend when creating the device.
2006-11-28 12:19:27 +01:00
H. Verbeet
df6f482a69
wined3d: Move some code specific to the different shader backends into the respective source files.
2006-11-28 12:19:19 +01:00
Markus Amsler
f84f687e6d
d3d: Remove AddRef from IWineD3DDevice_GetSwapChain.
2006-11-22 11:40:50 +01:00
H. Verbeet
9d6f22002c
wined3d: Only copy the depth buffer if there is one.
2006-11-20 11:50:14 +01:00
H. Verbeet
8afe27dacd
wined3d: Fix GL_ARB_texture_cube_map extension support.
2006-11-20 11:50:14 +01:00
H. Verbeet
ef2c062c09
wined3d: Allow the depth buffer to be shared between onscreen and offscreen rendering modes.
2006-11-17 18:14:25 +01:00
H. Verbeet
6d66085150
wined3d: Add FBO support for offscreen rendering.
2006-11-17 18:14:13 +01:00
H. Verbeet
9bf04ecd03
wined3d: Rename renderUpsideDown to render_offscreen.
2006-11-17 15:53:52 +01:00
Ivan Gyurdiev
875a1eb02d
wined3d: Add D3DFVF codes to the WINED3D namespace.
2006-10-31 12:09:06 +01:00
Ivan Gyurdiev
4eced8ea24
wined3d: Add D3DFOGMODE to the WINED3D namespace.
2006-10-30 12:05:24 +01:00
Markus Amsler
9497e89d89
wined3d: Respect ARB_VERTEX_BUFFER_OBJECT in loadVertexData.
2006-10-30 11:17:01 +01:00
Ivan Gyurdiev
9846602412
wined3d: Add D3DTEXTURETRANSFORMTYPE to the WINED3D namespace.
2006-10-13 11:15:31 +02:00
Ivan Gyurdiev
c912032aa5
wined3d: Add D3DTEXTUREOP to the WINED3D namespace.
2006-10-13 11:13:02 +02:00
Ivan Gyurdiev
532fe7a1cf
wined3d: Merge D3DDP_MAXTEXCOORD constants into one constant in WINED3D namespace.
2006-10-12 12:38:02 +02:00
Ivan Gyurdiev
2bac4a02da
wined3d: Merge D3DPRIMITIVETYPE types into one type in WINED3D namespace.
2006-10-12 12:37:52 +02:00
Ivan Gyurdiev
a07a8f793b
wined3d: D3DDECLTYPE: Consistently use in WINED3D namespace.
2006-10-11 12:20:21 +02:00
Ivan Gyurdiev
837027fcb7
wined3d: D3DTEXTURESTAGESTATETYPE: Consistently use in WINED3D namespace.
2006-10-11 12:18:53 +02:00
Ivan Gyurdiev
e020eceddf
wined3d: Make the shader mode selections per device.
2006-10-09 20:27:55 +02:00
Ivan Gyurdiev
3dcd3681f3
wined3d: Win64 printf fixes.
2006-10-02 14:38:04 +02:00
Ivan Gyurdiev
42a9262acf
wined3d: Read GL info and load constants into the same device.
2006-09-27 19:53:43 +02:00
H. Verbeet
5abdd7a19f
wined3d: Comparing BOOLs against FALSE is redundant.
2006-09-27 09:49:07 +02:00
Stefan Dösinger
96bce8d6d4
wined3d: Avoid wasting a uniform.
2006-09-25 18:24:19 +02:00
Ivan Gyurdiev
b421b60874
wined3d: Allow null streams in the vertex declaration.
2006-09-21 19:57:12 +02:00
Stefan Dösinger
fd65b9b413
wined3d: Do not bind the 0 vbo when vbos are unsupported.
2006-09-21 11:14:52 +02:00
Stefan Dösinger
0b7a96e92b
wined3d: Compile pixel shaders in drawprim.
2006-08-25 11:19:08 +02:00
Stefan Dösinger
d7f94bf7c9
wined3d: Correctly draw transformed and untransformed vertices in the same scene.
2006-08-22 12:53:53 +02:00
H. Verbeet
49f4c68e29
wined3d: Lookup GLSL float uniform locations only once per program.
2006-08-21 12:16:27 +02:00
Roderick Colenbrander
1a3359884c
wined3d: Fix opengl extension call.
2006-08-11 11:56:36 +02:00
H. Verbeet
ef87a40c72
wined3d: Delay vertex shader compilation until the shader is first used.
2006-08-07 13:12:10 +02:00
H. Verbeet
ea905eab09
wined3d: Disable vertex arrays after we're done drawing from them.
...
After drawing from a vertex array we should disable them, to prevent
the next draw calls from potentially reading past their ends. This
also moves the disabling of vertex attrib arrays (for shaders) into
its own function.
2006-08-04 11:58:43 +02:00
Jason Green
46c4b88ba5
wined3d: Fix some upside-down rendering issues for shaders.
2006-07-27 12:03:25 +02:00
Jason Green
f6b88b93ad
wined3d: Fix crash caused by bad TRACE.
2006-07-26 10:24:27 +02:00
H. Verbeet
2d6e661fbe
wined3d: D3d8 shaders can have a NULL pFunction, but a valid vertex declaration.
2006-07-25 11:21:46 +02:00
Jason Green
ac8f2c033c
wined3d: Improve traces for D3DTRANSFORMSTATETYPE.
...
Added debug function for WINED3DTRANSFORMSTATETYPE and changed all
references from D3DTS_* to WINED3DTS_*.
2006-07-24 19:55:27 +02:00
H. Verbeet
593541a50c
wined3d: Increment texture_idx when continuing as well.
2006-07-18 11:09:46 +02:00
Jason Green
6a97f2202e
wined3d: Fix for vertex shaders.
2006-07-17 15:05:38 +02:00
Ivan Gyurdiev
899c8cdb64
wined3d: Create fake input semantics for d3d8 shaders.
...
Use them to remove the need for loading arrays in two different places.
2006-07-07 17:39:52 +02:00
Ivan Gyurdiev
5b3c500efe
wined3d: Reverse semantics maps for shaders.
2006-07-07 17:39:26 +02:00
Ivan Gyurdiev
c611012df5
wined3d: Make WINED3D_ATR macros more flexible.
...
Make them operate on a type, as opposed to a semantic name.
2006-07-07 17:37:25 +02:00
Ivan Gyurdiev
c202bfe40d
wined3d: Simplify primitiveDeclartationConvertToStrided.
...
Assign fixed indices to declaration inputs.
Then use a common path to load the strided data.
2006-07-07 17:36:24 +02:00
Ivan Gyurdiev
85aa8ab855
wined3d: Add position_transformed flag to Strided data format.
2006-07-07 17:35:36 +02:00
Ivan Gyurdiev
fc2611d4a8
wined3d: Only link and use GLSL program if at least one GLSL shader is available.
2006-07-07 17:28:21 +02:00
Michael Stefaniuc
00e779370f
janitorial: Put "inline static" at the beginning of a declaration.
2006-07-07 14:30:35 +02:00
Ivan Gyurdiev
0472e9cd49
wined3d: Clean up drawPrimitive/drawPrimitiveDrawStrided.
2006-07-06 16:07:38 +02:00
Ivan Gyurdiev
276609e1e5
wined3d: Move register count pass to SetFunction.
...
Move semantics pointers out of the reg_maps, make them persistent data
in the shader (again, for future software shaders).
2006-07-06 16:07:38 +02:00
Ivan Gyurdiev
771623692e
wined3d: Rework shader mode selection.
...
- currently half the shader selection code (GLSL vs ARB) is in
fillGLcaps. The parts that check for software shaders are in
GetDeviceCaps. That placement, will work, but is definitely not optimal.
FillGLcaps should detect support - it should not make decision as to
what's used, because that's not what the purpose of the function is.
GetDeviceCaps should report support as it has already been selected.
Instead, select shader mode in its own function, called in the
appropriate places.
- unifying pixel and vertex shaders into a single selection is a
mistake. A software vertex shader can be coupled with a hardware arb or
glsl pixel shader, or no shader at all. Split them back into two and add
a SHADER_NONE variant.
- drawprim is doing support checks for ARB_PROGRAM, and making shader
decisions based on that - that's wrong, support has already been
checked, and decided upon, and shaders can be implemented via software,
ARB_PROGRAm or GLSL, so that support check isn't valid.
- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing
the mode into the settings globally is a mistake as well - it should be
done per device, since different cards have different capabilities.
2006-07-06 16:07:37 +02:00
H. Verbeet
7f9e61f7d2
wined3d: Use register combiners for texture stage operations.
...
Make wined3d use register combiners for texture stage operations. In
order to do that the texture unit index needs to be separated from the
texture stage index. For cards that don't support the
NV_register_combiners extension nothing should change.
2006-06-28 16:34:36 +02:00