summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKrzesimir Nowak <[email protected]>2015-09-11 20:07:39 +0200
committerBrian Paul <[email protected]>2015-09-11 15:36:43 -0600
commitea764baa61bec5b4ae15cf0d5928e3643061807d (patch)
treeb406f6325a072d4bf59234a5e8400c4ba02ed8ff /src/gallium
parentba72e6cfb8248ae0d8b3cf5ebf9add7c49f45743 (diff)
softpipe: Constify sampler and view parameters in img filters
Those functions actually could always take them as constants. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c68
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.h4
2 files changed, 36 insertions, 36 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index ba292c4d712..a2f18a4f3fa 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1017,8 +1017,8 @@ print_sample_4(const char *function, float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZ
/* Some image-filter fastpaths:
*/
static inline void
-img_filter_2d_linear_repeat_POT(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_linear_repeat_POT(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1071,8 +1071,8 @@ img_filter_2d_linear_repeat_POT(struct sp_sampler_view *sp_sview,
static inline void
-img_filter_2d_nearest_repeat_POT(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_nearest_repeat_POT(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float rgba[TGSI_QUAD_SIZE])
{
@@ -1105,8 +1105,8 @@ img_filter_2d_nearest_repeat_POT(struct sp_sampler_view *sp_sview,
static inline void
-img_filter_2d_nearest_clamp_POT(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_nearest_clamp_POT(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float rgba[TGSI_QUAD_SIZE])
{
@@ -1147,8 +1147,8 @@ img_filter_2d_nearest_clamp_POT(struct sp_sampler_view *sp_sview,
static void
-img_filter_1d_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_1d_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float rgba[TGSI_QUAD_SIZE])
{
@@ -1179,8 +1179,8 @@ img_filter_1d_nearest(struct sp_sampler_view *sp_sview,
static void
-img_filter_1d_array_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_1d_array_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1213,8 +1213,8 @@ img_filter_1d_array_nearest(struct sp_sampler_view *sp_sview,
static void
-img_filter_2d_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1248,8 +1248,8 @@ img_filter_2d_nearest(struct sp_sampler_view *sp_sview,
static void
-img_filter_2d_array_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_array_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1285,8 +1285,8 @@ img_filter_2d_array_nearest(struct sp_sampler_view *sp_sview,
static void
-img_filter_cube_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_cube_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1330,8 +1330,8 @@ img_filter_cube_nearest(struct sp_sampler_view *sp_sview,
}
static void
-img_filter_cube_array_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_cube_array_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1367,8 +1367,8 @@ img_filter_cube_array_nearest(struct sp_sampler_view *sp_sview,
}
static void
-img_filter_3d_nearest(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_3d_nearest(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1401,8 +1401,8 @@ img_filter_3d_nearest(struct sp_sampler_view *sp_sview,
static void
-img_filter_1d_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_1d_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1433,8 +1433,8 @@ img_filter_1d_linear(struct sp_sampler_view *sp_sview,
static void
-img_filter_1d_array_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_1d_array_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1533,8 +1533,8 @@ get_gather_value(const struct sp_sampler_view *sp_sview,
static void
-img_filter_2d_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1579,8 +1579,8 @@ img_filter_2d_linear(struct sp_sampler_view *sp_sview,
static void
-img_filter_2d_array_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_2d_array_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1627,8 +1627,8 @@ img_filter_2d_array_linear(struct sp_sampler_view *sp_sview,
static void
-img_filter_cube_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_cube_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1695,8 +1695,8 @@ img_filter_cube_linear(struct sp_sampler_view *sp_sview,
static void
-img_filter_cube_array_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_cube_array_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
@@ -1764,8 +1764,8 @@ img_filter_cube_array_linear(struct sp_sampler_view *sp_sview,
}
static void
-img_filter_3d_linear(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+img_filter_3d_linear(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba)
{
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h
index e14e4ac9ce7..e8a0051fe73 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.h
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.h
@@ -64,8 +64,8 @@ struct img_filter_args {
int gather_comp;
};
-typedef void (*img_filter_func)(struct sp_sampler_view *sp_sview,
- struct sp_sampler *sp_samp,
+typedef void (*img_filter_func)(const struct sp_sampler_view *sp_sview,
+ const struct sp_sampler *sp_samp,
const struct img_filter_args *args,
float *rgba);