Commit Graph

371 Commits

Author SHA1 Message Date
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
Stefan Dösinger 7740dda1da wined3d: Split the psizemin handler. 2008-07-17 11:44:42 +02:00
Stefan Dösinger 710b9a76b3 wined3d: Move the range fog support test to the template. 2008-07-17 11:44:34 +02:00