'main/texcompress.h',
'main/texcompress_astc.cpp',
'main/texcompress_astc.h',
- 'main/texcompress_astc_luts.cpp',
- 'main/texcompress_astc_luts.h',
- 'main/texcompress_astc_luts_wrap.cpp',
- 'main/texcompress_astc_luts_wrap.h',
'main/texcompress_bptc.c',
'main/texcompress_bptc.h',
'main/texcompress_cpal.c',
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "main/texcompress_astc.h"
-#include "main/texcompress_astc_luts_wrap.h"
+#include "util/texcompress_astc_luts_wrap.h"
#include "main/uniforms.h"
#include "state_tracker/st_atom_constbuf.h"
unsigned block_w,
unsigned block_h)
{
+ unsigned lut_width;
+ unsigned lut_height;
struct pipe_box ptable_box;
void *ptable_data =
- _mesa_get_astc_decoder_partition_table(block_w, block_h, &ptable_box);
+ _mesa_get_astc_decoder_partition_table(block_w, block_h, &lut_width, &lut_height);
+ u_box_origin_2d(lut_width, lut_height, &ptable_box);
struct pipe_sampler_view *view =
util_hash_table_get(st->texcompress_compute.astc_partition_tables,
'strndup.h',
'strtod.c',
'strtod.h',
+ 'texcompress_astc_luts.cpp',
+ 'texcompress_astc_luts.h',
+ 'texcompress_astc_luts_wrap.cpp',
+ 'texcompress_astc_luts_wrap.h',
'timespec.h',
'u_atomic.c',
'u_atomic.h',
#include "texcompress_astc_luts_wrap.h"
#include "texcompress_astc_luts.h"
-#include "util/u_box.h"
-
extern "C" void
_mesa_init_astc_decoder_luts(astc_decoder_lut_holder *holder)
{
extern "C" void *
_mesa_get_astc_decoder_partition_table(uint32_t block_width,
uint32_t block_height,
- struct pipe_box *ptable_box)
+ unsigned *lut_width,
+ unsigned *lut_height)
{
auto &luts = Granite::get_astc_luts();
auto &table = luts.get_partition_table(block_width, block_height);
- u_box_origin_2d(table.lut_width, table.lut_height, ptable_box);
-
+ *lut_width = table.lut_width;
+ *lut_height = table.lut_height;
return table.lut_buffer.data();
}
#define TEXCOMPRESS_ASTC_LUTS_WRAP_H
#include <stdint.h>
-#include "pipe/p_state.h"
+#include <stddef.h>
+#include "format/u_formats.h"
/* C wrapper for Granite::ASTCLutHolder. */
extern "C" {
#endif
-struct pipe_box;
-
typedef struct
{
void *data;
void _mesa_init_astc_decoder_luts(astc_decoder_lut_holder *holder);
void *_mesa_get_astc_decoder_partition_table(uint32_t block_width,
uint32_t block_height,
- struct pipe_box *ptable_box);
+ unsigned *lut_width,
+ unsigned *lut_height);
#ifdef __cplusplus
}