wined3d: Make some functions static.

Francois Gouget fgouget at free.fr
Sat Jan 7 07:39:55 CST 2017


Signed-off-by: Francois Gouget <fgouget at free.fr>
---

Should they be needed elsewhere later on adding them to the appropriate 
header is easy. In the meantime making them static ensures they won't 
become dead code should they be superseded by some other functions at 
some point.


 dlls/wined3d/buffer.c          | 4 ++--
 dlls/wined3d/texture.c         | 2 +-
 dlls/wined3d/wined3d_private.h | 5 -----
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index d326a7033b8..6883b4010a0 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -94,7 +94,7 @@ static BOOL buffer_is_fully_dirty(const struct wined3d_buffer *buffer)
             && !buffer->maps->offset && buffer->maps->size == buffer->resource.size;
 }
 
-void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, DWORD location)
+static void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, DWORD location)
 {
     TRACE("buffer %p, location %s.\n", buffer, wined3d_debug_location(location));
 
@@ -567,7 +567,7 @@ static BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer,
     }
 }
 
-BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
+static BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
         struct wined3d_context *context, DWORD location)
 {
     const struct wined3d_gl_info *gl_info = context->gl_info;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index a24a49273ac..da003e15b33 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1390,7 +1390,7 @@ void CDECL wined3d_texture_generate_mipmaps(struct wined3d_texture *texture)
     FIXME("texture %p stub!\n", texture);
 }
 
-struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
+static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
         unsigned int sub_resource_idx)
 {
     UINT sub_count = texture->level_count * texture->layer_count;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 09fbb7023fe..e1787a20fe9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2852,8 +2852,6 @@ BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
 GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
 void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
         struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN;
-struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
-        unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
 void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
         unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
 void wined3d_texture_load(struct wined3d_texture *texture,
@@ -3253,14 +3251,11 @@ DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer,
 void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, DWORD location) DECLSPEC_HIDDEN;
 void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context,
         const struct wined3d_state *state) DECLSPEC_HIDDEN;
-BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context,
-        DWORD location) DECLSPEC_HIDDEN;
 BYTE *wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
 HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
         struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
 HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
         const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
-void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, DWORD location) DECLSPEC_HIDDEN;
 
 struct wined3d_rendertarget_view
 {
-- 
2.11.0




More information about the wine-patches mailing list