gallium: try and update r300 and nv drivers for tgsi changes

It would be nice if these drivers built under the linux-debug header
so that these types of interface changes can be minimally propogated
into those drivers by people without the hardware.  They don't have to
generate a working driver -- though a command-dumping winsys would be
an excellent for regression checking.
This commit is contained in:
Keith Whitwell 2009-11-24 14:09:24 +00:00
parent ba1ca28cc6
commit 56ee132f96
9 changed files with 17 additions and 17 deletions

View file

@ -229,12 +229,11 @@ src_vector(struct i915_fp_compile *p,
src = negate(src, n, n, n, n);
}
/* no abs() or post-abs negation */
/* no abs() */
#if 0
/* XXX assertions disabled to allow arbfplight.c to run */
/* XXX enable these assertions, or fix things */
assert(!source->SrcRegisterExtMod.Absolute);
assert(!source->SrcRegisterExtMod.Negate);
assert(!source->SrcRegister.Absolute);
#endif
return src;
}

View file

@ -326,7 +326,7 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
unsigned num_coords;
unsigned i;
switch (inst->InstructionExtTexture.Texture) {
switch (inst->InstructionTexture.Texture) {
case TGSI_TEXTURE_1D:
num_coords = 1;
break;

View file

@ -273,7 +273,7 @@ tgsi_src(struct nv20_vpc *vpc, const struct tgsi_full_src_register *fsrc) {
break;
}
src.abs = fsrc->SrcRegisterExtMod.Absolute;
src.abs = fsrc->SrcRegister.Absolute;
src.negate = fsrc->SrcRegister.Negate;
src.swz[0] = fsrc->SrcRegister.SwizzleX;
src.swz[1] = fsrc->SrcRegister.SwizzleY;

View file

@ -268,7 +268,7 @@ tgsi_src(struct nv30_fpc *fpc, const struct tgsi_full_src_register *fsrc)
break;
}
src.abs = fsrc->SrcRegisterExtMod.Absolute;
src.abs = fsrc->SrcRegister.Absolute;
src.negate = fsrc->SrcRegister.Negate;
src.swz[0] = fsrc->SrcRegister.SwizzleX;
src.swz[1] = fsrc->SrcRegister.SwizzleY;

View file

@ -273,7 +273,7 @@ tgsi_src(struct nv30_vpc *vpc, const struct tgsi_full_src_register *fsrc) {
break;
}
src.abs = fsrc->SrcRegisterExtMod.Absolute;
src.abs = fsrc->SrcRegister.Absolute;
src.negate = fsrc->SrcRegister.Negate;
src.swz[0] = fsrc->SrcRegister.SwizzleX;
src.swz[1] = fsrc->SrcRegister.SwizzleY;

View file

@ -279,7 +279,7 @@ tgsi_src(struct nv40_fpc *fpc, const struct tgsi_full_src_register *fsrc)
break;
}
src.abs = fsrc->SrcRegisterExtMod.Absolute;
src.abs = fsrc->SrcRegister.Absolute;
src.negate = fsrc->SrcRegister.Negate;
src.swz[0] = fsrc->SrcRegister.SwizzleX;
src.swz[1] = fsrc->SrcRegister.SwizzleY;

View file

@ -313,7 +313,7 @@ tgsi_src(struct nv40_vpc *vpc, const struct tgsi_full_src_register *fsrc) {
break;
}
src.abs = fsrc->SrcRegisterExtMod.Absolute;
src.abs = fsrc->SrcRegister.Absolute;
src.negate = fsrc->SrcRegister.Negate;
src.swz[0] = fsrc->SrcRegister.SwizzleX;
src.swz[1] = fsrc->SrcRegister.SwizzleY;

View file

@ -1575,10 +1575,10 @@ nv50_tgsi_src_mask(const struct tgsi_full_instruction *insn, int c)
case TGSI_OPCODE_TEX:
case TGSI_OPCODE_TXP:
{
const struct tgsi_instruction_ext_texture *tex;
const struct tgsi_instruction_texture *tex;
assert(insn->Instruction.Extended);
tex = &insn->InstructionExtTexture;
assert(insn->Instruction.Texture);
tex = &insn->InstructionTexture;
mask = 0x7;
if (insn->Instruction.Opcode == TGSI_OPCODE_TXP)
@ -2181,11 +2181,11 @@ nv50_program_tx_insn(struct nv50_pc *pc,
break;
case TGSI_OPCODE_TEX:
emit_tex(pc, dst, mask, src[0], unit,
inst->InstructionExtTexture.Texture, FALSE);
inst->InstructionTexture.Texture, FALSE);
break;
case TGSI_OPCODE_TXP:
emit_tex(pc, dst, mask, src[0], unit,
inst->InstructionExtTexture.Texture, TRUE);
inst->InstructionTexture.Texture, TRUE);
break;
case TGSI_OPCODE_TRUNC:
for (c = 0; c < 4; c++) {

View file

@ -208,11 +208,11 @@ static void transform_srcreg(
dst->Swizzle |= tgsi_util_get_full_src_register_swizzle(src, 1) << 3;
dst->Swizzle |= tgsi_util_get_full_src_register_swizzle(src, 2) << 6;
dst->Swizzle |= tgsi_util_get_full_src_register_swizzle(src, 3) << 9;
dst->Abs = src->SrcRegisterExtMod.Absolute;
dst->Abs = src->SrcRegister.Absolute;
dst->Negate = src->SrcRegister.Negate ? RC_MASK_XYZW : 0;
}
static void transform_texture(struct rc_instruction * dst, struct tgsi_instruction_ext_texture src)
static void transform_texture(struct rc_instruction * dst, struct tgsi_instruction_texture src)
{
switch(src.Texture) {
case TGSI_TEXTURE_1D:
@ -268,7 +268,8 @@ static void transform_instruction(struct tgsi_to_rc * ttr, struct tgsi_full_inst
}
/* Texturing. */
transform_texture(dst, src->InstructionExtTexture);
if (src->Instruction.Texture)
transform_texture(dst, src->InstructionTexture);
}
static void handle_immediate(struct tgsi_to_rc * ttr, struct tgsi_full_immediate * imm)