Henri Verbeet
f8c4832276
wined3d: Use GL_DEPTH24_STENCIL8_EXT for depth stencil formats.
2009-06-05 15:19:56 +02:00
Henri Verbeet
d08f4fb5f5
wined3d: Add support for EXT_packed_depth_stencil.
2009-06-05 15:19:56 +02:00
Henri Verbeet
a5876bb91e
wined3d: Use FBOs for offscreen rendering by default.
2009-06-05 15:19:40 +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
786408fb95
wined3d: Check FBO compatibility on all formats with a GL format.
...
Instead of just the ones that have a fallback specified.
2009-06-05 14:43:25 +02:00
Henri Verbeet
b93c3b3253
wined3d: Set texture filtering to NEAREST in check_fbo_compat().
2009-06-05 14:43:25 +02:00
Henri Verbeet
0571ebcee3
wined3d: Add extension detection to the GL format template table.
2009-06-05 14:43:25 +02:00
Henri Verbeet
a2440aed7e
wined3d: Add extension detection for ARB_depth_texture.
2009-06-05 14:43:25 +02:00
Henri Verbeet
daeb86d620
wined3d: Don't use the vertex/pixel shader when we're not supposed to.
...
This also avoids removing programs from lists they're not in in
delete_glsl_program_entry().
2009-06-05 14:43:25 +02:00
Henri Verbeet
cae6a32b08
wined3d: Check the result from wine_rb_get() before using it in WINE_RB_ENTRY_VALUE.
2009-06-05 14:43:25 +02:00
Henri Verbeet
a44f84fdf7
wined3d: Add a proper enum value for "no extension".
...
This would allow an extension check for ARB_COLOR_BUFFER_FLOAT to work.
2009-06-04 12:19:02 +02:00
Henri Verbeet
0a059aafbe
wined3d: Check FBO compatibility after the fixups are applied.
2009-06-04 12:18:47 +02:00
Henri Verbeet
faaea93573
wined3d: Remove WINED3DFMT_R16G16B16A16_SNORM from the GL formats template.
...
This entry obviously can't work correctly.
2009-06-04 12:18:42 +02:00
Henri Verbeet
0cf49767ad
wined3d: Remove entries without an internal format from the GL formats template.
2009-06-04 12:18:33 +02:00
Henri Verbeet
37bdcd6b9b
wined3d: Free priv->stack in shader_glsl_free().
2009-06-04 12:18:27 +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
9e69b86a03
wined3d: Introduce volumetexture_cleanup().
2009-06-03 11:39:09 +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
aabb51286d
wined3d: Introduce cubetexture_cleanup().
2009-06-03 11:38:55 +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
Stefan Dösinger
2afcb794f2
wined3d: Implement clipplanes in the ARB backend.
...
Using GL_NV_vertex_program2_option so far. If we're really desparate we can
handle some cases without the extension by using a custom varying and texkill
in the fragment program.
2009-06-02 12:09:54 +02:00
Stefan Dösinger
1276b090b4
wined3d: Update clipplanes on a shader-fixed function switch.
...
The view matrix that was set at the time the clipplane was applied is
hardcoded into the clipplane. With vertex shaders clip planes ignore
the view matrix in d3d. We implement that, but this also means that
the clip planes potentially change when we switch between vs and fixed
func.
2009-06-02 12:09:46 +02:00
Stefan Dösinger
dfc9141458
wined3d: Use condition code for sRGB write correction if available.
...
This gives a small performance improvement. Don't enable NVfp for it though,
because the NVfp penalty is bigger than the gain from this patch. But if NVfp
is enabled anyway, make use of it.
2009-06-02 12:09:38 +02:00
Stefan Dösinger
7e1100d0e4
wined3d: Handle LRP in vertex shaders.
...
The ARB "LRP" instruction is a fragment program only instruction. It is
however valid in vs_2_0+ vertex shaders, so we have to emulate it.
2009-06-02 12:09:26 +02:00
Henri Verbeet
22022cf8b3
wined3d: Create a texture_cleanup() function.
2009-06-02 11:57:22 +02:00
Henri Verbeet
451a416fcf
wined3d: Call resource_init() from basetexture_init().
2009-06-02 11:57:22 +02:00
Henri Verbeet
812ee5208c
wined3d: Partially revert 7433eb76b5
.
...
The write mask sizes for the input and output semantics can be different,
resulting in compilation failure.
2009-06-02 11:57:22 +02:00
Stefan Dösinger
38076e08ca
wined3d: Add a comment about texbem and X2D.
2009-06-01 16:16:00 +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
5a07bacd36
wined3d: Write result.color in one mov.
...
Otherwise the Nvidia assembler needs one temp reg.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
050735be79
wined3d: Revert "WineD3D: use CMP instead of SLT and SGE in sRGB correction".
...
This reverts patch ba35760f9f
.
The original patch did not achive its goal, because CMP is a macro that is
expanded to SLT, SGE, MUL, MAD, at least on nvidia hardware. To make matters
worse, it uses a temporary register, and the assembler usually is not clever
enough to find a free temporary from the shader code. If we generate the code
outselves we can pick one of our temps for this job.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
8665ee5906
wined3d: Use Rx registers for sRGB correction if possible.
...
This removes another reason to declare TA, TB and TC.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
7168b62323
wined3d: Use NRM from GL_NV_fragment_program2 if available.
2009-05-29 11:27:51 +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
Stefan Dösinger
da7176be2a
wined3d: Use DP2A or X2D for dp2add if available.
2009-05-29 11:27:29 +02:00
Stefan Dösinger
e2be741bc0
wined3d: Remove a MESA hack.
2009-05-29 11:27:23 +02:00
Stefan Dösinger
5f723bc44a
wined3d: Allocate the proper size for the lconst map.
2009-05-29 11:27:14 +02:00
Henri Verbeet
7433eb76b5
wined3d: Use the proper OUT swizzle in handle_ps3_input().
2009-05-29 11:26:54 +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
Henri Verbeet
d37472f27b
wined3d: Add missing ActivateContext calls to shader_destroy() implementations.
2009-05-29 11:26:32 +02:00
Louis Lenders
06936f04c0
wined3d: Fix CheckDeviceMultiSampleType when queried with D3DMULTISAMPLE_NONE.
2009-05-28 15:02:08 +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
732a9a15d5
wined3d: Remove the forward declaration added in the last patch.
2009-05-28 12:44:59 +02:00
Stefan Dösinger
d0d681c81e
wined3d: Make find_gl_pshader backend private.
2009-05-28 12:44:43 +02:00