Henri Verbeet : wined3d: Remove unused wined3d_shader_limits fields.

Alexandre Julliard julliard at winehq.org
Tue Oct 9 13:12:35 CDT 2012


Module: wine
Branch: master
Commit: 07203fa4654b492fbff9e535600bffe48250bf25
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=07203fa4654b492fbff9e535600bffe48250bf25

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Oct  8 21:32:42 2012 +0200

wined3d: Remove unused wined3d_shader_limits fields.

---

 dlls/wined3d/shader.c          |   46 ----------------------------------------
 dlls/wined3d/wined3d_private.h |    5 ----
 2 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index aac19ae..a388606 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1761,21 +1761,16 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
             shader->reg_maps.shader_version.minor);
     struct wined3d_device *device = shader->device;
 
-    shader->limits.texcoord = 0;
-    shader->limits.attributes = 16;
     shader->limits.packed_input = 0;
 
     switch (shader_version)
     {
         case WINED3D_SHADER_VERSION(1, 0):
         case WINED3D_SHADER_VERSION(1, 1):
-            shader->limits.temporary = 12;
             shader->limits.constant_bool = 0;
             shader->limits.constant_int = 0;
-            shader->limits.address = 1;
             shader->limits.packed_output = 12;
             shader->limits.sampler = 0;
-            shader->limits.label = 0;
             /* TODO: vs_1_1 has a minimum of 96 constants. What happens when
              * a vs_1_1 shader is used on a vs_3_0 capable card that has 256
              * constants? */
@@ -1784,24 +1779,18 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
 
         case WINED3D_SHADER_VERSION(2, 0):
         case WINED3D_SHADER_VERSION(2, 1):
-            shader->limits.temporary = 12;
             shader->limits.constant_bool = 16;
             shader->limits.constant_int = 16;
-            shader->limits.address = 1;
             shader->limits.packed_output = 12;
             shader->limits.sampler = 0;
-            shader->limits.label = 16;
             shader->limits.constant_float = min(256, device->d3d_vshader_constantF);
             break;
 
         case WINED3D_SHADER_VERSION(3, 0):
-            shader->limits.temporary = 32;
             shader->limits.constant_bool = 16;
             shader->limits.constant_int = 16;
-            shader->limits.address = 1;
             shader->limits.packed_output = 12;
             shader->limits.sampler = 4;
-            shader->limits.label = 16; /* FIXME: 2048 */
             /* DX10 cards on Windows advertise a d3d9 constant limit of 256
              * even though they are capable of supporting much more (GL
              * drivers advertise 1024). d3d9.dll and d3d8.dll clamp the
@@ -1811,26 +1800,19 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
             break;
 
         case WINED3D_SHADER_VERSION(4, 0):
-            shader->limits.temporary = 32; /* FIXME: 4096 */
             shader->limits.sampler = 16; /* FIXME: 128 resources, 16 sampler states */
             shader->limits.constant_int = 0;
             shader->limits.constant_float = 0;
             shader->limits.constant_bool = 0;
-            shader->limits.address = 1;
             shader->limits.packed_output = 16;
             shader->limits.packed_input = 0;
-            shader->limits.attributes = 16;
-            shader->limits.label = 16;
             break;
 
         default:
-            shader->limits.temporary = 12;
             shader->limits.constant_bool = 16;
             shader->limits.constant_int = 16;
-            shader->limits.address = 1;
             shader->limits.packed_output = 12;
             shader->limits.sampler = 0;
-            shader->limits.label = 16;
             shader->limits.constant_float = min(256, device->d3d_vshader_constantF);
             FIXME("Unrecognized vertex shader version \"%u.%u\".\n",
                     shader->reg_maps.shader_version.major,
@@ -1896,17 +1878,12 @@ static void geometryshader_set_limits(struct wined3d_shader *shader)
     switch (shader_version)
     {
         case WINED3D_SHADER_VERSION(4, 0):
-            shader->limits.temporary = 32; /* FIXME: 4096 */
-            shader->limits.texcoord = 0;
             shader->limits.sampler = 16; /* FIXME: 128 resources, 16 sampler states */
             shader->limits.constant_int = 0;
             shader->limits.constant_float = 0;
             shader->limits.constant_bool = 0;
-            shader->limits.address = 1;
             shader->limits.packed_output = 32;
             shader->limits.packed_input = 16;
-            shader->limits.attributes = 0;
-            shader->limits.label = 16;
             break;
 
         default:
@@ -2094,8 +2071,6 @@ static void pixelshader_set_limits(struct wined3d_shader *shader)
     DWORD shader_version = WINED3D_SHADER_VERSION(shader->reg_maps.shader_version.major,
             shader->reg_maps.shader_version.minor);
 
-    shader->limits.attributes = 0;
-    shader->limits.address = 0;
     shader->limits.packed_output = 0;
 
     switch (shader_version)
@@ -2104,81 +2079,60 @@ static void pixelshader_set_limits(struct wined3d_shader *shader)
         case WINED3D_SHADER_VERSION(1, 1):
         case WINED3D_SHADER_VERSION(1, 2):
         case WINED3D_SHADER_VERSION(1, 3):
-            shader->limits.temporary = 2;
             shader->limits.constant_float = 8;
             shader->limits.constant_int = 0;
             shader->limits.constant_bool = 0;
-            shader->limits.texcoord = 4;
             shader->limits.sampler = 4;
             shader->limits.packed_input = 0;
-            shader->limits.label = 0;
             break;
 
         case WINED3D_SHADER_VERSION(1, 4):
-            shader->limits.temporary = 6;
             shader->limits.constant_float = 8;
             shader->limits.constant_int = 0;
             shader->limits.constant_bool = 0;
-            shader->limits.texcoord = 6;
             shader->limits.sampler = 6;
             shader->limits.packed_input = 0;
-            shader->limits.label = 0;
             break;
 
         /* FIXME: Temporaries must match D3DPSHADERCAPS2_0.NumTemps. */
         case WINED3D_SHADER_VERSION(2, 0):
-            shader->limits.temporary = 32;
             shader->limits.constant_float = 32;
             shader->limits.constant_int = 16;
             shader->limits.constant_bool = 16;
-            shader->limits.texcoord = 8;
             shader->limits.sampler = 16;
             shader->limits.packed_input = 0;
             break;
 
         case WINED3D_SHADER_VERSION(2, 1):
-            shader->limits.temporary = 32;
             shader->limits.constant_float = 32;
             shader->limits.constant_int = 16;
             shader->limits.constant_bool = 16;
-            shader->limits.texcoord = 8;
             shader->limits.sampler = 16;
             shader->limits.packed_input = 0;
-            shader->limits.label = 16;
             break;
 
         case WINED3D_SHADER_VERSION(3, 0):
-            shader->limits.temporary = 32;
             shader->limits.constant_float = 224;
             shader->limits.constant_int = 16;
             shader->limits.constant_bool = 16;
-            shader->limits.texcoord = 0;
             shader->limits.sampler = 16;
             shader->limits.packed_input = 12;
-            shader->limits.label = 16; /* FIXME: 2048 */
             break;
 
         case WINED3D_SHADER_VERSION(4, 0):
-            shader->limits.temporary = 32; /* FIXME: 4096 */
-            shader->limits.texcoord = 0;
             shader->limits.sampler = 16; /* FIXME: 128 resources, 16 sampler states */
             shader->limits.constant_int = 0;
             shader->limits.constant_float = 0;
             shader->limits.constant_bool = 0;
-            shader->limits.address = 1;
             shader->limits.packed_input = 32;
-            shader->limits.label = 16;
             break;
 
         default:
-            shader->limits.temporary = 32;
             shader->limits.constant_float = 32;
             shader->limits.constant_int = 16;
             shader->limits.constant_bool = 16;
-            shader->limits.texcoord = 8;
             shader->limits.sampler = 16;
             shader->limits.packed_input = 0;
-            shader->limits.label = 0;
             FIXME("Unrecognized pixel shader version %u.%u\n",
                     shader->reg_maps.shader_version.major,
                     shader->reg_maps.shader_version.minor);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b5f0f4d..09dbb83 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2553,17 +2553,12 @@ struct wined3d_shader_lconst
 
 struct wined3d_shader_limits
 {
-    unsigned int temporary;
-    unsigned int texcoord;
     unsigned int sampler;
     unsigned int constant_int;
     unsigned int constant_float;
     unsigned int constant_bool;
-    unsigned int address;
     unsigned int packed_output;
     unsigned int packed_input;
-    unsigned int attributes;
-    unsigned int label;
 };
 
 #ifdef __GNUC__




More information about the wine-cvs mailing list