Commit Graph

760 Commits

Author SHA1 Message Date
Henri Verbeet b6668b0296 wined3d: Store the register index in struct wined3d_shader_src_param. 2009-04-15 15:57:30 -05:00
Henri Verbeet 4de1dba2c5 wined3d: Store the register type in struct wined3d_shader_src_param. 2009-04-15 15:57:25 -05:00
Henri Verbeet ff62cab537 wined3d: Introduce struct wined3d_shader_src_param. 2009-04-15 15:57:19 -05:00
Henri Verbeet 463de24e7b wined3d: Group instruction context information together in struct wined3d_shader_context. 2009-04-15 15:57:13 -05:00
Henri Verbeet d3fc7dca99 wined3d: Get rid of the "token" field from struct wined3d_shader_dst_param. 2009-04-14 15:25:07 -05:00
Tobias Jakobi 0c2514bd8f wined3d: Rename some NP2 fixup variables and update comments. 2009-04-13 17:32:11 -05:00
Tobias Jakobi 9b067a6ca5 wined3d: Add load_np2fixup_constants function to shader backend. 2009-04-10 14:00:50 +02:00
Stefan Dösinger 754b5cf2ad wined3d: Deal with reserved shader constants in the backend.
This moves the GLSL and ARB specific reserved constants out of directx.c into
the get_caps methods of the shader backends. That way the number of reserved
constants remains in the backend.

