#include "tgsi/tgsi_util.h"
#include "brw_wm.h"
-#include "brw_util.h"
#include "brw_debug.h"
struct brw_fp_src src0,
struct brw_fp_src sampler )
{
- struct brw_fp_src coord = src_undef();
+ struct brw_fp_src coord;
struct brw_fp_dst tmp = dst_undef();
assert(unit < BRW_MAX_TEX_UNIT);
{
struct brw_fp_dst out;
- out.file = dst->DstRegister.File;
- out.index = dst->DstRegister.Index;
- out.writemask = dst->DstRegister.WriteMask;
- out.indirect = dst->DstRegister.Indirect;
+ out.file = dst->Register.File;
+ out.index = dst->Register.Index;
+ out.writemask = dst->Register.WriteMask;
+ out.indirect = dst->Register.Indirect;
out.saturate = (saturate == TGSI_SAT_ZERO_ONE);
if (out.indirect) {
- assert(dst->DstRegisterInd.File == TGSI_FILE_ADDRESS);
- assert(dst->DstRegisterInd.Index == 0);
+ assert(dst->Indirect.File == TGSI_FILE_ADDRESS);
+ assert(dst->Indirect.Index == 0);
}
return out;
{
struct brw_fp_src out;
- out.file = src->SrcRegister.File;
- out.index = src->SrcRegister.Index;
- out.indirect = src->SrcRegister.Indirect;
+ out.file = src->Register.File;
+ out.index = src->Register.Index;
+ out.indirect = src->Register.Indirect;
- out.swizzle = ((src->SrcRegister.SwizzleX << 0) |
- (src->SrcRegister.SwizzleY << 2) |
- (src->SrcRegister.SwizzleZ << 4) |
- (src->SrcRegister.SwizzleW << 6));
+ out.swizzle = ((src->Register.SwizzleX << 0) |
+ (src->Register.SwizzleY << 2) |
+ (src->Register.SwizzleZ << 4) |
+ (src->Register.SwizzleW << 6));
switch (tgsi_util_get_full_src_register_sign_mode( src, 0 )) {
case TGSI_UTIL_SIGN_CLEAR:
}
if (out.indirect) {
- assert(src->SrcRegisterInd.File == TGSI_FILE_ADDRESS);
- assert(src->SrcRegisterInd.Index == 0);
+ assert(src->Indirect.File == TGSI_FILE_ADDRESS);
+ assert(src->Indirect.Index == 0);
}
return out;
struct brw_fp_src src[3];
int i;
- dst = translate_dst( c, &inst->FullDstRegisters[0],
+ dst = translate_dst( c, &inst->Dst[0],
inst->Instruction.Saturate );
for (i = 0; i < inst->Instruction.NumSrcRegs; i++)
- src[i] = translate_src( c, &inst->FullSrcRegisters[i] );
+ src[i] = translate_src( c, &inst->Src[i] );
switch (opcode) {
case TGSI_OPCODE_ABS:
case TGSI_OPCODE_TEX:
precalc_tex(c, dst,
- inst->InstructionExtTexture.Texture,
+ inst->Texture.Texture,
src[1].index, /* use sampler unit for tex idx */
src[0], /* coord */
src[1]); /* sampler */
case TGSI_OPCODE_TXP:
precalc_txp(c, dst,
- inst->InstructionExtTexture.Texture,
+ inst->Texture.Texture,
src[1].index, /* use sampler unit for tex idx */
src[0], /* coord */
src[1]); /* sampler */
/* XXX: TXB not done
*/
precalc_tex(c, dst,
- inst->InstructionExtTexture.Texture,
+ inst->Texture.Texture,
src[1].index, /* use sampler unit for tex idx*/
src[0],
src[1]);
unsigned first, last, mask;
unsigned attrib;
- first = decl->DeclarationRange.First;
- last = decl->DeclarationRange.Last;
+ first = decl->Range.First;
+ last = decl->Range.Last;
mask = decl->Declaration.UsageMask;
for (attrib = first; attrib <= last; attrib++) {
emit_interp(c,
attrib,
- decl->Semantic.SemanticName,
+ decl->Semantic.Name,
decl->Declaration.Interpolate );
}
}