Austin English
5d15da6df5
wined3d: Recognize DRI R300 drivers as Mesa.
2009-09-25 13:15:48 +02:00
Henri Verbeet
789372afa8
wined3d: Don't free D3D pixel shaders until the wined3d pixel shader is destroyed.
2009-09-24 13:24:53 +02:00
Henri Verbeet
8aea1b1302
wined3d: Add a separate function for pixel shader initialization.
2009-09-24 13:24:27 +02:00
Henri Verbeet
ca05ef5dd0
wined3d: Don't free D3D vertex shaders until the wined3d vertex shader is destroyed.
2009-09-24 13:24:19 +02:00
Henri Verbeet
462decdfb9
wined3d: Add a separate function for vertex shader initialization.
2009-09-24 13:23:51 +02:00
Henri Verbeet
5ac3ed7f73
wined3d: Remove unused IWineD3DVertexShaderImpl fields.
2009-09-24 13:23:44 +02:00
Stefan Dösinger
4fe014cb54
wined3d: Fix sRGB->RGB copy condition.
...
The old condition happened to work, because SFLAG_INTEXTURE was not
set(we're loading it), and neither was SFLAG_INDRAWABLE(otherwise
INTEXTURE would be set too). If the fbo INDRAWABLE == INTEXTURE is
replaced by INDRAWABLE == INSRGBTEX this doesn't hold true any longer
because SFLAG_INDRAWABLE is set, but not used because the drawable
readback is never used for fbos.
2009-09-23 13:25:33 +02:00
Stefan Dösinger
33ca3c0207
wined3d: Don't mark SFLAG_INTEXTURE up to date with fbo stretchrect.
...
FBO stretchrect marks SFLAG_INDRAWABLE up to date, which currently
also marks SFLAG_INTEXTURE up to date. However, this will change when
we enable rendering to the srgb copy, in which case the drawable could
be equal to the srgb copy, not the rgb copy.
2009-09-23 13:25:21 +02:00
Stefan Dösinger
ba6fac697a
wined3d: Create a separate function for deleting GL textures.
2009-09-23 13:25:02 +02:00
Stefan Dösinger
529e6737d3
wined3d: Use the correct enum.
2009-09-23 13:24:25 +02:00
Stefan Dösinger
5b5e3bd0d2
wined3d: Track GL texture states in a separate structure.
2009-09-23 13:24:16 +02:00
Henri Verbeet
1c93ab1ee0
wined3d: Cleanup after wglMakeCurrent() failures in context_set_current().
...
The D3D context is potentially destroyed, so we need to clear the thread's
current D3D context. Found by Rico Schüller.
2009-09-23 12:37:25 +02:00
Henri Verbeet
eca28c942d
wined3d: Add support for ARB_provoking_vertex.
...
This is just EXT_provoking_vertex promoted to ARB.
2009-09-23 12:37:18 +02:00
Henri Verbeet
a0de42db13
wined3d: Fix a typo.
2009-09-23 12:37:12 +02:00
Henri Verbeet
34dd27e3a8
wined3d: Don't create a depthstencil renderbuffer if ARB_framebuffer_object is supported.
2009-09-23 12:37:06 +02:00
Henri Verbeet
ec97383f6f
wined3d: Add support for ARB_framebuffer_object.
2009-09-23 12:37:00 +02:00
Henri Verbeet
c4c86215ed
wined3d: Detect ARB_framebuffer_object.
2009-09-23 12:36:48 +02:00
Henri Verbeet
66a7236590
wined3d: Don't free D3D vertex declarations until the wined3d vertex declaration is destroyed.
2009-09-23 12:36:28 +02:00
Rico Schüller
8c414df17f
wined3d: Don't call wglMakeCurrent(NULL, NULL) in context_set_current() if the current context is NULL.
2009-09-22 17:47:02 +02:00
Henri Verbeet
5b8b97a737
wined3d: Cleanup vertex declaration initialization.
2009-09-22 16:17:20 +02:00
Henri Verbeet
0a4fa886a7
wined3d: Revert 4ba16b84a9
.
...
Unfortunately surface_can_stretch_rect() doesn't check just for
WINED3DFMT_FLAG_FBO_ATTACHABLE.
2009-09-22 16:16:55 +02:00
Rico Schüller
8a890d399a
wined3d: Fix shader spam.
2009-09-18 10:47:17 -05:00
Henri Verbeet
dbc4dfc495
wined3d: Move "parent_ops" to IWineD3DResourceClass.
2009-09-18 08:55:33 -05:00
Henri Verbeet
93b0600829
wined3d: Don't free D3D buffers until the wined3d buffer is destroyed.
2009-09-18 08:55:25 -05:00
Henri Verbeet
22124bc5cb
wined3d: Add a separate function for buffer initialization.
2009-09-18 08:54:44 -05:00
Henri Verbeet
a8e8f763bf
wined3d: Don't free D3D textures until the wined3d texture is destroyed.
2009-09-18 08:54:34 -05:00
Henri Verbeet
4aaf47f277
wined3d: Get rid of the unused DeviceType parameter to select_shader_mode().
2009-09-17 10:09:57 -05:00
Henri Verbeet
4ba16b84a9
wined3d: Get rid of some redundant checks for ORM_FBO.
...
ORM_FBO is already implied by surface_can_stretch_rect() because
WINED3DFMT_FLAG_FBO_ATTACHABLE can only be set when ORM_FBO is.
2009-09-17 10:09:50 -05:00
Henri Verbeet
de3bd86fb6
wined3d: Don't free D3D cube textures until the wined3d cube texture is destroyed.
2009-09-17 10:09:44 -05:00
Henri Verbeet
21241432f1
wined3d: Get rid of a redundant strcpy().
2009-09-17 10:09:10 -05:00
Henri Verbeet
a286646f51
wined3d: Don't free D3D volume textures until the wined3d volume texture is destroyed.
2009-09-16 13:06:06 -05:00
Henri Verbeet
83b3d4f27a
wined3d: Move vtable initialization to the texture init functions.
2009-09-16 13:05:45 -05:00
Henri Verbeet
e9000d2e6c
wined3d: Don't free D3D volumes until the wined3d volume is destroyed.
2009-09-16 13:05:20 -05:00
Henri Verbeet
2b2d3de025
wined3d: Add a separate function for volume initialization.
2009-09-16 13:04:47 -05:00
Henri Verbeet
a5214c306f
wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
...
This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
2009-09-16 13:04:32 -05:00
Henri Verbeet
689984b425
wined3d: Mark internal symbols hidden.
2009-09-15 14:32:49 -05:00
Henri Verbeet
9880cd7504
wined3d: Make some variables static.
2009-09-15 14:32:36 -05:00
Henri Verbeet
2b2fc827ce
wined3d: Remove unused parameters to drawPrimitive().
2009-09-11 12:09:14 +02:00
Jaime Rave
4700038fdf
wined3d: Fix vendor detection when using an Intel X4500HD.
2009-09-09 12:07:31 +02:00
Henri Verbeet
d1f5fa65d0
wined3d: Fix some function pointers and typedefs.
2009-09-08 13:06:14 +02:00
Henri Verbeet
f8a3a5fd49
wined3d: Check the correct debug channel in shader_arb_load_constantsF().
2009-09-08 13:06:07 +02:00
Henri Verbeet
f928d6ec87
wined3d: Fix shader_arb_load_constantsF().
2009-09-08 13:06:01 +02:00
Stefan Dösinger
e1469961d4
wined3d: Test and fix ddraw and d3d9 GetDC differences.
...
The MSDN is not totally correct: A8R8G8B8 and A1R5G5B5 also allow GetDC. The
main differences that have to be filtered out in d3d9.dll are GetDC on
A8B8G8R8, X8B8G8R8 and P8.
2009-09-08 13:04:52 +02:00
Stefan Dösinger
65f3d54da5
wined3d: Silence a compiler warning.
2009-09-08 13:03:24 +02:00
Stefan Dösinger
d6547c535b
wined3d: Only generate the clipplane emulation KIL if a clipplane is used.
...
The KIL is quite expensive because it forces drivers to disable early Z
discard. It is cheaper to generate and switch between two shaders.
2009-09-08 13:03:03 +02:00
Henri Verbeet
4cdb1c9211
wined3d: Print a warning when an ARB program exceeds the native resource limits.
2009-09-02 11:25:58 +02:00
Henri Verbeet
055906e2a9
wined3d: Properly check for ARB program compile errors.
2009-09-02 11:25:58 +02:00
Henri Verbeet
c951f6925c
wined3d: Release the GL lock on IWineD3DImpl_FillGLCaps() error paths.
2009-09-02 11:25:57 +02:00
Henri Verbeet
ab8523931a
wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn't supported.
2009-09-01 14:05:51 +02:00
Henri Verbeet
078273afa6
wined3d: Add support for ARB_depth_clamp.
2009-09-01 14:05:45 +02:00
Stefan Dösinger
9281bdb478
wined3d: SetLOD is ignored on D3DPOOL_DEFAULT textures.
...
I am not testing SYSTEMMEM and SCRATCH textures. SCRATCH textures
cannot be created, SYSTEMMEM ones cannot be used for texturing on
Windows.
2009-08-31 12:18:56 +02:00
Stefan Dösinger
edf1c50b54
wined3d: Handle per-texture max LOD level.
...
GL_TEXTURE_BASE_LEVEL matches the basetexture::SetLOD functionality.
D3DSAMP_MAXMIPLEVEL essentially does the same as SetLOD. The test included in
this patch shows that the smallest mipmap level is used.
2009-08-31 12:18:41 +02:00
Stefan Dösinger
eafc00e173
wined3d: Add a comment about D3DSAMP_MAXMIPLEVEL.
2009-08-31 12:18:10 +02:00
Stefan Dösinger
531ec2267b
wined3d: Allow filtering on RECT textures.
...
There is no reason to disable linear filtering, we just cannot use mipmapping.
2009-08-31 12:18:01 +02:00
Stefan Dösinger
52d2865521
wined3d: Remove redundant TRACEs.
...
These made sense before we had the quirk table. Nowadys the quirk
table contains quirk description strings that print out whether or not
any apple specific quirks are applied. The traces in match_apple just
spam the log because this code is run multiple times for many quirks.
2009-08-31 12:17:41 +02:00
Rico Schüller
d0b7a70b38
wined3d: Add WINED3D_SM4_OP_MIN.
2009-08-28 11:54:49 +02:00
Rico Schüller
3717e9e162
wined3d: Add WINED3D_SM4_OP_MAX.
2009-08-28 11:54:49 +02:00
Henri Verbeet
560d63548d
wined3d: Remove trailing spaces.
2009-08-27 11:45:37 +02:00
Henri Verbeet
afc06ce748
wined3d: Get rid of a redundant memset() in device_stream_info_from_declaration().
2009-08-27 11:45:37 +02:00
Henri Verbeet
c514323442
wined3d: Properly check if an attribute is used in drawStridedInstanced().
2009-08-27 11:45:37 +02:00
Jörg Höhle
b9d955b86d
wined3d: Delete meaningless UNIX GL driver version parsing.
2009-08-27 11:00:59 +02:00
Stefan Dösinger
52731a80c8
wined3d: Make it clear that glFlush and glFinish are WGL functions.
2009-08-26 14:35:41 +02:00
Stefan Dösinger
21f4e42a98
wined3d: Don't use WINED3DADAPTER_DEFAULT as refresh rate.
2009-08-26 14:35:33 +02:00
Stefan Dösinger
3f6909c1f2
wined3d: Initialize ps_arb_max_local_constants.
2009-08-26 14:35:27 +02:00
Henri Verbeet
d4e167dfbc
wined3d: Properly check if an attribute is used in remove_vbos().
2009-08-26 12:10:45 +02:00
Henri Verbeet
59c017c8bd
wined3d: Properly check if an attribute is used in state_normalize().
2009-08-26 12:10:42 +02:00
Henri Verbeet
6ef17134d2
wined3d: Properly check if an attribute is used in transform_texture().
2009-08-26 12:10:38 +02:00
Henri Verbeet
f9c791f9ca
d3d8: Use a wined3d cs for wined3d locking.
...
We will need this for d3d10, where both dxgi and d3d10core are making wined3d
calls. Right now d3d8/d3d9 also use this to protect their own data, but
eventually we should push this down into wined3d itself and use something a
bit more fine-grained. There's no good reason that doing e.g. a vertex buffer
upload in some thread should block all of wined3d.
2009-08-25 11:12:17 +02:00
Henri Verbeet
839658848c
wined3d: Properly check if an attribute is used in find_conversion_shift().
2009-08-25 11:09:45 +02:00
Henri Verbeet
bda89180e1
wined3d: Properly check if an attribute is used in streamsrc().
2009-08-25 11:09:40 +02:00
Henri Verbeet
c9f270a5d9
wined3d: Properly check if an attribute is used in drawStridedSlow().
2009-08-25 11:09:34 +02:00
Henri Verbeet
7823679e20
wined3d: Properly check if an attribute is used in state_colormat().
2009-08-24 15:17:33 +02:00
Henri Verbeet
c1c58f85ca
wined3d: Properly check if an attribute is used in drawStridedSlowVs().
2009-08-24 15:17:33 +02:00
Henri Verbeet
16b0c6a0fd
wined3d: Properly check if an attribute is used in buffer_check_attribute().
2009-08-24 15:17:33 +02:00
Henri Verbeet
850232810d
wined3d: Properly check if an attribute is used in loadTexCoords().
2009-08-24 15:17:33 +02:00
Henri Verbeet
e48350a471
wined3d: Properly check if an attribute is used in loadVertexData().
2009-08-24 15:17:32 +02:00
Henri Verbeet
0c4201d5fd
wined3d: Properly check if an attribute is used in TRACE_STRIDED.
2009-08-21 11:12:01 +02:00
Henri Verbeet
458afd64bd
wined3d: Properly check if an attribute is used in IWineD3DDeviceImpl_ProcessVertices().
2009-08-21 11:10:26 +02:00
Henri Verbeet
4ec2b09d8f
wined3d: Don't check for a "representative" in the MarkStateDirty() functions.
...
States without representative should never be called. Arguably they shouldn't
exist in the first place, but allowing them simplifies the state table.
2009-08-21 11:10:21 +02:00
Henri Verbeet
b2e543b22f
wined3d: Add a state handler for WINED3DRS_DEBUGMONITORTOKEN.
2009-08-21 11:10:15 +02:00
Henri Verbeet
a36e30b541
wined3d: Mark the correct state dirty.
2009-08-21 11:10:07 +02:00
Stefan Dösinger
3cd91a451d
wined3d: Use 50 chars for register names in texm3x3* functions.
2009-08-19 17:28:08 +02:00
Henri Verbeet
c70f3816ab
wined3d: Hide WINED3DFMT_R16G16B16A16_UNORM again.
...
This format is broken on some cards. Hide it until we figure out a reliable
way to deal with it.
2009-08-19 14:45:39 +02:00
Henri Verbeet
5a24a02ad5
wined3d: Pass the context's gl_info to state handlers.
2009-08-19 14:45:34 +02:00
Henri Verbeet
dc8b1bdc0f
wined3d: Rename some GLSL instruction handlers.
...
The pshader_glsl_* names are a leftover from when we had separate code for
vertex and fragment shaders.
2009-08-19 14:45:23 +02:00
Henri Verbeet
ffb38da024
wined3d: Try to force a top-left filling convention.
2009-08-19 14:45:09 +02:00
Henri Verbeet
92b66ac82c
wined3d: Make use_vs() safe to call from IWineD3DDeviceImpl_FindTexUnitMap().
2009-08-19 14:45:02 +02:00
Rico Schüller
d9784c1a2f
wined3d: Fix some checkGLcalls.
2009-08-19 14:41:49 +02:00
Jörg Höhle
7763da811b
wined3d: Check GL_SUPPORT prior to an ARB occlusion call.
2009-08-17 19:36:41 +02:00
Henri Verbeet
d900491310
wined3d: Replace find_clip_texcoord() with a generic function for finding a free input register.
2009-08-17 13:57:50 +02:00
Henri Verbeet
8d0ad2cf36
wined3d: Remove a redundant IWineD3DDeviceImpl_MarkStateDirty() call.
...
We should now correctly track the relevant state per-context. The
IWineD3DDeviceImpl_SetViewport() call isn't quite correct for d3d8 and d3d9,
Stefan still has a patch for that.
2009-08-17 13:57:50 +02:00
Henri Verbeet
b8078fc747
wined3d: Use WINED3D_UNMAPPED_STAGE in some more places.
2009-08-17 13:57:50 +02:00
Henri Verbeet
7a0670392c
wined3d: Check the correct vertex sampler in device_unit_free_for_vs().
2009-08-17 13:57:50 +02:00
Henri Verbeet
8cf7aa2bdd
wined3d: Don't use a start index higher than MAX_COMBINED_SAMPLERS - 1 in device_map_vsamplers().
2009-08-17 13:57:50 +02:00
Henri Verbeet
ecd2dc7603
wined3d: Make RTL_READTEX the default rendertarget locking method.
...
For most cards this should make more sense than RTL_READDRAW, even if e.g.
surface_upload_data() has some room for improvement.
2009-08-14 13:59:09 +02:00
Henri Verbeet
779ad6b9f1
wined3d: Add a separate function for guessing the card.
2009-08-14 13:59:08 +02:00
Henri Verbeet
93218c6602
wined3d: Add a separate function for guessing the driver version.
...
Note that I don't necessarily think the ATI path for example will work
correctly. This patch is just for moving it out of IWineD3DImpl_FillGLCaps().
2009-08-14 13:59:08 +02:00
Henri Verbeet
b94e89dae9
wined3d: Add a separate function for parsing the GL version.
2009-08-14 13:59:08 +02:00
Henri Verbeet
a1402e0677
wined3d: Add a separate function for guessing the vendor.
2009-08-14 13:59:08 +02:00
Henri Verbeet
c573d0a4c9
wined3d: Escape GL strings with debugstr_a() in IWineD3DImpl_FillGLCaps().
2009-08-14 13:59:08 +02:00