#define NIR_SRC_AS_(name, c_type, type_enum, cast_macro) \
static inline c_type * \
-nir_src_as_ ## name (struct nir_src *src) \
+nir_src_as_ ## name (nir_src *src) \
{ \
return src->is_ssa && src->ssa->parent_instr->type == type_enum \
? cast_macro(src->ssa->parent_instr) : NULL; \
} \
static inline const c_type * \
-nir_src_as_ ## name ## _const(const struct nir_src *src) \
+nir_src_as_ ## name ## _const(const nir_src *src) \
{ \
return src->is_ssa && src->ssa->parent_instr->type == type_enum \
? cast_macro(src->ssa->parent_instr) : NULL; \
* that instruction is returned as a \c nir_alu_instr. Otherwise \c NULL is
* returned.
*/
-static const struct nir_alu_instr *
+static const nir_alu_instr *
get_neg_instr(const nir_src *s)
{
- const struct nir_alu_instr *const alu = nir_src_as_alu_instr_const(s);
+ const nir_alu_instr *const alu = nir_src_as_alu_instr_const(s);
return alu != NULL && (alu->op == nir_op_fneg || alu->op == nir_op_ineg)
? alu : NULL;
uint8_t alu1_swizzle[4] = {0};
nir_src alu1_actual_src;
- const struct nir_alu_instr *const neg1 = get_neg_instr(&alu1->src[src1].src);
+ const nir_alu_instr *const neg1 = get_neg_instr(&alu1->src[src1].src);
if (neg1) {
parity = !parity;
uint8_t alu2_swizzle[4] = {0};
nir_src alu2_actual_src;
- const struct nir_alu_instr *const neg2 = get_neg_instr(&alu2->src[src2].src);
+ const nir_alu_instr *const neg2 = get_neg_instr(&alu2->src[src2].src);
if (neg2) {
parity = !parity;
}
if (!u_vector_init(&bi->instructions,
- sizeof(struct nir_alu_instr *),
- 8 * sizeof(struct nir_alu_instr *)))
+ sizeof(nir_alu_instr *),
+ 8 * sizeof(nir_alu_instr *)))
return NULL;
exec_list_push_tail(&bq->blocks, &bi->node);
static void
add_instruction_for_block(struct block_instructions *bi,
- struct nir_alu_instr *alu)
+ nir_alu_instr *alu)
{
- struct nir_alu_instr **data =
+ nir_alu_instr **data =
u_vector_add(&bi->instructions);
*data = alu;
if (instr->type != nir_instr_type_alu)
continue;
- struct nir_alu_instr *const alu = nir_instr_as_alu(instr);
+ nir_alu_instr *const alu = nir_instr_as_alu(instr);
if (alu->dest.dest.ssa.num_components != 1)
continue;