Roderick Colenbrander : wined3d: Shader declaration cap fixes.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Aug 8 13:21:31 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: eba1f90ef6f4292592b75e4771eda960de19c3ff
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=eba1f90ef6f4292592b75e4771eda960de19c3ff

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Tue Aug  8 17:46:03 2006 +0200

wined3d: Shader declaration cap fixes.

---

 dlls/wined3d/directx.c |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index dca813e..9bc7e71 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2031,7 +2031,7 @@ #endif
                                    WINED3DVTXPCAPS_VERTEXFOG         |
                                    WINED3DVTXPCAPS_TEXGEN;
                                   /* FIXME: Add 
-                                     D3DVTXPCAPS_TWEENING */
+                                     D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */
 
     *pCaps->MaxPrimitiveCount   = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */
     *pCaps->MaxVertexIndex      = 0xFFFFF;
@@ -2095,12 +2095,27 @@ #endif
         GLint max_buffers = 1;
         FIXME("Caps support for directx9 is nonexistent at the moment!\n");
         *pCaps->DevCaps2                          = 0;
-        /* TODO: D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES */
+        /* TODO: D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES and VS3.0 needs atleast D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET */
         *pCaps->MaxNpatchTessellationLevel        = 0;
         *pCaps->MasterAdapterOrdinal              = 0;
         *pCaps->AdapterOrdinalInGroup             = 0;
         *pCaps->NumberOfAdaptersInGroup           = 1;
-        *pCaps->DeclTypes                         = 0;
+
+        if(*pCaps->VertexShaderVersion >= D3DVS_VERSION(2,0)) {
+            /* OpenGL supports all formats below perhaps not allways without conversion but it supports them.
+               Further GLSL doesn't seem to have an official unsigned type as I'm not sure how we handle it
+               don't advertise iet yet. We might need to add some clamping in the shader engine to support it.       
+               TODO: D3DDTCAPS_USHORT2N, D3DDTCAPS_USHORT4N, D3DDTCAPS_UDEC3, D3DDTCAPS_DEC3N */
+            *pCaps->DeclTypes = D3DDTCAPS_UBYTE4    |
+                                D3DDTCAPS_UBYTE4N   |
+                                D3DDTCAPS_SHORT2N   |
+                                D3DDTCAPS_SHORT4N   |
+                                D3DDTCAPS_FLOAT16_2 |
+                                D3DDTCAPS_FLOAT16_4;
+                                                                                                                                
+        } else
+            *pCaps->DeclTypes                         = 0;
+
 #if 0 /*FIXME: Simultaneous render targets*/
         GL_MAX_DRAW_BUFFERS_ATI 0x00008824
         if (GL_SUPPORT(GL_MAX_DRAW_BUFFERS_ATI)) {




More information about the wine-cvs mailing list