Commit Graph

396 Commits

Author SHA1 Message Date
Stefan Dösinger f5f501d573 wined3d: Use the context manager to create onscreen contexts. 2007-02-13 12:08:02 +01:00
Stefan Dösinger 12252d0589 wined3d: Use the context manager to select the primary render target. 2007-02-13 12:05:35 +01:00
Stefan Dösinger 7253fae31f wined3d: Make the context array dynamic. 2007-02-13 12:04:40 +01:00
Stefan Dösinger f22d37e4dd wined3d: Use the context manager to prepare for blitting. 2007-02-13 12:04:08 +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 e6c9a073b0 wined3d: Store state optmization members in the context. 2007-02-13 11:50:38 +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 fa97fbdcad wined3d: Make shader_cleanup more useful. 2007-02-12 12:37:48 +01:00
Stefan Dösinger 67b1f4a7e9 wined3d: BeginScene and EndScene tests and fixes. 2007-02-12 12:08:34 +01:00
H. Verbeet 7c40799df0 wined3d: Remove the d3d9types.h include from wined3d_private.h. 2007-01-23 11:27:05 +01:00
H. Verbeet 6112522122 wined3d: Move SetupFullscreenWindow() and RestoreWindow() from IDirectDrawImpl to IWineD3DDeviceImpl. 2007-01-19 12:28:58 +01:00
Stefan Dösinger 1d3abdeeaa wined3d: Store the stream number in the strided structure. 2007-01-17 11:23:54 +01:00
H. Verbeet 7252b4d340 wined3d: Give WINED3DSIO_CRS its own function, properly take the write mask into account. 2007-01-16 16:05:49 +01:00
H. Verbeet cb26d59d26 05/49: wined3d: Only add line numbers for new lines in shader_addline(). 2007-01-16 16:02:28 +01:00
Stefan Dösinger e328e24daa wined3d: Better tracking of vertex buffer assignments. 2007-01-15 12:43:40 +01:00
Stefan Dösinger 03389acc30 wined3d: Do not free regularily locked surfaces. 2007-01-15 12:43:29 +01:00
Stefan Dösinger 60c9ea6751 wined3d: Remove dead NV_TEXTURE_SHADER code 2007-01-10 22:03:50 +01:00
Stefan Dösinger d4b63bbd87 wined3d: Store the scissor rect in the stateblock. 2007-01-10 22:01:20 +01:00
Stefan Dösinger 222c531b1a wined3d: Count the framerate per swapchain, not globally. 2007-01-10 22:00:47 +01:00
Stefan Dösinger 577f8db7cf wined3d: Fix np2 textures. 2007-01-08 21:00:23 +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 2e55c196ee wined3d: Remove some unneeded context cache members from the device. 2007-01-08 21:00:04 +01:00
Stefan Dösinger fdb62cbaeb wined3d: Do not activate vertex shaders needlessly. 2007-01-08 20:58:21 +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 d5f18e6a63 wined3d: Move applying the gl stream sources to the state table. 2007-01-08 20:55:51 +01:00
Stefan Dösinger 0d700bef5d wined3d: Break the viewport out of the vertex declaration state. 2007-01-04 10:57:33 +01:00
Stefan Dösinger e26e3ee5f3 wined3d: Remove d3ddevice_set_ortho. 2007-01-03 11:19:55 +01:00
Stefan Dösinger 5fa0f7f775 wined3d: Move the world matrix to the state table. 2007-01-03 11:19:09 +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 a48bbc3611 wined3d: Add a viewport state to the state table. 2007-01-03 11:10:13 +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 ef1ebb6e4d wined3d: Add emtpy vertex declaration and related states to the state table. 2007-01-02 12:29:18 +01:00
Stefan Dösinger 091f9c28e4 wined3d: Put the decoded strided data structure into the device. 2007-01-02 12:29:04 +01:00
Stefan Dösinger b58715e8ab wined3d: Add empty transform states to the state table. 2006-12-29 12:49:41 +01:00
Alexandre Julliard bbfe120036 Revert "wined3d: Where possible, avoid using D3DCOLORTOGLFLOAT4."
This reverts commit 045975b1f4.
2006-12-29 11:35:57 +01:00
H. Verbeet c972351051 wined3d: Move set_glsl_shader_program() to glsl_shader.c. 2006-12-28 12:17:49 +01:00
H. Verbeet 045975b1f4 wined3d: Where possible, avoid using D3DCOLORTOGLFLOAT4. 2006-12-28 12:17:29 +01:00
Chris Robinson e37755b60c wined3d: Clarify OpenGL error codes. 2006-12-24 15:12:42 +01:00
Stefan Dösinger df97fd3e46 wined3d: Reinstall the nvrc texture unit mapping. 2006-12-20 17:09:40 +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 2d1aeb4382 wined3d: Add empty sampler entries to the state table. 2006-12-20 17:07:47 +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 569a2fa7c0 wined3d: Add empty texture stage states to the state table. 2006-12-20 17:05:40 +01:00
H. Verbeet 299c1e62bf wined3d: Allow the FBO code to handle multiple render targets. 2006-12-20 12:32:13 +01:00
H. Verbeet 8355b1a501 wined3d: Allow the device to store multiple render targets. 2006-12-20 12:31:40 +01:00
Stefan Dösinger 7532c759f1 wined3d: Add the state dirtification infrastructure. 2006-12-19 16:53:00 +01:00
Markus Amsler 9b397ec2d5 wined3d: Remove IWineD3DSurface_GetContainerParent. 2006-12-18 12:02:17 +01:00
Dmitry Timoshkov 47ffd7ae95 wined3d: Make some data const. 2006-12-14 20:11:41 +01:00
Stefan Dösinger 3e05e133f9 wined3d: Remove the unused tween factor stateblock member. 2006-12-11 12:47:04 +01:00
Stefan Dösinger a628b99d63 wined3d: Remove the unused stateblock vertex blend member. 2006-12-11 12:46:55 +01:00
Stefan Dösinger d30f1527cc wined3d: Implement IWineD3DDevice::Reset. 2006-12-11 12:40:13 +01:00
Stefan Dösinger 2a24e84a65 wined3d: Add render states to the state table. 2006-12-07 21:10:26 +01:00
Stefan Dösinger c0268c7840 wined3d: Create the state table. 2006-12-07 21:10:07 +01:00
Markus Amsler 50a0c21265 d3d: Callback infrastructure for implicit volume destruction in IWineD3DVolumeTexture. 2006-12-06 12:39:14 +01:00
Markus Amsler 04ae4596ff d3d: Callback infrastructure for implicit surface destruction in IWineD3DTexture. 2006-12-06 12:38:37 +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
Andrew Talbot f3a515ce19 wined3d: Cast-qual warnings fix. 2006-11-27 13:43:05 +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 ad4c2bdb69 wined3d: Make the offscreen render mode a registry setting. 2006-11-17 18:13:57 +01:00
H. Verbeet 9bf04ecd03 wined3d: Rename renderUpsideDown to render_offscreen. 2006-11-17 15:53:52 +01:00
Ivan Gyurdiev 4c723a7662 wined3d: Add D3DSTREAMSOURCE codes to the WINED3D namespace. 2006-10-31 12:10:31 +01:00
Francois Gouget ef998ea6cb Assorted spelling fixes. 2006-10-16 11:33:38 +02:00
Ivan Gyurdiev 4745e602d2 wined3d: Add D3DCLIPPLANE constants to the WINED3D namespace. 2006-10-13 11:15:18 +02:00
Ivan Gyurdiev 29aa316d67 wined3d: Add D3DSI and other opcode masks to the WINED3D namespace. 2006-10-13 11:14:47 +02:00
Ivan Gyurdiev 6f0bb0f6fc wined3d: Add D3DVERTEXBLENDFLAGS to the WINED3D namespace. 2006-10-13 11:14:33 +02:00
Ivan Gyurdiev c912032aa5 wined3d: Add D3DTEXTUREOP to the WINED3D namespace. 2006-10-13 11:13: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 ac37163124 wined3d: Merge D3DMATRIX types into one type in WINED3D namespace. 2006-10-12 12:35:00 +02:00
Ivan Gyurdiev ec782c2b97 wined3d: D3DTRANSFORMSTATETYPE: Consistently use in the WINED3D namespace. 2006-10-12 12:33:39 +02:00
Ivan Gyurdiev fea4495a61 wined3d: TEXTUREFILTERTYPE: Consistently use in WINED3D namespace. 2006-10-11 12:20:34 +02:00
Ivan Gyurdiev a07a8f793b wined3d: D3DDECLTYPE: Consistently use in WINED3D namespace. 2006-10-11 12:20:21 +02:00
Ivan Gyurdiev f0d5b35c97 wined3d: D3DQUERYTYPE: Consistently use in WINED3D namespace. 2006-10-11 12:19:15 +02:00
Ivan Gyurdiev 19c5534c35 wined3d: D3DDEVTYPE: Consistently use in WINED3D namespace. 2006-10-11 12:17:52 +02:00
Ivan Gyurdiev fb0c932f21 wined3d: D3DFORMAT: Consistently use WINED3D namespace. 2006-10-11 12:17:21 +02:00
Ivan Gyurdiev 17c9d9588a wined3d: Move D3DSP_REG structures into the WINED3D namespace. 2006-10-10 13:37:49 +02:00
Ivan Gyurdiev 062541c026 wined3d: Move D3DSIO structure into WINED3D namespace. 2006-10-10 13:37:03 +02:00
Ivan Gyurdiev e020eceddf wined3d: Make the shader mode selections per device. 2006-10-09 20:27:55 +02:00
Stefan Dösinger d45c16ba98 wined3d: Define the surface alignment in the header. 2006-10-06 12:53:24 +02:00
Stefan Dösinger 2bcacf22d3 wined3d: Add IWineD3DSurface::UpdateOverlay. 2006-10-06 12:53:24 +02:00
Stefan Dösinger 080e4f56cf wined3d: Add UpdatOverlayZOrder. 2006-10-06 12:53:24 +02:00
Stefan Dösinger f6647486cf wined3d: Add IWineD3DSurface::GetOverlayPosition. 2006-10-06 12:53:24 +02:00
Stefan Dösinger 0f3995d21a wined3d: Add IWineD3DSurface::SetOverlayPosition. 2006-10-06 12:53:24 +02:00
Ivan Gyurdiev 3dcd3681f3 wined3d: Win64 printf fixes. 2006-10-02 14:38:04 +02:00
Ivan Gyurdiev 01d9eac0be wined3d: Remove unused field in shader opcode_arg. 2006-10-02 12:32:30 +02:00
Ivan Gyurdiev 42a9262acf wined3d: Read GL info and load constants into the same device. 2006-09-27 19:53:43 +02:00
Ivan Gyurdiev d0032a1a2a wined3d: Move device pointer into the BaseShader class. 2006-09-27 19:44:09 +02:00
H. Verbeet 193f6bbd92 wined3d: Add support for native NPOT textures. 2006-09-27 09:48:11 +02:00
H. Verbeet ba8a6a3c0c wined3d: Fix the default values for wined3d_settings. 2006-09-27 09:46:37 +02:00
Stefan Dösinger 96bce8d6d4 wined3d: Avoid wasting a uniform. 2006-09-25 18:24:19 +02:00
Stefan Dösinger 674af50174 wined3d: Stop fixing up a VBO if the declaration changes too often. 2006-09-25 18:22:36 +02:00
Stefan Dösinger 6286c4e70d ddraw: Pass the fullscreen flag to wined3d. 2006-09-10 10:18:45 +02:00
Ivan Gyurdiev de54843d7b wined3d: Remove unused field: Surface.textureName. 2006-09-07 13:47:25 +02:00
Stefan Dösinger 760456dc7f wined3d: Find the correct sampler type for < 2.0 pshaders. 2006-08-28 11:37:24 +02:00
Jan Zerebecki fd15b8d064 wined3d: Use a common function for all D3DCMPFUNC -> GLenum conversions. 2006-08-25 20:04:56 +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
Roderick Colenbrander de97fa7a3b wined3d: Better GPU detection. 2006-08-21 12:21:19 +02:00
H. Verbeet 09eb0c40a6 wined3d: Improve float constant loading a bit.
- Use a list to keep track of what constants are set.
- Move TRACEs and checkGLcall calls out of the main constant loading loop.
2006-08-21 12:17:42 +02:00
H. Verbeet 49f4c68e29 wined3d: Lookup GLSL float uniform locations only once per program. 2006-08-21 12:16:27 +02:00
Jan Zerebecki 4d6cfb6351 wined3d: Registry setting for the amount of simulated texture memory.
Set VideoMemorySize under HKCU\Software\Wine\Direct3D to amount in MB
as string.
2006-08-08 11:20:05 +02:00
H. Verbeet 02a8f74490 wined3d: Add a couple of traces to the vertexdeclaration creation code. 2006-08-07 19:42:31 +02:00
H. Verbeet ef87a40c72 wined3d: Delay vertex shader compilation until the shader is first used. 2006-08-07 13:12:10 +02:00
Jason Green d353ab7879 wined3d: Start checking for D3DUSAGE_QUERY_* items, improve traces. 2006-07-29 11:49:51 +02:00
Jason Green 72bfe131d1 wined3d: More shader fixes / new instructions.
- Replace gl_FragColor with gl_FragData[0] for GLSL pixel shader output.
- Subtract 1 more constant from total GLSL allowed float constants to
  accommodate the PROJECTION matrix row that we reference.
