Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
tex_dds.cpp File Reference
#include "precompiled.h"
#include "lib/byte_order.h"
#include "lib/bits.h"
#include "lib/timer.h"
#include "lib/allocators/shared_ptr.h"
#include "tex_codec.h"
Include dependency graph for tex_dds.cpp:

Classes

class  S3tcBlock
 
struct  S3tcDecompressInfo
 
struct  DDS_PIXELFORMAT
 
struct  DDS_HEADER
 

Macros

#define DDPF_ALPHAPIXELS   0x00000001
 
#define DDPF_ALPHA   0x00000002
 
#define DDPF_FOURCC   0x00000004
 
#define DDPF_RGB   0x00000040
 
#define DDSD_CAPS   0x00000001
 
#define DDSD_HEIGHT   0x00000002
 
#define DDSD_WIDTH   0x00000004
 
#define DDSD_PITCH   0x00000008
 
#define DDSD_PIXELFORMAT   0x00001000
 
#define DDSD_MIPMAPCOUNT   0x00020000
 
#define DDSD_LINEARSIZE   0x00080000
 
#define DDSD_DEPTH   0x00800000
 
#define DDSCAPS_MIPMAP   0x00400000
 
#define DDSCAPS_TEXTURE   0x00001000
 

Functions

static void s3tc_decompress_level (size_t level, size_t level_w, size_t level_h, const u8 *RESTRICT level_data, size_t level_data_size, void *RESTRICT cbData)
 
static Status s3tc_decompress (Tex *t)
 
static bool is_valid_dxt (size_t dxt)
 
static Status decode_pf (const DDS_PIXELFORMAT *pf, size_t &bpp, size_t &flags)
 
static Status decode_sd (const DDS_HEADER *sd, size_t &w, size_t &h, size_t &bpp, size_t &flags)
 
 TIMER_ADD_CLIENT (tc_dds_transform)
 

Macro Definition Documentation

◆ DDPF_ALPHA

#define DDPF_ALPHA   0x00000002

◆ DDPF_ALPHAPIXELS

#define DDPF_ALPHAPIXELS   0x00000001

◆ DDPF_FOURCC

#define DDPF_FOURCC   0x00000004

◆ DDPF_RGB

#define DDPF_RGB   0x00000040

◆ DDSCAPS_MIPMAP

#define DDSCAPS_MIPMAP   0x00400000

◆ DDSCAPS_TEXTURE

#define DDSCAPS_TEXTURE   0x00001000

◆ DDSD_CAPS

#define DDSD_CAPS   0x00000001

◆ DDSD_DEPTH

#define DDSD_DEPTH   0x00800000

◆ DDSD_HEIGHT

#define DDSD_HEIGHT   0x00000002

◆ DDSD_LINEARSIZE

#define DDSD_LINEARSIZE   0x00080000

◆ DDSD_MIPMAPCOUNT

#define DDSD_MIPMAPCOUNT   0x00020000

◆ DDSD_PITCH

#define DDSD_PITCH   0x00000008

◆ DDSD_PIXELFORMAT

#define DDSD_PIXELFORMAT   0x00001000

◆ DDSD_WIDTH

#define DDSD_WIDTH   0x00000004

Function Documentation

◆ decode_pf()

static Status decode_pf ( const DDS_PIXELFORMAT pf,
size_t &  bpp,
size_t &  flags 
)
static

◆ decode_sd()

static Status decode_sd ( const DDS_HEADER sd,
size_t &  w,
size_t &  h,
size_t &  bpp,
size_t &  flags 
)
static

◆ is_valid_dxt()

static bool is_valid_dxt ( size_t  dxt)
static

◆ s3tc_decompress()

static Status s3tc_decompress ( Tex t)
static

◆ s3tc_decompress_level()

static void s3tc_decompress_level ( size_t  level,
size_t  level_w,
size_t  level_h,
const u8 *RESTRICT  level_data,
size_t  level_data_size,
void *RESTRICT  cbData 
)
static

◆ TIMER_ADD_CLIENT()

TIMER_ADD_CLIENT ( tc_dds_transform  )