[PATCH 2/2] wined3d: Remove the unused idx_data parameter from draw_primitive

Stefan Dösinger stefan at codeweavers.com
Wed Apr 10 06:39:46 CDT 2013


---
 dlls/wined3d/device.c          | 6 +++---
 dlls/wined3d/drawprim.c        | 3 ++-
 dlls/wined3d/wined3d_private.h | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e4b970c..aa62358 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4019,7 +4019,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
 
     /* Account for the loading offset due to index buffers. Instead of
      * reloading all sources correct it with the startvertex parameter. */
-    draw_primitive(device, start_vertex, vertex_count, 0, 0, FALSE, NULL);
+    draw_primitive(device, start_vertex, vertex_count, 0, 0, FALSE);
     return WINED3D_OK;
 }
 
@@ -4052,7 +4052,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
         device_invalidate_state(device, STATE_BASEVERTEXINDEX);
     }
 
-    draw_primitive(device, start_idx, index_count, 0, 0, TRUE, NULL);
+    draw_primitive(device, start_idx, index_count, 0, 0, TRUE);
 
     return WINED3D_OK;
 }
@@ -4062,7 +4062,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
 {
     TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count);
 
-    draw_primitive(device, start_idx, index_count, start_instance, instance_count, TRUE, NULL);
+    draw_primitive(device, start_idx, index_count, start_instance, instance_count, TRUE);
 }
 
 /* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 5fe1ac5..14cb18f 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -577,7 +577,7 @@ static void remove_vbos(const struct wined3d_gl_info *gl_info,
 
 /* Routine common to the draw primitive and draw indexed primitive routines */
 void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count,
-        UINT start_instance, UINT instance_count, BOOL indexed, const void *idx_data)
+        UINT start_instance, UINT instance_count, BOOL indexed)
 {
     const struct wined3d_state *state = &device->stateBlock->state;
     const struct wined3d_stream_info *stream_info;
@@ -586,6 +586,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
     const struct wined3d_gl_info *gl_info;
     struct wined3d_context *context;
     BOOL emulation = FALSE;
+    const void *idx_data = NULL;
     UINT idx_size = 0;
     unsigned int i;
 
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9a92e46..c13fcb0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -927,7 +927,7 @@ struct wined3d_stream_info
 };
 
 void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count,
-        UINT start_instance, UINT instance_count, BOOL indexed, const void *idx_data) DECLSPEC_HIDDEN;
+        UINT start_instance, UINT instance_count, BOOL indexed) DECLSPEC_HIDDEN;
 DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
 
 typedef void (WINE_GLAPI *glAttribFunc)(const void *data);
-- 
1.8.1.5




More information about the wine-patches mailing list