{
const union tgsi_exec_channel *args[5], *proj = NULL;
union tgsi_exec_channel r[5];
- enum tgsi_sampler_control control = tgsi_sampler_lod_none;
+ enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
uint chan;
uint unit;
int8_t offsets[3];
args[i] = &ZeroVec;
if (modifier == TEX_MODIFIER_EXPLICIT_LOD)
- control = tgsi_sampler_lod_explicit;
+ control = TGSI_SAMPLER_LOD_EXPLICIT;
else if (modifier == TEX_MODIFIER_LOD_BIAS)
- control = tgsi_sampler_lod_bias;
+ control = TGSI_SAMPLER_LOD_BIAS;
else if (modifier == TEX_MODIFIER_GATHER)
- control = tgsi_sampler_gather;
+ control = TGSI_SAMPLER_GATHER;
}
else {
for (i = dim; i < Elements(args); i++)
args[1]->f,
args[2]->f,
args[3]->f,
- tgsi_sampler_lod_none,
+ TGSI_SAMPLER_LOD_NONE,
r[0].f,
r[1].f);
fetch_texel(mach->Sampler, unit, unit,
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
break;
fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
break;
fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
break;
fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
break;
fetch_texel(mach->Sampler, unit, unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
break;
const uint sampler_unit = inst->Src[2].Register.Index;
union tgsi_exec_channel r[5], c1;
const union tgsi_exec_channel *lod = &ZeroVec;
- enum tgsi_sampler_control control = tgsi_sampler_lod_none;
+ enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
uint chan;
unsigned char swizzles[4];
int8_t offsets[3];
if (modifier == TEX_MODIFIER_LOD_BIAS) {
FETCH(&c1, 3, TGSI_CHAN_X);
lod = &c1;
- control = tgsi_sampler_lod_bias;
+ control = TGSI_SAMPLER_LOD_BIAS;
}
else if (modifier == TEX_MODIFIER_EXPLICIT_LOD) {
FETCH(&c1, 3, TGSI_CHAN_X);
lod = &c1;
- control = tgsi_sampler_lod_explicit;
+ control = TGSI_SAMPLER_LOD_EXPLICIT;
}
else {
assert(modifier == TEX_MODIFIER_LEVEL_ZERO);
- control = tgsi_sampler_lod_zero;
+ control = TGSI_SAMPLER_LOD_ZERO;
}
}
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
break;
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* inputs */
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
break;
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
&r[0], &r[1], &r[2], &r[3], &ZeroVec,
- derivs, offsets, tgsi_sampler_derivs_explicit,
+ derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
&r[0], &r[1], &r[2], &r[3]);
break;
uint i;
switch (control) {
- case tgsi_sampler_lod_none:
- case tgsi_sampler_lod_zero:
+ case TGSI_SAMPLER_LOD_NONE:
+ case TGSI_SAMPLER_LOD_ZERO:
/* XXX FIXME */
- case tgsi_sampler_derivs_explicit:
+ case TGSI_SAMPLER_DERIVS_EXPLICIT:
lod[0] = lod[1] = lod[2] = lod[3] = CLAMP(biased_lambda, min_lod, max_lod);
break;
- case tgsi_sampler_lod_bias:
+ case TGSI_SAMPLER_LOD_BIAS:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
lod[i] = biased_lambda + lod_in[i];
lod[i] = CLAMP(lod[i], min_lod, max_lod);
}
break;
- case tgsi_sampler_lod_explicit:
+ case TGSI_SAMPLER_LOD_EXPLICIT:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
lod[i] = CLAMP(lod_in[i], min_lod, max_lod);
}
uint i;
switch (control) {
- case tgsi_sampler_lod_none:
+ case TGSI_SAMPLER_LOD_NONE:
/* XXX FIXME */
- case tgsi_sampler_derivs_explicit:
+ case TGSI_SAMPLER_DERIVS_EXPLICIT:
lambda = sp_sview->compute_lambda(sp_sview, s, t, p) + lod_bias;
lod[0] = lod[1] = lod[2] = lod[3] = lambda;
break;
- case tgsi_sampler_lod_bias:
+ case TGSI_SAMPLER_LOD_BIAS:
lambda = sp_sview->compute_lambda(sp_sview, s, t, p) + lod_bias;
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
lod[i] = lambda + lod_in[i];
}
break;
- case tgsi_sampler_lod_explicit:
+ case TGSI_SAMPLER_LOD_EXPLICIT:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
lod[i] = lod_in[i] + lod_bias;
}
break;
- case tgsi_sampler_lod_zero:
- case tgsi_sampler_gather:
+ case TGSI_SAMPLER_LOD_ZERO:
+ case TGSI_SAMPLER_GATHER:
lod[0] = lod[1] = lod[2] = lod[3] = lod_bias;
break;
default:
compute_lambda_lod(sp_sview, sp_samp, s, t, p, lod_in, filt_args->control, lod);
args.offset = filt_args->offset;
- args.gather_only = filt_args->control == tgsi_sampler_gather;
+ args.gather_only = filt_args->control == TGSI_SAMPLER_GATHER;
args.gather_comp = get_gather_component(lod_in);
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
struct img_filter_args args;
args.offset = filt_args->offset;
- args.gather_only = filt_args->control == tgsi_sampler_gather;
+ args.gather_only = filt_args->control == TGSI_SAMPLER_GATHER;
args.gather_comp = get_gather_component(lod_in);
compute_lambda_lod(sp_sview, sp_samp, s, t, p, lod_in, filt_args->control, lod);
args.level = sp_sview->base.u.tex.first_level;
args.offset = filt_args->offset;
- args.gather_only = filt_args->control == tgsi_sampler_gather;
+ args.gather_only = filt_args->control == TGSI_SAMPLER_GATHER;
compute_lambda_lod(sp_sview, sp_samp, s, t, p, lod_in, filt_args->control, lod);
struct img_filter_args args;
args.level = sp_sview->base.u.tex.first_level;
args.offset = filt_args->offset;
- args.gather_only = filt_args->control == tgsi_sampler_gather;
+ args.gather_only = filt_args->control == TGSI_SAMPLER_GATHER;
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
args.s = s[j];
args.t = t[j];
float dvdy = (t[QUAD_TOP_LEFT] - t[QUAD_BOTTOM_LEFT]) * t_to_v;
struct img_filter_args args;
- if (filt_args->control == tgsi_sampler_lod_bias ||
- filt_args->control == tgsi_sampler_lod_none ||
+ if (filt_args->control == TGSI_SAMPLER_LOD_BIAS ||
+ filt_args->control == TGSI_SAMPLER_LOD_NONE ||
/* XXX FIXME */
- filt_args->control == tgsi_sampler_derivs_explicit) {
+ filt_args->control == TGSI_SAMPLER_DERIVS_EXPLICIT) {
/* note: instead of working with Px and Py, we will use the
* squared length instead, to avoid sqrt.
*/
compute_lod(&sp_samp->base, filt_args->control, lambda, lod_in, lod);
}
else {
- assert(filt_args->control == tgsi_sampler_lod_explicit ||
- filt_args->control == tgsi_sampler_lod_zero);
+ assert(filt_args->control == TGSI_SAMPLER_LOD_EXPLICIT ||
+ filt_args->control == TGSI_SAMPLER_LOD_ZERO);
compute_lod(&sp_samp->base, filt_args->control, sp_samp->base.lod_bias, lod_in, lod);
}
args.p = p[j];
args.face_id = sp_sview->faces[j];
args.offset = filt_args->offset;
- args.gather_only = filt_args->control == tgsi_sampler_gather;
+ args.gather_only = filt_args->control == TGSI_SAMPLER_GATHER;
if ((unsigned)level0 >= psview->u.tex.last_level) {
if (level0 < 0)
args.level = psview->u.tex.first_level;
float pc[4];
const struct util_format_description *format_desc;
unsigned chan_type;
- bool is_gather = (control == tgsi_sampler_gather);
+ bool is_gather = (control == TGSI_SAMPLER_GATHER);
/**
* Compare texcoord 'p' (aka R) against texture value 'rgba[0]'
img_filter_func *mag)
{
assert(funcs);
- if (control == tgsi_sampler_gather) {
+ if (control == TGSI_SAMPLER_GATHER) {
*funcs = &funcs_nearest;
if (min) {
*min = get_img_filter(sp_sview, &sp_samp->base,
lod, filt_args->control, rgba);
}
- if (sp_sview->need_swizzle && filt_args->control != tgsi_sampler_gather) {
+ if (sp_sview->need_swizzle && filt_args->control != TGSI_SAMPLER_GATHER) {
float rgba_temp[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];
memcpy(rgba_temp, rgba, sizeof(rgba_temp));
do_swizzling(&sp_sview->base, rgba_temp, rgba);