summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_format_s3tc.c79
-rw-r--r--src/gallium/auxiliary/util/u_format_s3tc.h4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c2
-rw-r--r--src/gallium/drivers/i915/i915_screen.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_format.c2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c2
-rw-r--r--src/gallium/drivers/r300/r300_screen.c1
-rw-r--r--src/gallium/drivers/r600/r600_pipe_common.c1
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c1
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c2
-rw-r--r--src/gallium/drivers/swr/swr_screen.cpp2
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c1
-rw-r--r--src/gallium/tests/unit/u_format_test.c2
14 files changed, 5 insertions, 98 deletions
diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c
index 031255f2b3f..3f755e53636 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -31,81 +31,12 @@
#include "../../../mesa/main/texcompress_s3tc_tmp.h"
-static void
-util_format_dxt1_rgb_fetch_stub(int src_stride,
- const uint8_t *src,
- int col, int row,
- uint8_t *dst)
-{
- assert(0);
-}
-
-
-static void
-util_format_dxt1_rgba_fetch_stub(int src_stride,
- const uint8_t *src,
- int col, int row,
- uint8_t *dst )
-{
- assert(0);
-}
-
-
-static void
-util_format_dxt3_rgba_fetch_stub(int src_stride,
- const uint8_t *src,
- int col, int row,
- uint8_t *dst )
-{
- assert(0);
-}
-
-
-static void
-util_format_dxt5_rgba_fetch_stub(int src_stride,
- const uint8_t *src,
- int col, int row,
- uint8_t *dst )
-{
- assert(0);
-}
+util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgb_dxt1;
+util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt1;
+util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt3;
+util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
-
-static void
-util_format_dxtn_pack_stub(int src_comps,
- int width, int height,
- const uint8_t *src,
- enum util_format_dxtn dst_format,
- uint8_t *dst,
- int dst_stride)
-{
- assert(0);
-}
-
-
-util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch = util_format_dxt1_rgb_fetch_stub;
-util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch = util_format_dxt1_rgba_fetch_stub;
-util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch = util_format_dxt3_rgba_fetch_stub;
-util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch = util_format_dxt5_rgba_fetch_stub;
-
-util_format_dxtn_pack_t util_format_dxtn_pack = util_format_dxtn_pack_stub;
-
-
-void
-util_format_s3tc_init(void)
-{
- static boolean first_time = TRUE;
-
- if (!first_time)
- return;
- first_time = FALSE;
-
- util_format_dxt1_rgb_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgb_dxt1;
- util_format_dxt1_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt1;
- util_format_dxt3_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt3;
- util_format_dxt5_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5;
- util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
-}
+util_format_dxtn_pack_t util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn;
/*
diff --git a/src/gallium/auxiliary/util/u_format_s3tc.h b/src/gallium/auxiliary/util/u_format_s3tc.h
index 42e62bdbb26..6f188c67f95 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.h
+++ b/src/gallium/auxiliary/util/u_format_s3tc.h
@@ -67,10 +67,6 @@ extern util_format_dxtn_pack_t util_format_dxtn_pack;
void
-util_format_s3tc_init(void);
-
-
-void
util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 040c2c99ec0..e8d84f47766 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -884,8 +884,6 @@ fd_screen_create(struct fd_device *dev)
slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16);
- util_format_s3tc_init();
-
return pscreen;
fail:
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 8411c0f15cc..88e66ba6841 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -628,7 +628,5 @@ i915_screen_create(struct i915_winsys *iws)
i915_debug_init(is);
- util_format_s3tc_init();
-
return &is->base;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 7b694b57551..ab2ba3a19a8 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -682,7 +682,5 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
}
(void) mtx_init(&screen->rast_mutex, mtx_plain);
- util_format_s3tc_init();
-
return &screen->base;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index fd79087287e..e9a6e01fdcb 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -357,8 +357,6 @@ test_all(unsigned verbose, FILE *fp)
enum pipe_format format;
boolean success = TRUE;
- util_format_s3tc_init();
-
#if USE_TEXTURE_CACHE
cache_ptr = align_malloc(sizeof(struct lp_build_format_cache), 16);
#endif
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index 13b76d76816..ea68809c6e8 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -242,8 +242,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
nouveau_disk_cache_create(screen);
- util_format_s3tc_init();
-
screen->lowmem_bindings = PIPE_BIND_GLOBAL; /* gallium limit */
screen->vidmem_bindings =
PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL |
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 6d6b5fb74ab..894c0d996b1 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -773,7 +773,6 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws,
slab_create_parent(&r300screen->pool_transfers, sizeof(struct pipe_transfer), 64);
- util_format_s3tc_init();
(void) mtx_init(&r300screen->cmask_mutex, mtx_plain);
return &r300screen->screen;
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c
index 0ab8113dc87..4fbcd3a6572 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.c
+++ b/src/gallium/drivers/r600/r600_pipe_common.c
@@ -1525,7 +1525,6 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
1 << util_logbase2(rscreen->force_aniso));
}
- util_format_s3tc_init();
(void) mtx_init(&rscreen->aux_context_lock, mtx_plain);
(void) mtx_init(&rscreen->gpu_load_mutex, mtx_plain);
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 1aceb5b7559..495878bed9c 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1493,7 +1493,6 @@ bool si_common_screen_init(struct r600_common_screen *rscreen,
1 << util_logbase2(rscreen->force_aniso));
}
- util_format_s3tc_init();
(void) mtx_init(&rscreen->aux_context_lock, mtx_plain);
(void) mtx_init(&rscreen->gpu_load_mutex, mtx_plain);
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 50eefe65af7..93fc76054ca 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -586,8 +586,6 @@ softpipe_create_screen(struct sw_winsys *winsys)
screen->base.get_compute_param = softpipe_get_compute_param;
screen->use_llvm = debug_get_option_use_llvm();
- util_format_s3tc_init();
-
softpipe_init_screen_texture_funcs(&screen->base);
softpipe_init_screen_fence_funcs(&screen->base);
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index 3ae56f52d5f..df23e354f48 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -1142,8 +1142,6 @@ swr_create_screen_internal(struct sw_winsys *winsys)
swr_fence_init(&screen->base);
- util_format_s3tc_init();
-
swr_validate_env_options(screen);
return &screen->base;
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index f2636aac382..ecdd4758120 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -613,6 +613,5 @@ virgl_create_screen(struct virgl_winsys *vws)
slab_create_parent(&screen->texture_transfer_pool, sizeof(struct virgl_transfer), 16);
- util_format_s3tc_init();
return &screen->base;
}
diff --git a/src/gallium/tests/unit/u_format_test.c b/src/gallium/tests/unit/u_format_test.c
index 2152b227f6a..6de581fd049 100644
--- a/src/gallium/tests/unit/u_format_test.c
+++ b/src/gallium/tests/unit/u_format_test.c
@@ -753,8 +753,6 @@ int main(int argc, char **argv)
{
boolean success;
- util_format_s3tc_init();
-
success = test_all();
return success ? 0 : 1;