Commit Graph

616 Commits

Author SHA1 Message Date
Henri Verbeet a6917b143d wined3d: Use IDL to generate wined3d.h. 2008-11-25 13:37:22 +01:00
Stefan Dösinger 0bf32b12f5 wined3d: Add the ability to duplicate GL pixel shaders.
Some stateblock parameters have to be compiled into the GL pixel
shader code, like lines for pixelformat fixups. This leads to problems
when applications switch those settings, requiring a recompilation of
the shader. This patch enables wined3d to have multiple GL shaders for
a D3D shader(pixel shaders only so far) to handle this more
efficiently.
2008-11-25 13:07:03 +01:00
Stefan Dösinger aed9305c78 wined3d: Store shader IDs in the vs and ps impl structures. 2008-11-25 13:06:45 +01:00
Stefan Dösinger dd8905543b wined3d: Pass some stateblock values around directly.
This was suggested by Ivan quite a while ago, and we need it to better
handle conflicting texture format corrections and similar stateblock
value changes which until now required a recompilation of the entire
shader
2008-11-25 13:06:35 +01:00
Stefan Dösinger ff767f4984 wined3d: Make the shader backend call CompileShader.
A number of considerations contribute to this:

1) The shader backend knows best which shader(s) it needs. GLSL needs
both, arb only one
2) The shader backend may pass some parameters to the compilation
code(e.g. which pixel format fixup to use)
3) The structures used in (2) are different in vs and ps, so a
baseshader::Compile won't work
4) The structures in (2) are wined3d-private structures, so
having a public method in the vtable won't work(its a bad idea
anyway).
2008-11-25 13:06:23 +01:00
Roderick Colenbrander 273357264a wined3d: Add registry key for overriding the pci vendor id. 2008-11-24 14:52:32 +01:00
Roderick Colenbrander 52d59718c7 wined3d: Add registry key for overriding pci device id. 2008-11-24 14:52:25 +01:00
Henri Verbeet ba78f072e2 wined3d: Remove some unused code. 2008-11-20 14:25:11 +01:00
Henri Verbeet 8899f3412b wined3d: wined3d_gl.h should be internal to wined3d. 2008-11-20 14:24:56 +01:00
Stefan Dösinger 5c79a9f437 wined3d: Rename the fragment ffp desc structures.
This reflects the fact that they describe the fragment pipeline.
The vertex pipeline will use its own structures.
2008-11-20 12:17:45 +01:00
Henri Verbeet 57401fcab2 wined3d: Pass the texture type to the shader depth blt function. 2008-10-28 12:33:18 +01:00
Henri Verbeet 4034a29f19 wined3d: Move depth_blt to surface.c. 2008-10-28 12:33:13 +01:00
Kjell Rune Skaaraas ed96dd72e3 wined3d: Implement IWineD3DResourceImpl_GetPriority and IWineD3DResourceImpl_SetPriority for resource management. 2008-10-08 14:17:03 +02:00
Henri Verbeet 3a7fcec4d7 wined3d: Handle texture coordinates the same way we handle other vertex attributes. 2008-09-25 11:53:10 +02:00
Henri Verbeet eaf2474003 wined3d: Split SetGlTextureDesc() up.
This creates a function for setting the texture name and one for
setting the texture target. The idea is that the texture target should
get set right after the surface is created, and won't change, while
generating a texture name can wait.
2008-09-25 11:52:42 +02:00
Henri Verbeet 5ba40c3d58 wined3d: Make some more GLSL functions private to the backend. 2008-09-24 12:53:23 +02:00
Henri Verbeet a0940051eb wined3d: Make some more ARB program functions private to the backend. 2008-09-24 12:53:16 +02:00
Henri Verbeet daef052daa wined3d: atifs_shader_backend doesn't exist anymore. 2008-09-24 12:53:10 +02:00
Henri Verbeet 2e76954097 wined3d: Move part of the shader instruction table to the backend. 2008-09-24 12:53:05 +02:00
Henri Verbeet ca28930113 wined3d: Merge pshader_hw_map2gl() and vshader_hw_map2gl().
This isn't the prettiest way to merge those functions, but it's a start.
2008-09-23 12:25:27 +02:00
Henri Verbeet 9d192c6251 wined3d: Skip copying the depth stencil if it's discarded.
This gives a small performance improvement for applications that are
smart enough to set the D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL flag, or
to create depth stencils with Discard set to TRUE.
2008-09-23 12:25:18 +02:00
Henri Verbeet d95ae08ad4 wined3d: Get rid of the wantsDepthStencilBuffer in IWineD3DSwapChainImpl. 2008-09-23 12:25:04 +02:00
Henri Verbeet f84680e66c wined3d: Don't try to draw with unsupported attribute data types. 2008-09-22 12:20:34 +02:00
Henri Verbeet 76de76e508 wined3d: Destroy FBO entries in the context. 2008-09-22 12:20:24 +02:00
Henri Verbeet 45820046e8 wined3d: Create a FBO for each combination of render targets and depth stencil.
The main reason for this change is crappy performance for reconfiguring FBOs.
2008-09-19 11:30:00 +02:00
Henri Verbeet a269236649 wined3d: Move FBO handling functions to context.c. 2008-09-19 11:29:13 +02:00
Henri Verbeet ee49230cd2 Make some ARB program structs and functions private to the backend. 2008-09-16 22:33:42 +02:00
Henri Verbeet c2178eb64f wined3d: Make some GLSL structs and functions private to the backend. 2008-09-16 22:33:35 +02:00
Stefan Dösinger 421b6558c1 wined3d: Pack the ffp_desc structure better. 2008-09-05 11:22:55 +02:00
Henri Verbeet 81effcf30d wined3d: Set the viewport to the texture size in depth_blt(). 2008-09-05 10:50:55 +02:00
Stefan Dösinger 3b48660f43 wined3d: Implement YV12 support for emulated overlays.
This is the prefered format of many codecs, and for some codecs this
is the only supported output format. As usual I try to handle all the
conversion in the GPU and keep the CPU involvement minimal to gain the
full performance of PBO transfers.
2008-09-02 14:55:50 +02:00
Henri Verbeet b4f43e372e wined3d: Remove useless hash_table_t typedef. 2008-08-29 12:26:55 +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 750973cec5 wined3d: Remove BaseTexture::UnBindTexture. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 462ddaa254 wined3d: Make the texture stage mapping nvrc independent. 2008-08-27 13:21:24 +02:00
Stefan Dösinger 9a6bc683e1 wined3d: Use the correct texture limit.
We have to use the texture limit of the fragment pipeline in use here,
not the fixed function GL texture limit.
2008-08-26 12:07:41 +02:00
Stefan Dösinger 61a900fdfc wined3d: Fix the drawStridedSlow callback function calling convention.
Since some of those function pointers are direct GL functions the function
prototype needs the WINE_GLAPI calling convention. This makes prevents
drawStridedSlow from crashing with USE_WIN32_OPENGL.
2008-08-25 12:26:17 +02:00
Stefan Dösinger f39e122477 wined3d: Add fixed function sRGB write correction. 2008-08-25 12:25:13 +02:00
H. Verbeet b917bdaa52 wined3d: Remove useless hash_table_entry_t typedef.
It doesn't add much.
2008-08-22 10:39:08 +02:00
H. Verbeet 05931f4a5a wined3d: Track FBOs per-context.
Although sharing FBOs across contexts is allowed by EXT_framebuffer_object
(issue 76), it causes issues with nVidia drivers. Considering the GL 3 spec
explicitly disallows sharing of FBOs accross contexts (Appendix D), this
patch is probably the right thing to do.
2008-08-22 10:38:59 +02:00
Stefan Dösinger bab367e1a0 wined3d: Update the overlay when the destination was drawn to. 2008-08-21 13:27:47 +02:00
Stefan Dösinger 8fe6bf0bad wined3d: Fix the unused arg marker. 2008-08-20 12:34:44 +02:00
Stefan Dösinger 1f4cf3513d wined3d: Implement YUV emulation with GL_ARB_fragment_program. 2008-08-20 12:26:14 +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 fc6b977486 wined3d: Start a framework for color conversion shaders in blits. 2008-08-20 12:25:26 +02:00
Stefan Dösinger 25c07dc86c wined3d: Remove the ddraw_window device member. 2008-08-19 12:25:05 +02:00
Stefan Dösinger 376944ebe4 wined3d: Remove the device-global fullscreen flag. 2008-08-19 12:24:57 +02:00
Stefan Dösinger 7f2b8f9bba wined3d: Support redirecting the primary context. 2008-08-19 12:21:49 +02:00
Stefan Dösinger e178ddd9e1 wined3d: Use a swapchain for GDI surfaces.
This is a long-needed cleanup aimed at removing the ddraw_primary,
ddraw_window, ddraw_width and ddraw_height members from
IWineD3DDeviceImpl, which just do not belong there.  Destination
window and screen handling is supposed to be done by swapchains.
2008-08-19 12:21:32 +02:00
Stefan Dösinger e5de2fc82c wined3d: Move some swapchain code into a base class. 2008-08-19 12:20:47 +02:00