struct tgsi_full_declaration *declarations;
uint maxInstructions = 10, numInstructions = 0;
uint maxDeclarations = 10, numDeclarations = 0;
- GLuint k;
- GLuint instno = 0;
+ uint k;
+ uint instno = 0;
mach->ImmLimit = 0;
labels->count = 0;
}
while( !tgsi_parse_end_of_tokens( &parse ) ) {
- GLuint pointer = parse.Position;
- GLuint i;
+ uint pointer = parse.Position;
+ uint i;
tgsi_parse_token( &parse );
switch( parse.FullToken.Token.Type ) {
tgsi_exec_machine_init(
struct tgsi_exec_machine *mach,
const struct tgsi_token *tokens,
- GLuint numSamplers,
+ uint numSamplers,
struct tgsi_sampler *samplers)
{
- GLuint i, k;
+ uint i, k;
struct tgsi_parse_context parse;
#if 0
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) fabs( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) fabs( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) fabs( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) fabs( (GLdouble) src->f[3] );
+ dst->f[0] = (float) fabs( (double) src->f[0] );
+ dst->f[1] = (float) fabs( (double) src->f[1] );
+ dst->f[2] = (float) fabs( (double) src->f[2] );
+ dst->f[3] = (float) fabs( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) ceil( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) ceil( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) ceil( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) ceil( (GLdouble) src->f[3] );
+ dst->f[0] = (float) ceil( (double) src->f[0] );
+ dst->f[1] = (float) ceil( (double) src->f[1] );
+ dst->f[2] = (float) ceil( (double) src->f[2] );
+ dst->f[3] = (float) ceil( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) cos( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) cos( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) cos( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) cos( (GLdouble) src->f[3] );
+ dst->f[0] = (float) cos( (double) src->f[0] );
+ dst->f[1] = (float) cos( (double) src->f[1] );
+ dst->f[2] = (float) cos( (double) src->f[2] );
+ dst->f[3] = (float) cos( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src)
{
- dst->f[0] = (GLfloat) pow( 2.0, (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) pow( 2.0, (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) pow( 2.0, (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) pow( 2.0, (GLdouble) src->f[3] );
+ dst->f[0] = (float) pow( 2.0, (double) src->f[0] );
+ dst->f[1] = (float) pow( 2.0, (double) src->f[1] );
+ dst->f[2] = (float) pow( 2.0, (double) src->f[2] );
+ dst->f[3] = (float) pow( 2.0, (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->i[0] = (GLint) src->f[0];
- dst->i[1] = (GLint) src->f[1];
- dst->i[2] = (GLint) src->f[2];
- dst->i[3] = (GLint) src->f[3];
+ dst->i[0] = (int) src->f[0];
+ dst->i[1] = (int) src->f[1];
+ dst->i[2] = (int) src->f[2];
+ dst->i[3] = (int) src->f[3];
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->u[0] = (GLuint) src->f[0];
- dst->u[1] = (GLuint) src->f[1];
- dst->u[2] = (GLuint) src->f[2];
- dst->u[3] = (GLuint) src->f[3];
+ dst->u[0] = (uint) src->f[0];
+ dst->u[1] = (uint) src->f[1];
+ dst->u[2] = (uint) src->f[2];
+ dst->u[3] = (uint) src->f[3];
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) floor( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) floor( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) floor( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) floor( (GLdouble) src->f[3] );
+ dst->f[0] = (float) floor( (double) src->f[0] );
+ dst->f[1] = (float) floor( (double) src->f[1] );
+ dst->f[2] = (float) floor( (double) src->f[2] );
+ dst->f[3] = (float) floor( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = src->f[0] - (GLfloat) floor( (GLdouble) src->f[0] );
- dst->f[1] = src->f[1] - (GLfloat) floor( (GLdouble) src->f[1] );
- dst->f[2] = src->f[2] - (GLfloat) floor( (GLdouble) src->f[2] );
- dst->f[3] = src->f[3] - (GLfloat) floor( (GLdouble) src->f[3] );
+ dst->f[0] = src->f[0] - (float) floor( (double) src->f[0] );
+ dst->f[1] = src->f[1] - (float) floor( (double) src->f[1] );
+ dst->f[2] = src->f[2] - (float) floor( (double) src->f[2] );
+ dst->f[3] = src->f[3] - (float) floor( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) src->i[0];
- dst->f[1] = (GLfloat) src->i[1];
- dst->f[2] = (GLfloat) src->i[2];
- dst->f[3] = (GLfloat) src->i[3];
+ dst->f[0] = (float) src->i[0];
+ dst->f[1] = (float) src->i[1];
+ dst->f[2] = (float) src->i[2];
+ dst->f[3] = (float) src->i[3];
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) log( (GLdouble) src->f[0] ) * 1.442695f;
- dst->f[1] = (GLfloat) log( (GLdouble) src->f[1] ) * 1.442695f;
- dst->f[2] = (GLfloat) log( (GLdouble) src->f[2] ) * 1.442695f;
- dst->f[3] = (GLfloat) log( (GLdouble) src->f[3] ) * 1.442695f;
+ dst->f[0] = (float) log( (double) src->f[0] ) * 1.442695f;
+ dst->f[1] = (float) log( (double) src->f[1] ) * 1.442695f;
+ dst->f[2] = (float) log( (double) src->f[2] ) * 1.442695f;
+ dst->f[3] = (float) log( (double) src->f[3] ) * 1.442695f;
}
static void
const union tgsi_exec_channel *src0,
const union tgsi_exec_channel *src1 )
{
- dst->f[0] = (GLfloat) pow( (GLdouble) src0->f[0], (GLdouble) src1->f[0] );
- dst->f[1] = (GLfloat) pow( (GLdouble) src0->f[1], (GLdouble) src1->f[1] );
- dst->f[2] = (GLfloat) pow( (GLdouble) src0->f[2], (GLdouble) src1->f[2] );
- dst->f[3] = (GLfloat) pow( (GLdouble) src0->f[3], (GLdouble) src1->f[3] );
+ dst->f[0] = (float) pow( (double) src0->f[0], (double) src1->f[0] );
+ dst->f[1] = (float) pow( (double) src0->f[1], (double) src1->f[1] );
+ dst->f[2] = (float) pow( (double) src0->f[2], (double) src1->f[2] );
+ dst->f[3] = (float) pow( (double) src0->f[3], (double) src1->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) floor( (GLdouble) (src->f[0] + 0.5f) );
- dst->f[1] = (GLfloat) floor( (GLdouble) (src->f[1] + 0.5f) );
- dst->f[2] = (GLfloat) floor( (GLdouble) (src->f[2] + 0.5f) );
- dst->f[3] = (GLfloat) floor( (GLdouble) (src->f[3] + 0.5f) );
+ dst->f[0] = (float) floor( (double) (src->f[0] + 0.5f) );
+ dst->f[1] = (float) floor( (double) (src->f[1] + 0.5f) );
+ dst->f[2] = (float) floor( (double) (src->f[2] + 0.5f) );
+ dst->f[3] = (float) floor( (double) (src->f[3] + 0.5f) );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) sin( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) sin( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) sin( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) sin( (GLdouble) src->f[3] );
+ dst->f[0] = (float) sin( (double) src->f[0] );
+ dst->f[1] = (float) sin( (double) src->f[1] );
+ dst->f[2] = (float) sin( (double) src->f[2] );
+ dst->f[3] = (float) sin( (double) src->f[3] );
}
static void
micro_sqrt( union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) sqrt( (GLdouble) src->f[0] );
- dst->f[1] = (GLfloat) sqrt( (GLdouble) src->f[1] );
- dst->f[2] = (GLfloat) sqrt( (GLdouble) src->f[2] );
- dst->f[3] = (GLfloat) sqrt( (GLdouble) src->f[3] );
+ dst->f[0] = (float) sqrt( (double) src->f[0] );
+ dst->f[1] = (float) sqrt( (double) src->f[1] );
+ dst->f[2] = (float) sqrt( (double) src->f[2] );
+ dst->f[3] = (float) sqrt( (double) src->f[3] );
}
static void
union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src )
{
- dst->f[0] = (GLfloat) src->u[0];
- dst->f[1] = (GLfloat) src->u[1];
- dst->f[2] = (GLfloat) src->u[2];
- dst->f[3] = (GLfloat) src->u[3];
+ dst->f[0] = (float) src->u[0];
+ dst->f[1] = (float) src->u[1];
+ dst->f[2] = (float) src->u[2];
+ dst->f[3] = (float) src->u[3];
}
static void
static void
fetch_src_file_channel(
const struct tgsi_exec_machine *mach,
- const GLuint file,
- const GLuint swizzle,
+ const uint file,
+ const uint swizzle,
const union tgsi_exec_channel *index,
union tgsi_exec_channel *chan )
{
break;
case TGSI_FILE_IMMEDIATE:
- assert( index->i[0] < (GLint) mach->ImmLimit );
+ assert( index->i[0] < (int) mach->ImmLimit );
chan->f[0] = mach->Imms[index->i[0]][swizzle];
- assert( index->i[1] < (GLint) mach->ImmLimit );
+ assert( index->i[1] < (int) mach->ImmLimit );
chan->f[1] = mach->Imms[index->i[1]][swizzle];
- assert( index->i[2] < (GLint) mach->ImmLimit );
+ assert( index->i[2] < (int) mach->ImmLimit );
chan->f[2] = mach->Imms[index->i[2]][swizzle];
- assert( index->i[3] < (GLint) mach->ImmLimit );
+ assert( index->i[3] < (int) mach->ImmLimit );
chan->f[3] = mach->Imms[index->i[3]][swizzle];
break;
const struct tgsi_exec_machine *mach,
union tgsi_exec_channel *chan,
const struct tgsi_full_src_register *reg,
- const GLuint chan_index )
+ const uint chan_index )
{
union tgsi_exec_channel index;
- GLuint swizzle;
+ uint swizzle;
index.i[0] =
index.i[1] =
const union tgsi_exec_channel *chan,
const struct tgsi_full_dst_register *reg,
const struct tgsi_full_instruction *inst,
- GLuint chan_index )
+ uint chan_index )
{
union tgsi_exec_channel *dst;
const struct tgsi_full_instruction *inst)
{
GLbitfield uniquemask;
- GLuint chan_index;
+ uint chan_index;
GLbitfield kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */
union tgsi_exec_channel r[1];
for (chan_index = 0; chan_index < 4; chan_index++)
{
- GLuint swizzle;
- GLuint i;
+ uint swizzle;
+ uint i;
/* unswizzle channel */
swizzle = tgsi_util_get_full_src_register_extswizzle (
union tgsi_exec_channel *b,
union tgsi_exec_channel *a )
{
- GLuint j;
- GLfloat rgba[NUM_CHANNELS][QUAD_SIZE];
+ uint j;
+ float rgba[NUM_CHANNELS][QUAD_SIZE];
sampler->get_samples(sampler, s->f, t->f, p->f, lodbias, rgba);
const struct tgsi_full_instruction *inst,
int *pc )
{
- GLuint chan_index;
+ uint chan_index;
union tgsi_exec_channel r[8];
(*pc)++;