remove unused ta_texture struct

This commit is contained in:
Anthony Pesch 2017-09-05 00:47:51 -04:00
parent 9a26de43a8
commit 6040ef924d
4 changed files with 6 additions and 19 deletions

View File

@ -12,24 +12,11 @@
DEFINE_AGGREGATE_COUNTER(ta_data);
DEFINE_AGGREGATE_COUNTER(ta_renders);
#define TA_MAX_CONTEXTS 8
#define TA_YUV420_MACROBLOCK_SIZE 384
#define TA_YUV422_MACROBLOCK_SIZE 512
#define TA_MAX_MACROBLOCK_SIZE \
MAX(TA_YUV420_MACROBLOCK_SIZE, TA_YUV422_MACROBLOCK_SIZE)
struct ta_texture {
struct tr_texture;
struct ta *ta;
struct list_node free_it;
struct rb_node live_it;
struct memory_watch *texture_watch;
struct memory_watch *palette_watch;
struct list_node invalid_it;
int invalidated;
};
struct ta {
struct device;
uint8_t *video_ram;
@ -42,7 +29,7 @@ struct ta {
int yuv_macroblock_count;
/* tile context pool */
struct tile_context contexts[TA_MAX_CONTEXTS];
struct tile_context contexts[8];
struct list free_contexts;
struct list live_contexts;
struct tile_context *curr_context;

View File

@ -4,6 +4,7 @@
#include "core/profiler.h"
#include "guest/memory.h"
#include "guest/pvr/ta_types.h"
#include "guest/pvr/tex.h"
struct dreamcast;
struct ta;
@ -13,8 +14,6 @@ DECLARE_COUNTER(ta_renders);
AM_DECLARE(ta_fifo_map);
#define TA_CODEBOOK_SIZE (256 * 8)
extern int g_param_sizes[0x100 * TA_NUM_PARAMS * TA_NUM_VERTS];
extern int g_poly_types[0x100 * TA_NUM_PARAMS * TA_NUM_LISTS];
extern int g_vertex_types[0x100 * TA_NUM_PARAMS * TA_NUM_LISTS];
@ -92,7 +91,7 @@ static inline int ta_texture_size(union tsp tsp, union tcw tcw) {
int bpp = ta_texture_bpp(tcw);
int texture_size = 0;
if (compressed) {
texture_size += TA_CODEBOOK_SIZE;
texture_size += PVR_CODEBOOK_SIZE;
}
int min_width = mipmaps ? 1 : width;
for (int i = width; i >= min_width; i /= 2) {

View File

@ -1,6 +1,5 @@
#include "guest/pvr/tex.h"
#include "core/assert.h"
#include "guest/pvr/ta.h"
#include "render/render_backend.h"
/*
@ -583,7 +582,7 @@ void pvr_tex_decode(const uint8_t *src, int width, int height, int stride,
/* used by vq compressed textures */
const uint8_t *codebook = src;
const uint8_t *index = src + TA_CODEBOOK_SIZE;
const uint8_t *index = src + PVR_CODEBOOK_SIZE;
/* mipmap textures contain data for 1 x 1 up to width x height. skip to the
highest res and let the renderer backend generate its own mipmaps */

View File

@ -3,6 +3,8 @@
#include <stdint.h>
#define PVR_CODEBOOK_SIZE (256 * 8)
enum pvr_texture_fmt {
PVR_TEX_INVALID = 0x0,
PVR_TEX_TWIDDLED = 0x1,