2006-07-28 14:01:16 +02:00
Stefan Dösinger 65e5ed60ae wined3d: Do not use the IWineD3DSurface for the cursor. 2006-07-28 12:31:57 +02:00
Stefan Dösinger 3b10a021db wined3d: More efficient color keying dirtifying.
Instead of blindly dirtifying the surface LoadTexture keeps track of
the color key that was used when creating the opengl texture and
reloads the surface if the color key has changed.
2006-07-26 15:21:00 +02:00
Stefan Dösinger 06106e2810 ddraw: Support using an application-provided surface pointer. 2006-07-26 15:17:59 +02:00
Jason Green 7e90aba97b wined3d: Implement more GLSL instructions.
Implement D3DSIO_TEXREG2AR, TEXREG2GB, TEXREG2RGB, TEXM3X3TEX, TEXM3X3SPEC.
2006-07-25 11:22:55 +02:00
H. Verbeet 536638918d wined3d: Add real occlusion query support. 2006-07-25 11:22:00 +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
Stefan Dösinger a98ccb543d wined3d: Draw the cursor. 2006-07-24 13:27:15 +02:00
Jason Green 75950b5bf8 wined3d: Replace memset/memcpy routines on stateblock (fixes dynamic shader constants regression). 2006-07-24 12:57:34 +02:00
Stefan Dösinger 9423fd2d9f wined3d: Do not try to create a vbo more than once. 2006-07-21 20:21:00 +02:00
H. Verbeet a8f2c1075a wined3d: Compilation fixes. 2006-07-20 12:11:06 +02:00
Jason Green 718716b77a wined3d: Make the number of floating point shader constants dynamic. 2006-07-19 09:54:30 +02:00
Stefan Dösinger 739d565c59 wined3d: Add a setting for the render target locking method. 2006-07-18 11:22:51 +02:00
Jason Green 6a97f2202e wined3d: Fix for vertex shaders. 2006-07-17 15:05:38 +02:00
Ivan Gyurdiev 33293df143 wined3d: More flow control instructions.
- Implement call, callnz, label, and ret
- Implement support for NOT modifier
2006-07-11 17:14:24 +02:00
Ivan Gyurdiev 6ede56495a wined3d: More flow control instructions
- Implement if, else, endif, rep, endrep, break
- Implement ifc, breakc, using undocumented comparison bits in the instruction token
- Fix bug in main loop processing of codes with no dst token
- Fix bug in GLSL output modifier processing of codes with no dst token
- Fix bug in loop implementation (src1 contains the integer data, src0 is aL)
- Add versioning for all the instructions above, and remove
  GLSL_REQUIRED thing, which is useless and should be removed from all
  opcodes in general.
