Commit Graph

853 Commits

Author SHA1 Message Date
Henri Verbeet
43e6686a78 wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info. 2009-07-17 11:22:07 +02:00
Henri Verbeet
d6ffe00cd2 wined3d: Recognize the SM4 constant buffer register type. 2009-07-16 16:03:28 +02:00
Henri Verbeet
c4f8845bc9 wined3d: Recognize SM4 arrays.
This is for SM4 constant buffers, which look like cb<x>[<y>]. At some later
point we should probably translate pre-SM4 constants to constant buffers.
2009-07-16 16:03:23 +02:00
Stefan Dösinger
6a04c2d5cc wined3d: Don't call glGetError if nobody is listening. 2009-07-16 11:15:40 +02:00
Stefan Dösinger
8a6553da14 wined3d: Only use 4 component specular colors if GL allows it. 2009-07-10 13:07:33 +02:00
Henri Verbeet
69b7612265 wined3d: Get rid of struct glDescriptor.
In general it might not be a bad idea to group GL specific data into a
separate struct, but IWineD3DSurfaceImpl is currently the only thing that
bothers. It doesn't get it quite right either, since e.g. the PBO isn't in
glDescriptor either.
2009-07-10 12:13:24 +02:00
Henri Verbeet
9cf7888002 wined3d: Fix some cast-qual warnings. 2009-07-09 11:38:07 +02:00
Henri Verbeet
483d552e21 wined3d: Allow shader_buffer_init() to fail. 2009-07-09 11:38:02 +02:00
Henri Verbeet
40b411958b wined3d: Rename "SHADER_BUFFER" to something sane. 2009-07-09 11:37:58 +02:00
Henri Verbeet
bddc4d3f0d wined3d: Reuse the shader buffer between shaders. 2009-07-09 11:37:53 +02:00
Henri Verbeet
e41831990d wined3d: Fix a sign compare warning in glsl_shader.c. 2009-07-08 20:14:35 +02:00
Henri Verbeet
2ac34bf231 wined3d: Add some missing float suffixes.
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Henri Verbeet
50e9ad66e2 wined3d: Clear the last device in WineD3D_CreateFakeGLContext(). 2009-07-02 12:00:44 +02:00
Henri Verbeet
40bc47901c wined3d: Use flags for driver quirks. 2009-07-01 11:41:44 +02:00
Stefan Dösinger
5859d87754 wined3d: Implement function calls with NV exts. 2009-06-29 12:28:21 +02:00
Stefan Dösinger
bd14b6e2b4 wined3d: IFC requires GL_NV_fragment_program2. 2009-06-26 12:01:44 +02:00
Tobias Jakobi
7906774339 wined3d: Add ps_np2fixup_info structure. 2009-06-25 14:34:13 +02:00
Stefan Dösinger
85af0b2943 wined3d: Don't emulate clipplanes with ffp vp and fix a wrong if condition.
b2f09fd204 accidentally got the
device->vs_clipping check wrong. The FFP replacement should emulate
clipping if GL can't do this natively with vertex shaders, not the
other way. Also don't emulate clipping if we're using fixed function
vertex processing because (a) clipping is always supported by GL in
this case, and (b), fragment.texcoord[7] is undefined. (Or in the
worst case set to something bad by the app).
2009-06-23 15:53:00 +02:00
Stefan Dösinger
26d17fe04c wined3d: Implement MRTs in ARB. 2009-06-22 11:26:43 +02:00
Stefan Doesinger
cd348ac897 wined3d: Use bitfields for reg_maps uses* members. 2009-06-17 12:19:45 +02:00
Stefan Doesinger
58c3a0c832 wined3d: Implement vpos and vface. 2009-06-17 12:19:31 +02:00
Stefan Doesinger
ae600fe0c8 wined3d: Implement texldl in ARB. 2009-06-17 12:19:15 +02:00
Stefan Doesinger
c220bafa2c wined3d: Unroll loops in ARB if needed.
This is needed to allow us to claim vs_2_0 support with plain
GL_ARB_vertex_program. vs_2_0 allows loops without breaks.
2009-06-16 13:57:04 +02:00
Henri Verbeet
23231d5a62 wined3d: Add format conversions for some depth stencil formats.
Although these formats aren't lockable, we still explicitly set the initial
surface data when creating the texture. Unfortunately that means we'll need
the conversion functions, even though all they'll ever convert will be zeroes.
2009-06-16 13:37:06 +02:00
Henri Verbeet
fede35d1c5 wined3d: Introduce surface_calculate_size(). 2009-06-15 13:42:28 +02:00
Henri Verbeet
5f581975dc wined3d: Introduce surface_init() to handle most of the surface initialization. 2009-06-15 13:42:28 +02:00
Stefan Dösinger
298bd3c50d wined3d: Store the bumpmap ARB constants in ARB structures. 2009-06-10 11:51:49 +02:00
Henri Verbeet
61fd875bb4 wined3d: Store compression information about compressed formats. 2009-06-10 11:51:04 +02:00
Henri Verbeet
fb7531599f wined3d: Only use stretch_rect_fbo() on surfaces that are FBO attachable. 2009-06-05 15:19:35 +02:00
Henri Verbeet
ad6279de9f wined3d: Replace the wined3d hash table with the generic red-black tree. 2009-06-03 11:40:14 +02:00
Henri Verbeet
97f320a77b wined3d: Introduce volumetexture_init() to handle most of the volume texture initialization. 2009-06-03 11:39:16 +02:00
Henri Verbeet
b0ba731bd5 wined3d: Introduce cubetexture_init() to handle most of the cube texture initialization. 2009-06-03 11:39:04 +02:00
Henri Verbeet
5171a65d81 wined3d: Introduce texture_init() to handle most of the 2D texture initialization. 2009-06-03 11:38:50 +02:00
Henri Verbeet
451a416fcf wined3d: Call resource_init() from basetexture_init(). 2009-06-02 11:57:22 +02:00
Stefan Dösinger
de12f880ce wined3d: Don't enable the NV frag extensions if we don't need them.
Enabling the NV extensions occupies a temp register for some reason. Avoid
needlessly enabling it.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
d8e219be75 wined3d: Avoid the TMP_COLOR mov in some cases.
Many 2.0 and 3.0 shaders end with a "mov oC0, rx". If sRGB writing is enabled,
the ARB backend writes to a TMP_COLOR temporary, and at the end of the shader
writes the sRGB corrected color to result.color. If oC0 is not partially
rewritten after the mov, we can ignore the mov, not declare TMP_COLOR at all,
and just use the rx register as input for the sRGB correction code. This saves
a temporary and an instruction.
2009-05-29 11:27:44 +02:00
Henri Verbeet
5654544725 wined3d: Add device resources from resource_init().
This is consistent with removing them from resource_cleanup().
2009-05-29 11:26:44 +02:00
Henri Verbeet
5e0f541621 wined3d: Remove ResourceReleased() from the public device interface. 2009-05-29 11:26:38 +02:00
Stefan Dösinger
e70c80add9 wined3d: Emulate if(bool) in ARB shaders. 2009-05-28 12:46:01 +02:00
Stefan Dösinger
e492dd858e wined3d: Add a function around the handler table.
This reduces the number of methods in the shader backend(the instr
modifiers can be handled in that wrapper) and it will help flow
control emulation in the ARB backend.
2009-05-28 12:45:45 +02:00
Stefan Dösinger
aad92c0780 wined3d: Manage vs_compile_args in the backends. 2009-05-28 12:45:32 +02:00
Stefan Dösinger
814dd42f25 wined3d: Manage ps_compiled_shader in the backends. 2009-05-28 12:45:21 +02:00
Stefan Dösinger
8763f6eac5 wined3d: Make find_gl_vshader backend specific. 2009-05-28 12:45:10 +02:00
Stefan Dösinger
d0d681c81e wined3d: Make find_gl_pshader backend private. 2009-05-28 12:44:43 +02:00
Stefan Dösinger
5865d9c01b wined3d: Store the compile args in the compile context, not the shader. 2009-05-28 12:44:22 +02:00
Stefan Dösinger
0629585c24 wined3d: Work around an ARBFP vs GLSL bug in Mac OS. 2009-05-27 11:57:54 +02:00
Henri Verbeet
2ee0d47a49 wined3d: Use strings for shader input/output semantics. 2009-05-27 11:12:12 +02:00
Henri Verbeet
19cb4594e3 wined3d: Use a separate structure for vertex shader attributes.
In D3D10 shaders input/output semantics are strings rather than predefined
types. Unfortunately, the code in vshader_get_input() can be performance
critical, depending on application behaviour. Since vshader_get_input() is
only relevant for d3d9 shaders anyway, just store the usage and usage_idx for
these shaders.
2009-05-27 11:12:07 +02:00
Henri Verbeet
e6efb797c3 wined3d: Make "packed_output" a bitmap. 2009-05-27 11:11:57 +02:00
Henri Verbeet
10fadadc54 wined3d: Use the "input_registers" bitmap for vertex shader attributes as well. 2009-05-27 11:11:53 +02:00