Commit Graph

351 Commits

Author SHA1 Message Date
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
Stefan Dösinger df4dcc34aa wined3d: Move a few extension checks into the state template. 2008-07-17 11:44:28 +02:00
Stefan Dösinger 35f33ef409 wined3d: Add extension information to the states.
This patch adds a new field to the state templates. If this extension
field is != 0, then the line is only applied to the final state table
if the extension is supported. Once a line is applied to the final
table, all further templates for this state from the same pipeline
part are ignored. This allows removing some extension checks from the
state handlers, which cleans them up and saves a few CPU cycles when
applying the states.
2008-07-17 11:44:08 +02:00
H. Verbeet c72c70d609 wined3d: Store the texture in a local variable in sampler_texmatrix().
Slightly improves readability.
2008-07-17 11:36:42 +02:00
Stefan Dösinger e27734779c wined3d: Remove some dead code. 2008-07-14 11:46:33 +02:00
Stefan Dösinger 88ae2fe14a wined3d: Give nv* fixed function stuff its own state template. 2008-07-14 11:46:11 +02:00
Stefan Dösinger 38934fe70d wined3d: Move shader constant affecting states to the misc pipeline.
As long as we have the shader constants in misc, it is best to keep
all the code that affects shader constants, like bumpenvmat setting,
in there as well.
2008-07-14 11:44:48 +02:00
Stefan Dösinger 84d39a95e5 wined3d: WINED3DTSS_TEXCOORDINDEX belongs to the vertex pipeline. 2008-07-14 11:44:36 +02:00
Stefan Dösinger 86b033bbb9 wined3d: Give the nvts/nvrc code its own pipeline implementation.
This code creates the structures and the pipeline selection, as well
as the caps filling. It does not yet move the actual code around,
since this will be a bigger task.
2008-07-14 11:44:26 +02:00
Stefan Dösinger 51e64b3fe9 wined3d: Move fixed function texture dimension updates to the fragment pipeline.
This is a further separation of the sampler state, and a preparation
to move the nv texture shader stuff to its own pipeline implementation.
2008-07-14 11:43:41 +02:00
Stefan Dösinger d3c29b7063 wined3d: NP2 coordinate adjustment is a vertex operation.
When a sampler is changed and unconditional NP2 textures are not
supported, the texture matrix may need adjustment. The sampler state
function checks for that, and calls the texture transform setting
function in that case. However, samplers are a misc state, and the
texture transform flags a vertex state.  Thus split up the code and
move the matrix changes to the vertex side.
2008-07-14 11:43:30 +02:00
Stefan Dösinger e7733eacb7 wined3d: Remove the atifs shader backend.
Since atifs is only doing the fragment pipeline replacement right now
there is no need for the shader backend structure any longer. The ffp
private data is stored in new fragment pipeline private data(which
could potentially be set to equal the shader private data if needed).
2008-07-14 11:43:09 +02:00
Stefan Dösinger e4078fb0ba wined3d: Set ffp caps in the ffp backend, not the shader backend. 2008-07-11 14:32:53 +02:00
Stefan Dösinger c48195e417 wined3d: Move shader_fragment_enable to the fragment pipeline implementation.
It isn't related to the shader backend any longer. The nvts_enable in
the ffp code isn't quite right as well, it should be moved away once
there is a dedicated nvts fragment pipeline replacement
2008-07-11 14:32:37 +02:00
Stefan Dösinger f330815da5 wined3d: Samplers -> misc states. 2008-07-11 14:31:53 +02:00
Stefan Dösinger f8824996e9 Wined3d: Move the last states. 2008-07-11 14:31:44 +02:00
Stefan Dösinger 9b15e25411 wined3d: One more psize state. 2008-07-11 14:31:36 +02:00
Stefan Dösinger 721301fb3f wined3d: Point size vertex states. 2008-07-11 14:31:26 +02:00
Stefan Dösinger 031ee3e695 wined3d: A few more junk misc states. 2008-07-10 12:30:56 +02:00
Stefan Dösinger c31dfc7d0d wined3d: A few more vertex states. 2008-07-10 12:30:56 +02:00
Stefan Dösinger 9086ed2d2e wined3d: WINED3DRS_SRGBWRITEENABLE->fragment. 2008-07-10 12:30:56 +02:00