bool error;
};
-#define compile_error(ctx, args...) ({ \
- printf(args); \
- ctx->error = true; \
- assert(0); \
-})
-
/* io related lowering
* run after lower_int_to_float because it adds i2f/f2i ops
*/
lod_bias = &tex->src[i].src;
lod_bias_idx = i;
break;
+ case nir_tex_src_comparator:
+ break;
default:
assert(0);
break;
static void
etna_emit_tex(struct etna_compile *c, nir_texop op, unsigned texid, unsigned dst_swiz,
struct etna_inst_dst dst, struct etna_inst_src coord,
- struct etna_inst_src lod_bias)
+ struct etna_inst_src lod_bias, struct etna_inst_src compare)
{
struct etna_inst inst = {
.dst = dst,
if (lod_bias.use)
inst.src[1] = lod_bias;
+ if (compare.use)
+ inst.src[2] = compare;
+
switch (op) {
case nir_texop_tex: inst.opcode = INST_OPCODE_TEXLD; break;
case nir_texop_txb: inst.opcode = INST_OPCODE_TEXLDB; break;
OPT_V(s, nir_opt_algebraic);
OPT_V(s, nir_lower_bool_to_float);
} else {
- OPT_V(s, nir_lower_idiv);
+ OPT_V(s, nir_lower_idiv, nir_lower_idiv_fast);
OPT_V(s, nir_lower_bool_to_int32);
}