GL_LIMITS({v/p}shader_constantsF) now contains the real number of constants as
advertised by GL instead of some mixture of GL info and backend implementation
specifics. This makes it easier for backends to decide how many constants to
use.
2009-04-10 11:22:55 +02:00
Stefan Dösinger 014c4bfc70 wined3d: Save some memory in vertex buffers.
In most cases we're fine with the vbo and glMapBuffer and never use the actual
heap memory copy. Try to stick to just the vbo copy and avoid allocating the
extra heap memory. In case it is needed(emulation or vertex conversion), fall
back to the old double buffering mode.
2009-04-10 11:14:32 +02:00
Henri Verbeet 62d9dc2177 wined3d: Store the relative addressing mode in struct wined3d_shader_dst_param. 2009-04-10 10:23:20 +02:00
Henri Verbeet 22e57d025c wined3d: Store the destination shift in struct wined3d_shader_dst_param. 2009-04-10 10:23:15 +02:00
Stefan Dösinger cb1c9dcda9 d3d: Remove the format from index buffers. 2009-04-09 16:28:25 +02:00
Stefan Dösinger f0efa97413 wined3d: Remove the buffer fvf. 2009-04-09 16:28:10 +02:00
Henri Verbeet 9ec0b09d35 wined3d: Store usage and usage_idx in struct wined3d_shader_semantic.
Instead of the usage token.
2009-04-08 11:42:19 +02:00
Henri Verbeet d12e489272 wined3d: Store a struct wined3d_shader_dst_param in struct wined3d_shader_semantic. 2009-04-08 11:41:59 +02:00
Stefan Dösinger 513a493f00 wined3d: Merge IWineD3DIndexBuffer and IWineD3DBuffer. 2009-04-08 11:37:29 +02:00
Stefan Dösinger 2a7a237170 wined3d: Merge indexbuffer and buffer implementations. 2009-04-08 11:37:24 +02:00
Henri Verbeet 0f92bbc6bc wined3d: Store the register type in struct wined3d_shader_dst_param. 2009-04-07 14:21:49 +02:00
Henri Verbeet f7f61a58f4 wined3d: Explicitly pass register type and index to shader_is_scalar(). 2009-04-07 14:21:44 +02:00
Henri Verbeet 6f66c1ddbd wined3d: Store the write mask in struct wined3d_shader_dst_param. 2009-04-07 14:21:37 +02:00
Henri Verbeet f0de1622d0 wined3d: Store the destination modifiers in struct wined3d_shader_dst_param. 2009-04-06 12:57:52 +02:00
Henri Verbeet 7b62165546 wined3d: Store the register index in struct wined3d_shader_dst_param. 2009-04-03 13:01:44 +02:00
Henri Verbeet 7245cd2b81 wined3d: Add a struct wined3d_shader_dst_param for storing destination parameter information. 2009-04-03 13:01:38 +02:00
Henri Verbeet 04b2e0b19b wined3d: Remove the opcode field from struct wined3d_shader_instruction. 2009-04-03 13:01:30 +02:00
Henri Verbeet 7bde2792c2 wined3d: Store the source and destination parameter count in struct wined3d_shader_instruction. 2009-04-02 16:28:29 +02:00
Henri Verbeet 44648b2b91 wined3d: Store the instruction handler index in struct wined3d_shader_instruction.
This allows us to avoid comparing against WINED3DSIO_*, which is specific to
the bytecode.
2009-04-02 16:28:29 +02:00
Henri Verbeet c3a01b315e wined3d: Use a more reasonable name for "SHADER_OPCODE_ARG". 2009-04-01 14:24:19 +02:00
Henri Verbeet de4e8cf0f9 wined3d: Avoid a forward declaration. 2009-04-01 14:24:11 +02:00
Henri Verbeet e44335585e wined3d: Don't use the opcode_token field in the ARB backend. 2009-04-01 14:24:02 +02:00
Henri Verbeet ec43489e10 wined3d: Don't use the opcode_token field in the GLSL backend.
The idea is that we want to prevent backends from parsing the tokens
themselves, which is pretty much a requirement for adding SM4 support.
2009-04-01 14:23:56 +02:00
Tobias Jakobi 1b335dfaaa wined3d: Add texrect_fixup bitfield to ps_compile_args struct.
Initialization of the bitfield done in find_ps_compile_args
based on the previously introduced pow2Matrix_identity flag.
2009-03-31 12:40:10 +02:00
Tobias Jakobi 31f8cd9621 wined3d: Add pow2Matrix_identity flag to BaseTextureClass struct.
New flag helps to quickly find out whether the pow2Matrix is a
identity matrix (no texcoord fixup needed) or not.
2009-03-31 12:39:27 +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
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 9f26fed28d wined3d: Separate the internal representation of vertex declaration elements from the struct used to create it.
Internally we want to store some extra data, like ffp_valid. One of the later
patches also stores the format desc in the declaration elements, instead of
the current WINED3DDECLTYPE.
2009-03-27 15:51:25 +01:00
Henri Verbeet 4330d20d0d wined3d: Remove IWineD3DVertexDeclaration_SetDeclaration() from the public interface. 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 899df56ebe wined3d: Add a more convenient way to check if a surface is on a swapchain.
This won't help if we actually need the swapchain, of course.
2009-03-25 11:12:40 +01:00
Henri Verbeet 42e31a4242 wined3d: Fix a few sign compare warnings. 2009-03-25 11:12:30 +01:00
Henri Verbeet 59c5962828 wined3d: Make the texunit field in struct stb_const_desc unsigned. 2009-03-25 11:12:13 +01:00
Henri Verbeet afc5744e70 wined3d: Pass format_desc to set_shader().
This should be the last unnecessary getFormatDescEntry() call.
2009-03-24 12:57:45 +01:00
Henri Verbeet dd1f0d9c48 wined3d: Pass format_desc to getColorBits() and getDepthStencilBits(). 2009-03-24 12:57:38 +01:00
Henri Verbeet b7744f8158 wined3d: Remove the bytesPerPixel field from IWineD3DSurfaceImpl and IWineD3DVolumeImpl.
We can use the information from format_desc instead.
2009-03-24 12:57:21 +01:00
Henri Verbeet 2dc7fc2916 wined3d: Remove the format field from IWineD3DResourceClass. 2009-03-13 11:29:19 +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 53bf5c2658 wined3d: Add fields from StaticPixelFormatDesc to struct GlPixelFormatDesc.
The idea here is that we should lookup format information in struct
GlPixelFormatDesc, while StaticPixelFormatDesc and GlPixelFormatDescTemplate
will only be used to build the table.
2009-03-13 11:29:01 +01:00
Henri Verbeet fbfc7c9742 wined3d: Remove the width and height fields from IWineD3DTextureImpl. 2009-03-13 11:28:55 +01:00
Henri Verbeet a139683a60 wined3d: Eliminate the heightscale field from IWineD3DSurfaceImpl. 2009-03-13 11:28:45 +01:00
Henri Verbeet e3bcc7544c wined3d: Remove the shader_color_fixup field from IWineD3DBaseTextureClass.
This is redundant now.
2009-03-12 13:09:55 +01:00
Henri Verbeet 38178541b0 wined3d: Store a pointer to the format description in the resource.
The goal is to eventually use a pointer to the format description in most
places where we currently use WINED3DFORMAT. IWineD3DSurfaceImpl for example
has copies of several fields from the format description, but also needs to
lookup the format description itself in several places.
2009-03-12 13:09:55 +01:00