* This might only be used by software drivers for the time being.
*/
void
-draw_texture_samplers(struct draw_context *draw,
- uint shader,
- uint num_samplers,
- struct tgsi_sampler **samplers)
+draw_texture_sampler(struct draw_context *draw,
+ uint shader,
+ struct tgsi_sampler *sampler)
{
if (shader == PIPE_SHADER_VERTEX) {
- draw->vs.tgsi.num_samplers = num_samplers;
- draw->vs.tgsi.samplers = samplers;
+ draw->vs.tgsi.sampler = sampler;
} else {
debug_assert(shader == PIPE_SHADER_GEOMETRY);
- draw->gs.tgsi.num_samplers = num_samplers;
- draw->gs.tgsi.samplers = samplers;
+ draw->gs.tgsi.sampler = sampler;
}
}
void
-draw_texture_samplers(struct draw_context *draw,
- uint shader_type,
- uint num_samplers,
- struct tgsi_sampler **samplers);
+draw_texture_sampler(struct draw_context *draw,
+ uint shader_type,
+ struct tgsi_sampler *sampler);
void
draw_set_sampler_views(struct draw_context *draw,
if (shader && shader->machine->Tokens != shader->state.tokens) {
tgsi_exec_machine_bind_shader(shader->machine,
shader->state.tokens,
- draw->gs.tgsi.num_samplers,
- draw->gs.tgsi.samplers);
+ draw->gs.tgsi.sampler);
}
}
struct {
struct tgsi_exec_machine *machine;
- struct tgsi_sampler **samplers;
- uint num_samplers;
+ struct tgsi_sampler *sampler;
} tgsi;
struct translate *fetch;
struct {
struct tgsi_exec_machine *machine;
- struct tgsi_sampler **samplers;
- uint num_samplers;
+ struct tgsi_sampler *sampler;
} tgsi;
} gs;
if (evs->machine->Tokens != shader->state.tokens) {
tgsi_exec_machine_bind_shader(evs->machine,
shader->state.tokens,
- draw->vs.tgsi.num_samplers,
- draw->vs.tgsi.samplers);
+ draw->vs.tgsi.sampler);
}
}
tgsi_exec_machine_bind_shader(
struct tgsi_exec_machine *mach,
const struct tgsi_token *tokens,
- uint numSamplers,
- struct tgsi_sampler **samplers)
+ struct tgsi_sampler *sampler)
{
uint k;
struct tgsi_parse_context parse;
util_init_math();
- if (numSamplers) {
- assert(samplers);
- }
mach->Tokens = tokens;
- mach->Samplers = samplers;
+ mach->Sampler = sampler;
if (!tokens) {
/* unbind and free all */
*/
static void
fetch_texel( struct tgsi_sampler *sampler,
+ const unsigned sview_idx,
+ const unsigned sampler_idx,
const union tgsi_exec_channel *s,
const union tgsi_exec_channel *t,
const union tgsi_exec_channel *p,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
/* FIXME: handle explicit derivs, offsets */
- sampler->get_samples(sampler, s->f, t->f, p->f, c0->f, c1->f, control, rgba);
+ sampler->get_samples(sampler, sview_idx, sampler_idx,
+ s->f, t->f, p->f, c0->f, c1->f, control, rgba);
for (j = 0; j < 4; j++) {
r->f[j] = rgba[0][j];
micro_div(&r[0], &r[0], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
micro_div(&r[0], &r[0], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &ZeroVec, &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
micro_div(&r[2], &r[2], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
micro_div(&r[0], &r[0], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
micro_div(&r[0], &r[0], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
micro_div(&r[1], &r[1], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
FETCH(&r[2], 0, TGSI_CHAN_Z);
FETCH(&r[3], 0, TGSI_CHAN_W);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
else
cubelod = ZeroVec;
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &cubelod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
micro_div(&r[2], &r[2], &r[3]);
}
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, lod,
control,
&r[0], &r[1], &r[2], &r[3]);
FETCH(&cubearraycomp, 1, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &cubearraycomp, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
FETCH(&r[0], 0, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
FETCH(&r[1], 0, TGSI_CHAN_Y);
FETCH(&r[2], 0, TGSI_CHAN_Z);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* inputs */
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
FETCH(&r[1], 0, TGSI_CHAN_Y);
FETCH(&r[2], 0, TGSI_CHAN_Z);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec,
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]);
FETCH(&r[2], 0, TGSI_CHAN_Z);
FETCH(&r[3], 0, TGSI_CHAN_W);
- fetch_texel(mach->Samplers[unit],
+ fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec,
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]);
exec_txf(struct tgsi_exec_machine *mach,
const struct tgsi_full_instruction *inst)
{
- struct tgsi_sampler *sampler;
const uint unit = inst->Src[2].Register.Index;
union tgsi_exec_channel r[4];
union tgsi_exec_channel offset[3];
break;
}
- sampler = mach->Samplers[unit];
- sampler->get_texel(sampler, r[0].i, r[1].i, r[2].i, r[3].i,
- offsets, rgba);
+ mach->Sampler->get_texel(mach->Sampler, unit, r[0].i, r[1].i, r[2].i, r[3].i,
+ offsets, rgba);
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
r[0].f[j] = rgba[0][j];
exec_txq(struct tgsi_exec_machine *mach,
const struct tgsi_full_instruction *inst)
{
- struct tgsi_sampler *sampler;
const uint unit = inst->Src[1].Register.Index;
int result[4];
union tgsi_exec_channel r[4], src;
int i,j;
fetch_source(mach, &src, &inst->Src[0], TGSI_CHAN_X, TGSI_EXEC_DATA_INT);
- sampler = mach->Samplers[unit];
- sampler->get_dims(sampler, src.i[0], result);
+ mach->Sampler->get_dims(mach->Sampler, unit, src.i[0], result);
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
for (j = 0; j < 4; j++) {
- r[j].i[i] = result[j];
+ r[j].i[i] = result[j];
}
}
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
- store_dest(mach, &r[chan], &inst->Dst[0], inst, chan,
- TGSI_EXEC_DATA_INT);
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan,
+ TGSI_EXEC_DATA_INT);
}
}
}
case TGSI_TEXTURE_1D:
if (compare) {
FETCH(&r[2], 3, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &ZeroVec, &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
}
else {
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
FETCH(&r[1], 0, TGSI_CHAN_Y);
if (compare) {
FETCH(&r[2], 3, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
}
else {
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &ZeroVec, &ZeroVec, lod, /* S, T, P, C, LOD */
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
FETCH(&r[2], 0, TGSI_CHAN_Z);
if(compare) {
FETCH(&r[3], 3, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &r[3], lod,
control,
&r[0], &r[1], &r[2], &r[3]);
}
else {
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &ZeroVec, lod,
control,
&r[0], &r[1], &r[2], &r[3]);
FETCH(&r[3], 0, TGSI_CHAN_W);
if(compare) {
FETCH(&r[4], 3, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &r[3], &r[4],
control,
&r[0], &r[1], &r[2], &r[3]);
}
else {
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &r[3], lod,
control,
&r[0], &r[1], &r[2], &r[3]);
case TGSI_TEXTURE_1D:
FETCH(&r[0], 0, TGSI_CHAN_X);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
FETCH(&r[0], 0, TGSI_CHAN_X);
FETCH(&r[1], 0, TGSI_CHAN_Y);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* inputs */
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
FETCH(&r[1], 0, TGSI_CHAN_Y);
FETCH(&r[2], 0, TGSI_CHAN_Z);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec,
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]);
FETCH(&r[2], 0, TGSI_CHAN_Z);
FETCH(&r[3], 0, TGSI_CHAN_W);
- fetch_texel(mach->Samplers[sampler_unit],
+ fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec,
tgsi_sampler_lod_none,
&r[0], &r[1], &r[2], &r[3]);
* lod - lod value, except for shadow cube arrays (compare value there).
*/
void (*get_samples)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ const unsigned sampler_index,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float r[TGSI_QUAD_SIZE],
const float c1[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
- void (*get_dims)(struct tgsi_sampler *sampler, int level,
- int dims[4]);
- void (*get_texel)(struct tgsi_sampler *sampler, const int i[TGSI_QUAD_SIZE],
- const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
- const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
- float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+ void (*get_dims)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ int level, int dims[4]);
+ void (*get_texel)(struct tgsi_sampler *sampler,
+ const unsigned sview_index,
+ const int i[TGSI_QUAD_SIZE],
+ const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
+ const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
};
#define TGSI_EXEC_NUM_TEMPS 4096
struct tgsi_exec_vector *Addrs;
struct tgsi_exec_vector *Predicates;
- struct tgsi_sampler **Samplers;
+ struct tgsi_sampler *Sampler;
unsigned ImmLimit;
tgsi_exec_machine_bind_shader(
struct tgsi_exec_machine *mach,
const struct tgsi_token *tokens,
- uint numSamplers,
- struct tgsi_sampler **samplers);
+ struct tgsi_sampler *sampler);
uint
tgsi_exec_machine_run(
#include "sp_texture.h"
#include "sp_query.h"
#include "sp_screen.h"
+#include "sp_tex_sample.h"
static void
tgsi_exec_machine_destroy(softpipe->fs_machine);
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ FREE(softpipe->tgsi.sampler[i]);
+ }
+
FREE( softpipe );
}
util_init_math();
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ softpipe->tgsi.sampler[i] = sp_create_tgsi_sampler();
+ }
+
softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE );
if (!softpipe->draw)
goto fail;
- draw_texture_samplers(softpipe->draw,
- PIPE_SHADER_VERTEX,
- PIPE_MAX_SAMPLERS,
- (struct tgsi_sampler **)
- softpipe->tgsi.samplers_list[PIPE_SHADER_VERTEX]);
-
- draw_texture_samplers(softpipe->draw,
- PIPE_SHADER_GEOMETRY,
- PIPE_MAX_SAMPLERS,
- (struct tgsi_sampler **)
- softpipe->tgsi.samplers_list[PIPE_SHADER_GEOMETRY]);
+ draw_texture_sampler(softpipe->draw,
+ PIPE_SHADER_VERTEX,
+ (struct tgsi_sampler *)
+ softpipe->tgsi.sampler[PIPE_SHADER_VERTEX]);
+
+ draw_texture_sampler(softpipe->draw,
+ PIPE_SHADER_GEOMETRY,
+ (struct tgsi_sampler *)
+ softpipe->tgsi.sampler[PIPE_SHADER_GEOMETRY]);
if (debug_get_bool_option( "SOFTPIPE_NO_RAST", FALSE ))
softpipe->no_rast = TRUE;
/** TGSI exec things */
struct {
- struct sp_sampler_variant *samplers_list[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
+ struct sp_tgsi_sampler *sampler[PIPE_SHADER_TYPES];
} tgsi;
struct tgsi_exec_machine *fs_machine;
static void
exec_prepare( const struct sp_fragment_shader_variant *var,
- struct tgsi_exec_machine *machine,
- struct tgsi_sampler **samplers )
+ struct tgsi_exec_machine *machine,
+ struct tgsi_sampler *sampler )
{
/*
* Bind tokens/shader to the interpreter's machine state.
*/
tgsi_exec_machine_bind_shader(machine,
var->tokens,
- PIPE_MAX_SAMPLERS,
- samplers);
+ sampler);
}
struct tgsi_exec_machine *machine)
{
if (machine->Tokens == var->tokens) {
- tgsi_exec_machine_bind_shader(machine, NULL, 0, NULL);
+ tgsi_exec_machine_bind_shader(machine, NULL, NULL);
}
FREE( (void *) var->tokens );
void (*prepare)(const struct sp_fragment_shader_variant *shader,
struct tgsi_exec_machine *machine,
- struct tgsi_sampler **samplers);
+ struct tgsi_sampler *sampler);
unsigned (*run)(const struct sp_fragment_shader_variant *shader,
struct tgsi_exec_machine *machine,
/* prepare the TGSI interpreter for FS execution */
softpipe->fs_variant->prepare(softpipe->fs_variant,
softpipe->fs_machine,
- (struct tgsi_sampler **) softpipe->
- tgsi.samplers_list[PIPE_SHADER_FRAGMENT]);
+ (struct tgsi_sampler *) softpipe->
+ tgsi.sampler[PIPE_SHADER_FRAGMENT]);
}
else {
softpipe->fs_variant = NULL;
for (i = 0; i <= max_sampler; i++) {
if (softpipe->samplers[shader][i]) {
- softpipe->tgsi.samplers_list[shader][i] =
+ softpipe->tgsi.sampler[shader]->sp_sampler[i] =
get_sampler_variant(i,
sp_sampler(softpipe->samplers[shader][i]),
softpipe->sampler_views[shader][i],
tgsi_shader);
- sp_sampler_variant_bind_view(softpipe->tgsi.samplers_list[shader][i],
+ sp_sampler_variant_bind_view(softpipe->tgsi.sampler[shader]->sp_sampler[i],
softpipe->tex_cache[shader][i],
softpipe->sampler_views[shader][i]);
}
/* Some image-filter fastpaths:
*/
static INLINE void
-img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_linear_repeat_POT(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned xpot = pot_level_size(samp->xpot, level);
unsigned ypot = pot_level_size(samp->ypot, level);
unsigned xmax = (xpot - 1) & (TILE_SIZE - 1); /* MIN2(TILE_SIZE, xpot) - 1; */
static INLINE void
-img_filter_2d_nearest_repeat_POT(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_nearest_repeat_POT(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float rgba[TGSI_QUAD_SIZE])
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned xpot = pot_level_size(samp->xpot, level);
unsigned ypot = pot_level_size(samp->ypot, level);
const float *out;
static INLINE void
-img_filter_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_nearest_clamp_POT(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float rgba[TGSI_QUAD_SIZE])
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned xpot = pot_level_size(samp->xpot, level);
unsigned ypot = pot_level_size(samp->ypot, level);
union tex_tile_address addr;
static void
-img_filter_1d_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_1d_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float rgba[TGSI_QUAD_SIZE])
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width;
int x;
static void
-img_filter_1d_array_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_1d_array_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width;
int x, layer;
static void
-img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x, y;
static void
-img_filter_2d_array_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_array_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x, y, layer;
static void
-img_filter_cube_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_cube_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x, y;
}
static void
-img_filter_cube_array_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_cube_array_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x, y, layer;
}
static void
-img_filter_3d_nearest(struct tgsi_sampler *tgsi_sampler,
+img_filter_3d_nearest(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height, depth;
int x, y, z;
static void
-img_filter_1d_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_1d_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width;
int x0, x1;
static void
-img_filter_1d_array_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_1d_array_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width;
int x0, x1, layer;
static void
-img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x0, y0, x1, y1;
static void
-img_filter_2d_array_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_array_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x0, y0, x1, y1, layer;
static void
-img_filter_cube_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_cube_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x0, y0, x1, y1;
static void
-img_filter_cube_array_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_cube_array_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height;
int x0, y0, x1, y1, layer;
}
static void
-img_filter_3d_linear(struct tgsi_sampler *tgsi_sampler,
+img_filter_3d_linear(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba)
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int width, height, depth;
int x0, x1, y0, y1, z0, z1;
static void
-mip_filter_linear(struct tgsi_sampler *tgsi_sampler,
+mip_filter_linear(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int j;
float lod[TGSI_QUAD_SIZE];
int level0 = samp->view->u.tex.first_level + (int)lod[j];
if (lod[j] < 0.0)
- samp->mag_img_filter(tgsi_sampler, s[j], t[j], p[j], samp->view->u.tex.first_level,
+ samp->mag_img_filter(samp, s[j], t[j], p[j], samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
else if (level0 >= texture->last_level)
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], texture->last_level,
+ samp->min_img_filter(samp, s[j], t[j], p[j], texture->last_level,
samp->faces[j], &rgba[0][j]);
else {
float rgbax[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
int c;
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], level0,
+ samp->min_img_filter(samp, s[j], t[j], p[j], level0,
samp->faces[j], &rgbax[0][0]);
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], level0+1,
+ samp->min_img_filter(samp, s[j], t[j], p[j], level0+1,
samp->faces[j], &rgbax[0][1]);
for (c = 0; c < 4; c++) {
* \param c0 the LOD bias factors, or absolute LODs (depending on control)
*/
static void
-mip_filter_nearest(struct tgsi_sampler *tgsi_sampler,
+mip_filter_nearest(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
float lod[TGSI_QUAD_SIZE];
int j;
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
if (lod[j] < 0.0)
- samp->mag_img_filter(tgsi_sampler, s[j], t[j], p[j], samp->view->u.tex.first_level,
+ samp->mag_img_filter(samp, s[j], t[j], p[j], samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
else {
float level = samp->view->u.tex.first_level + (int)(lod[j] + 0.5F) ;
level = MIN2(level, (int)texture->last_level);
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], level, samp->faces[j],
+ samp->min_img_filter(samp, s[j], t[j], p[j], level, samp->faces[j],
&rgba[0][j]);
}
}
static void
-mip_filter_none(struct tgsi_sampler *tgsi_sampler,
+mip_filter_none(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
float lod[TGSI_QUAD_SIZE];
int j;
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
if (lod[j] < 0.0) {
- samp->mag_img_filter(tgsi_sampler, s[j], t[j], p[j], samp->view->u.tex.first_level,
+ samp->mag_img_filter(samp, s[j], t[j], p[j], samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
}
else {
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], samp->view->u.tex.first_level,
+ samp->min_img_filter(samp, s[j], t[j], p[j], samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
}
}
static void
-mip_filter_none_no_filter_select(struct tgsi_sampler *tgsi_sampler,
+mip_filter_none_no_filter_select(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
int j;
for (j = 0; j < TGSI_QUAD_SIZE; j++)
- samp->mag_img_filter(tgsi_sampler, s[j], t[j], p[j], samp->view->u.tex.first_level,
+ samp->mag_img_filter(samp, s[j], t[j], p[j], samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
}
* "Fundamentals of Texture Mapping and Image Warping" (1989)
*/
static void
-img_filter_2d_ewa(struct tgsi_sampler *tgsi_sampler,
+img_filter_2d_ewa(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
const float dudy, const float dvdy,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
// ??? Won't the image filters blow up if level is negative?
* accelerated img_filter_2d_nearest_XXX functions.
*/
for (jj = 0; jj < buffer_next; jj++) {
- samp->min_img_filter(tgsi_sampler, s_buffer[jj], t_buffer[jj], p[jj],
+ samp->min_img_filter(samp, s_buffer[jj], t_buffer[jj], p[jj],
level, samp->faces[j], &rgba_temp[0][jj]);
num[0] += weight_buffer[jj] * rgba_temp[0][jj];
num[1] += weight_buffer[jj] * rgba_temp[1][jj];
* accelerated img_filter_2d_nearest_XXX functions.
*/
for (jj = 0; jj < buffer_next; jj++) {
- samp->min_img_filter(tgsi_sampler, s_buffer[jj], t_buffer[jj], p[jj], level,
+ samp->min_img_filter(samp, s_buffer[jj], t_buffer[jj], p[jj], level,
samp->faces[j], &rgba_temp[0][jj]);
num[0] += weight_buffer[jj] * rgba_temp[0][jj];
num[1] += weight_buffer[jj] * rgba_temp[1][jj];
rgba[2]=0;
rgba[3]=0;*/
/* not enough pixels in resampling, resort to direct interpolation */
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], level, samp->faces[j],
+ samp->min_img_filter(samp, s[j], t[j], p[j], level, samp->faces[j],
&rgba_temp[0][j]);
den = 1;
num[0] = rgba_temp[0][j];
* Sample 2D texture using an anisotropic filter.
*/
static void
-mip_filter_linear_aniso(struct tgsi_sampler *tgsi_sampler,
+mip_filter_linear_aniso(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int level0;
float lambda;
if (level0 >= (int) texture->last_level) {
int j;
for (j = 0; j < TGSI_QUAD_SIZE; j++)
- samp->min_img_filter(tgsi_sampler, s[j], t[j], p[j], texture->last_level,
+ samp->min_img_filter(samp, s[j], t[j], p[j], texture->last_level,
samp->faces[j], &rgba[0][j]);
}
else {
/* don't bother interpolating between multiple LODs; it doesn't
* seem to be worth the extra running time.
*/
- img_filter_2d_ewa(tgsi_sampler, s, t, p, level0,
+ img_filter_2d_ewa(samp, s, t, p, level0,
dudx, dvdx, dudy, dvdy, rgba);
}
*/
static void
mip_filter_linear_2d_linear_repeat_POT(
- struct tgsi_sampler *tgsi_sampler,
+ struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_resource *texture = samp->view->texture;
int j;
float lod[TGSI_QUAD_SIZE];
*/
if ((unsigned)level0 >= texture->last_level) {
if (level0 < 0)
- img_filter_2d_linear_repeat_POT(tgsi_sampler, s[j], t[j], p[j],
+ img_filter_2d_linear_repeat_POT(samp, s[j], t[j], p[j],
samp->view->u.tex.first_level,
samp->faces[j], &rgba[0][j]);
else
- img_filter_2d_linear_repeat_POT(tgsi_sampler, s[j], t[j], p[j],
+ img_filter_2d_linear_repeat_POT(samp, s[j], t[j], p[j],
samp->view->texture->last_level,
samp->faces[j], &rgba[0][j]);
float rgbax[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
int c;
- img_filter_2d_linear_repeat_POT(tgsi_sampler, s[j], t[j], p[j], level0,
+ img_filter_2d_linear_repeat_POT(samp, s[j], t[j], p[j], level0,
samp->faces[j], &rgbax[0][0]);
- img_filter_2d_linear_repeat_POT(tgsi_sampler, s[j], t[j], p[j], level0+1,
+ img_filter_2d_linear_repeat_POT(samp, s[j], t[j], p[j], level0+1,
samp->faces[j], &rgbax[0][1]);
for (c = 0; c < TGSI_NUM_CHANNELS; c++)
* Do shadow/depth comparisons.
*/
static void
-sample_compare(struct tgsi_sampler *tgsi_sampler,
+sample_compare(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_sampler_state *sampler = samp->sampler;
int j, k0, k1, k2, k3;
float val;
float pc0, pc1, pc2, pc3;
- samp->mip_filter(tgsi_sampler, s, t, p, c0, c1, control, rgba);
+ samp->mip_filter(samp, s, t, p, c0, c1, control, rgba);
/**
* Compare texcoord 'p' (aka R) against texture value 'rgba[0]'
* Put face info into the sampler faces[] array.
*/
static void
-sample_cube(struct tgsi_sampler *tgsi_sampler,
+sample_cube(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned j;
float ssss[4], tttt[4];
* is not active, this will point somewhere deeper into the
* pipeline, eg. to mip_filter or even img_filter.
*/
- samp->compare(tgsi_sampler, ssss, tttt, pppp, c0, c1, control, rgba);
+ samp->compare(samp, ssss, tttt, pppp, c0, c1, control, rgba);
}
static void
-sample_swizzle(struct tgsi_sampler *tgsi_sampler,
+sample_swizzle(struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
enum tgsi_sampler_control control,
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
float rgba_temp[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
- samp->sample_target(tgsi_sampler, s, t, p, c0, c1, control, rgba_temp);
+ samp->sample_target(samp, s, t, p, c0, c1, control, rgba_temp);
do_swizzling(samp, rgba_temp, rgba);
}
static void
-sample_get_dims(struct tgsi_sampler *tgsi_sampler, int level,
- int dims[4])
+sample_get_dims(struct sp_sampler_variant *samp, int level,
+ int dims[4])
{
- struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_sampler_view *view = samp->view;
const struct pipe_resource *texture = view->texture;
* coords to the texture image size.
*/
static void
-sample_get_texels(struct tgsi_sampler *tgsi_sampler,
+sample_get_texels(struct sp_sampler_variant *samp,
const int v_i[TGSI_QUAD_SIZE],
const int v_j[TGSI_QUAD_SIZE],
const int v_k[TGSI_QUAD_SIZE],
const int8_t offset[3],
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
{
- const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
union tex_tile_address addr;
const struct pipe_resource *texture = samp->view->texture;
int j, c;
}
if (any_swizzle(key)) {
- samp->base.get_samples = sample_swizzle;
+ samp->get_samples = sample_swizzle;
}
else {
- samp->base.get_samples = samp->sample_target;
+ samp->get_samples = samp->sample_target;
}
- samp->base.get_dims = sample_get_dims;
- samp->base.get_texel = sample_get_texels;
+ samp->get_dims = sample_get_dims;
+ samp->get_texel = sample_get_texels;
return samp;
}
+
+
+
+static void
+sp_tgsi_get_dims(struct tgsi_sampler *tgsi_sampler,
+ const unsigned sview_index,
+ int level, int dims[4])
+{
+ const struct sp_tgsi_sampler *sp_samp = (struct sp_tgsi_sampler *)tgsi_sampler;
+
+ assert(sp_samp->sp_sampler[sview_index]);
+ sp_samp->sp_sampler[sview_index]->get_dims(sp_samp->sp_sampler[sview_index],
+ level, dims);
+}
+
+
+static void
+sp_tgsi_get_samples(struct tgsi_sampler *tgsi_sampler,
+ const unsigned sview_index,
+ const unsigned sampler_index,
+ const float s[TGSI_QUAD_SIZE],
+ const float t[TGSI_QUAD_SIZE],
+ const float p[TGSI_QUAD_SIZE],
+ const float c0[TGSI_QUAD_SIZE],
+ const float lod[TGSI_QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
+{
+ const struct sp_tgsi_sampler *sp_samp = (struct sp_tgsi_sampler *)tgsi_sampler;
+ assert(sview_index < PIPE_MAX_SAMPLERS);
+ assert(sview_index == sampler_index);
+ assert(sp_samp->sp_sampler[sampler_index]);
+ sp_samp->sp_sampler[sview_index]->get_samples(sp_samp->sp_sampler[sampler_index],
+ s, t, p, c0, lod, control, rgba);
+}
+
+
+static void
+sp_tgsi_get_texel(struct tgsi_sampler *tgsi_sampler,
+ const unsigned sview_index,
+ const int i[TGSI_QUAD_SIZE],
+ const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
+ const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE])
+{
+ const struct sp_tgsi_sampler *sp_samp = (struct sp_tgsi_sampler *)tgsi_sampler;
+ assert(sview_index < PIPE_MAX_SAMPLERS);
+ assert(sp_samp->sp_sampler[sview_index]);
+ sp_samp->sp_sampler[sview_index]->get_texel(sp_samp->sp_sampler[sview_index],
+ i, j, k, lod, offset, rgba);
+}
+
+
+struct sp_tgsi_sampler *
+sp_create_tgsi_sampler(void)
+{
+ struct sp_tgsi_sampler *samp = CALLOC_STRUCT(sp_tgsi_sampler);
+ if (!samp)
+ return NULL;
+
+ samp->base.get_dims = sp_tgsi_get_dims;
+ samp->base.get_samples = sp_tgsi_get_samples;
+ samp->base.get_texel = sp_tgsi_get_texel;
+
+ return samp;
+}
+
int *icoord1,
float *w);
-typedef float (*compute_lambda_func)(const struct sp_sampler_variant *sampler,
+typedef float (*compute_lambda_func)(const struct sp_sampler_variant *samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE]);
-typedef void (*img_filter_func)(struct tgsi_sampler *tgsi_sampler,
+typedef void (*img_filter_func)(struct sp_sampler_variant *samp,
float s,
float t,
float p,
unsigned face_id,
float *rgba);
-typedef void (*filter_func)(struct tgsi_sampler *tgsi_sampler,
+typedef void (*filter_func)(struct sp_sampler_variant *sp_samp,
const float s[TGSI_QUAD_SIZE],
const float t[TGSI_QUAD_SIZE],
const float p[TGSI_QUAD_SIZE],
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+typedef void (*get_dim_func)(struct sp_sampler_variant *sp_samp,
+ int level, int dims[4]);
+
+typedef void (*fetch_func)(struct sp_sampler_variant *sp_samp,
+ const int i[TGSI_QUAD_SIZE],
+ const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
+ const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
+ float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+
+
union sp_sampler_key {
struct {
unsigned target:5;
unsigned value;
};
-/**
- * Subclass of tgsi_sampler
- */
+
struct sp_sampler_variant
{
- struct tgsi_sampler base; /**< base class */
-
union sp_sampler_key key;
/* The owner of this struct:
const struct pipe_sampler_view *view;
struct softpipe_tex_tile_cache *cache;
- unsigned processor;
-
/* For sp_get_samples_2d_linear_POT:
*/
unsigned xpot;
filter_func mip_filter;
filter_func compare;
filter_func sample_target;
-
+
+ filter_func get_samples;
+ fetch_func get_texel;
+ get_dim_func get_dims;
+
+
/* Linked list:
*/
struct sp_sampler_variant *next;
};
+
+/**
+ * Subclass of tgsi_sampler
+ */
+struct sp_tgsi_sampler
+{
+ struct tgsi_sampler base; /**< base class */
+ struct sp_sampler_variant *sp_sampler[PIPE_MAX_SAMPLERS];
+
+};
+
+
struct sp_sampler;
/* Create a sampler variant for a given set of non-orthogonal state. Currently the
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
+struct sp_tgsi_sampler *
+sp_create_tgsi_sampler(void);
+
+
#endif /* SP_TEX_SAMPLE_H */