[Mesa-dev] [PATCH 7/8] intel: Mark some file-local code as static.
Eric Anholt
eric at anholt.net
Fri Sep 21 03:11:45 PDT 2012
---
src/mesa/drivers/dri/i965/brw_shader.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_state.h | 5 -----
src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +-
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 2 +-
src/mesa/drivers/dri/intel/intel_batchbuffer.c | 5 ++++-
src/mesa/drivers/dri/intel/intel_batchbuffer.h | 1 -
src/mesa/drivers/dri/intel/intel_fbo.c | 2 +-
src/mesa/drivers/dri/intel/intel_fbo.h | 6 ------
src/mesa/drivers/dri/intel/intel_screen.c | 2 +-
9 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 1b509c0..54545c0 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -62,7 +62,7 @@ brw_new_shader_program(struct gl_context *ctx, GLuint name)
* what non-orthogonal state will be set, in the hope that it reflects
* the eventual NOS used, and thus allows us to produce link failures.
*/
-bool
+static bool
brw_shader_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
{
struct brw_context *brw = brw_context(ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 99fa088..bd0f0c8 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -215,11 +215,6 @@ void gen7_set_surface_mcs_info(struct brw_context *brw,
void gen7_check_surface_setup(struct gen7_surface_state *surf,
bool is_render_target);
void gen7_init_vtable_surface_functions(struct brw_context *brw);
-void gen7_create_constant_surface(struct brw_context *brw,
- drm_intel_bo *bo,
- uint32_t offset,
- int width,
- uint32_t *out_offset);
/* brw_wm_sampler_state.c */
uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest);
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index ec0f765..5b3930a 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -179,7 +179,7 @@ static const struct brw_tracked_state *gen6_atoms[] =
&brw_vertices,
};
-const struct brw_tracked_state *gen7_atoms[] =
+static const struct brw_tracked_state *gen7_atoms[] =
{
&brw_wm_input_sizes,
&brw_vs_prog,
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index 97ae0e2..ae0c6c3 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -363,7 +363,7 @@ gen7_update_texture_surface(struct gl_context *ctx,
* Create the constant buffer surface. Vertex/fragment shader constants will
* be read from this buffer with Data Port Read instructions/messages.
*/
-void
+static void
gen7_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
uint32_t offset,
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index 06cbaec..d36dacc 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -32,6 +32,9 @@
#include "intel_bufmgr.h"
#include "intel_buffers.h"
+static void
+intel_batchbuffer_reset(struct intel_context *intel);
+
struct cached_batch_item {
struct cached_batch_item *next;
uint16_t header;
@@ -67,7 +70,7 @@ intel_batchbuffer_init(struct intel_context *intel)
}
}
-void
+static void
intel_batchbuffer_reset(struct intel_context *intel)
{
if (intel->batch.last_bo != NULL) {
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index b8b60cd..bae6555 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -26,7 +26,6 @@ extern "C" {
struct intel_batchbuffer;
void intel_batchbuffer_init(struct intel_context *intel);
-void intel_batchbuffer_reset(struct intel_context *intel);
void intel_batchbuffer_free(struct intel_context *intel);
void intel_batchbuffer_save_state(struct intel_context *intel);
void intel_batchbuffer_reset_to_saved(struct intel_context *intel);
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index ca9aa03..feac702 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -220,7 +220,7 @@ intel_quantize_num_samples(struct intel_screen *intel, unsigned num_samples)
* Called via glRenderbufferStorageEXT() to set the format and allocate
* storage for a user-created renderbuffer.
*/
-GLboolean
+static GLboolean
intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 6574f0f..3db80de 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -140,12 +140,6 @@ intel_create_wrapped_renderbuffer(struct gl_context * ctx,
int width, int height,
gl_format format);
-GLboolean
-intel_alloc_renderbuffer_storage(struct gl_context * ctx,
- struct gl_renderbuffer *rb,
- GLenum internalFormat,
- GLuint width, GLuint height);
-
extern void
intel_fbo_init(struct intel_context *intel);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index e3a442c..50959b7 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -190,7 +190,7 @@ static const struct __DRI2flushExtensionRec intelFlushExtension = {
dri2InvalidateDrawable,
};
-struct intel_image_format intel_image_formats[] = {
+static struct intel_image_format intel_image_formats[] = {
{ __DRI_IMAGE_FOURCC_ARGB8888, __DRI_IMAGE_COMPONENTS_RGBA, 1,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB8888, 4 } } },
--
1.7.10.4
More information about the mesa-dev
mailing list