#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;
/*
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);
slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16);
- util_format_s3tc_init();
-
return pscreen;
fail:
i915_debug_init(is);
- util_format_s3tc_init();
-
return &is->base;
}
}
(void) mtx_init(&screen->rast_mutex, mtx_plain);
- util_format_s3tc_init();
-
return &screen->base;
}
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
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 |
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;
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);
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);
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);
swr_fence_init(&screen->base);
- util_format_s3tc_init();
-
swr_validate_env_options(screen);
return &screen->base;
slab_create_parent(&screen->texture_transfer_pool, sizeof(struct virgl_transfer), 16);
- util_format_s3tc_init();
return &screen->base;
}
{
boolean success;
- util_format_s3tc_init();
-
success = test_all();
return success ? 0 : 1;