unsigned target;
unsigned unit;
LLVMValueRef coords;
- struct lp_derivatives derivs;
+ struct lp_derivatives derivs = { {NULL}, {NULL} };
if (!bld->sampler) {
_debug_printf("warning: found texture instruction but no sampler generator supplied\n");
coords = lp_build_emit_fetch( &bld->bld_base, inst, 0 , LP_CHAN_ALL);
- if (0 && modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV) {
- lp_build_emit_fetch( &bld->bld_base, inst, 1 , LP_CHAN_ALL);
- lp_build_emit_fetch( &bld->bld_base, inst, 2 , LP_CHAN_ALL);
+ if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV) {
+ /* probably not going to work */
+ derivs.ddx[0] = lp_build_emit_fetch( &bld->bld_base, inst, 1 , LP_CHAN_ALL);
+ derivs.ddy[0] = lp_build_emit_fetch( &bld->bld_base, inst, 2 , LP_CHAN_ALL);
unit = inst->Src[3].Register.Index;
- } else {
-#if 0
- ddx = lp_build_ddx( &bld->bld_base.base, coords );
- ddy = lp_build_ddy( &bld->bld_base.base, coords );
-#else
- /* TODO */
- derivs.ddx_ddy[0] = bld->bld_base.base.one;
- derivs.ddx_ddy[1] = bld->bld_base.base.one;
-#endif
+ }
+ else {
unit = inst->Src[1].Register.Index;
}
-
return bld->sampler->emit_fetch_texel(bld->sampler,
&bld->bld_base.base,
target, unit,
for (idx = first; idx <= last; ++idx) {
switch (decl->Declaration.File) {
case TGSI_FILE_TEMPORARY:
- assert(idx < LP_MAX_TGSI_TEMPS);
+ assert(idx < LP_MAX_INLINED_TEMPS);
if (bld->indirect_files & (1 << TGSI_FILE_TEMPORARY)) {
LLVMValueRef array_size = lp_build_const_int32(gallivm, last + 1);
bld->temps_array = lp_build_array_alloca(bld->bld_base.base.gallivm,
case TGSI_OPCODE_DDY:
return FALSE;
- case TGSI_OPCODE_KILP:
- /* predicated kill */
+ case TGSI_OPCODE_KILL:
return FALSE;
- case TGSI_OPCODE_KIL:
- /* conditional kill */
+ case TGSI_OPCODE_KILL_IF:
return FALSE;
case TGSI_OPCODE_PK2H:
return FALSE;
case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
return FALSE;
case TGSI_OPCODE_BGNLOOP:
const uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1;
float imm[4];
assert(size <= 4);
- assert(num_immediates < LP_MAX_TGSI_IMMEDIATES);
+ assert(num_immediates < LP_MAX_INLINED_IMMEDIATES);
for (chan = 0; chan < 4; ++chan) {
imm[chan] = 0.0f;
}