2006-07-11 17:13:05 +02:00
Ivan Gyurdiev e9de563e41 wined3d: Place immediate constants in the same array as global constants.
- move DEF, DEFI, DEFB handling into the register counting pass
- keep track of defined constants as a linked list (because there's a
  few of them)
- apply immediate constants after global constants in the constant
  loading function
- both types of constants now get loaded with array notation in the
  shader (into the same array)
2006-07-11 17:11:30 +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 85aa8ab855 wined3d: Add position_transformed flag to Strided data format. 2006-07-07 17:35:36 +02:00
Michael Stefaniuc 32b1a24501 janitorial: Move the storage specifier to the beginning of the declaration. 2006-07-07 14:30:35 +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
Ivan Gyurdiev 7e9fd0b4c1 wined3d: Add a function to print out D3DDECLUSAGE9 values. 2006-07-03 12:04:37 +02:00
Ivan Gyurdiev d06e13db99 wined3d: Move SHADER_ARB code into arb_program_shader.c. 2006-07-03 12:03:31 +02:00
H. Verbeet f3a2a9f30a wined3d: Add code for using register combiners for texture stage operations.
On nVidia cards the value of GL_MAX_TEXTURE_UNITS is generally not
larger than 4. In Direct3D that would correspond to
MaxSimultaneousTextures in the caps, rather than MaxTextureBlendStages
(which can be much larger) to which it currently corresponds in
wined3d. Using register combiners we can get around that limitation
and get up to GL_MAX_GENERAL_COMBINERS_NV (typically 8) texture
stages. This patch adds code for doing the texture operations with
register combiners instead of ARB_texture_env_combine or
NV_texture_env_combine4, but doesn't make use of that code yet. That's
what the next patch will do.
2006-06-28 16:08:36 +02:00
H. Verbeet a54e36adfe wined3d: Texture limits fixes.
GL_LIMITS(textures) is currently used for both the number of texture
stages and the maximum number of simultaneous textures. In the current
code that's the same, but in a later patch that will be separated,
since a texture stage doesn't have to reference an actual
texture. Also, shaders can access a larger number of samplers than the
number of texture units the fixed function pipeline can access.
2006-06-28 16:06:25 +02:00
Stefan Dösinger cea41b0a0f wined3d: Vertex buffer can be locked multiple times. 2006-06-27 21:14:02 +02:00
Jason Green baf38b3007 wined3d: Implement more GLSL instructions and a little cleanup.
- Implement D3DSIO_DP2ADD, D3DSIO_TEXKILL, D3DSIO_TEXM3X3PAD
- Partially implement D3DSIO_TEXBEM, D3DSIO_TEXM3X3VSPEC (as much as
  they are implemented in ARB_fragment_program at least).
- Stop copying the SHADER_PARSE_STATE struct in each ARB shader
  routine - use a pointer instead.
2006-06-27 11:16:10 +02:00
Stefan Dösinger 7d31ab95e4 wined3d: Add support for VBOs to the drawing code. 2006-06-26 13:02:19 +02:00
Stefan Dösinger 3518747165 wined3d: Pixel format cleanup. 2006-06-21 12:15:50 +02:00
Jason Green f444009bfb wined3d: Implement locally defined boolean and integer constants in GLSL. 2006-06-19 10:59:13 +02:00
Jason Green 34d271bab6 wined3d: Add preliminary support for constant boolean and integer registers in GLSL.
- Separate the declaration phase of the shader string generator into
  the arb and glsl specific files.
- Add declarations and recognition for application-sent constant
  integers and booleans (locally defined ones will follow).
- Standardize capitilization of pixel/vertex specific variable names.
2006-06-19 10:50:14 +02:00
Jason Green 2d8e05f8a1 wined3d: Move constant loading into target-specific files.
- Moves GLSL constant loading code into glsl_shader.c and out of the
  over-populated drawprim.c.
- Creates a new file named arb_program_shader.c which will hold code
  specific to ARB_vertex_program & ARB_fragment_program.
- Remove the constant loading calls from drawprim.c
2006-06-19 10:49:52 +02:00
Stefan Dösinger 3862f8e3d7 wined3d: Support more than one back buffer. 2006-06-15 16:51:41 +02:00
Jason Green cc06ed3d53 wined3d: Implement more GLSL instructions.
- Implemented: D3DSIO_SGN, LOOP, ENDLOOP, LOGP, LIT, DST, SINCOS
- Process instruction-based modifiers (function existed, it just
  wasn't being called)
- Add loop checking to register maps.
- Renamed "sng" to "sgn" for D3DSIO_SGN - it's not handled anywhere
  except for GLSL, so won't matter.
2006-06-15 12:20:20 +02:00
Alexandre Julliard 836b5c7e93 wined3d: Use unsigned int instead of size_t to avoid printf format warnings. 2006-06-13 14:14:20 +02:00
Ivan Gyurdiev 8c6ee8df0d wined3d: Mark instructions without a destination token.
There are a total of 17 instructions without a destination token. Of
those 9 have num_params != 0, which means that we will not process any
of them correctly, because we assume the first token (if present) is a
destination token.

Those are basically all the flow control instructions, which we plan to
support very soon. They have source tokens, and no destination. Add a
flag that marks them up to the ins table. Use this flag in the trace
pass, and generation pass.
2006-06-13 11:40:22 +02:00
Ivan Gyurdiev 0d08316523 wined3d: Improve Sampler support on 2.0 and 3.0 shaders.
- track sampler declarations and store the sampler usage in reg_maps structure
- store a fake sampler usage for 1.X shaders (defined as 2D sampler)
- re-sync glsl TEX implementation with the ARB one (no idea why they diverged..)
- use sampler type in new TEX implementation to support 2D, 3D, and Cube sampling
- change drawprim to bind pixel shader samplers

Additional improvements:
- rename texture limit to texcoord to prevent confusion
- add sampler limit, and use that for samplers - *not* the same as texcoord above
2006-06-13 11:40:22 +02:00
Ivan Gyurdiev a1f4dfe4e3 wined3d: Add support for shader model 3.0 I/O registers.
SM 3.0 can pack multiple "semantics" into 12 generic input/output registers.

To support that, define temporaries called IN and OUT, and use those as
the output registers. At the end of the vshader, unpack the OUT temps
into the proper GL variables. At the beginning of the pshader, pack the
GL variables back into 12 IN registers.
2006-06-13 11:40:22 +02:00