aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-04-17 17:01:14 -0500
committerJason Ekstrand <[email protected]>2019-04-18 17:12:44 +0000
commiteee994e769259887ea17ec653ee1ea277416ea8b (patch)
treec61b00b2b642abb4d17e79baf7bca23c1f4bc360
parentdb5b372bb9f5a0dfea86618f8f9832f25d9eaf71 (diff)
nir: Drop "struct" from some nir_* declarations
Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
-rw-r--r--src/compiler/nir/nir.h4
-rw-r--r--src/compiler/nir/nir_instr_set.c8
-rw-r--r--src/compiler/nir/nir_opt_comparison_pre.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 8cdc4ba5707..672151f3279 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2756,13 +2756,13 @@ nir_src_instr(const struct nir_src *src)
#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; \
diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c
index d53e044c901..6605d2a1ab3 100644
--- a/src/compiler/nir/nir_instr_set.c
+++ b/src/compiler/nir/nir_instr_set.c
@@ -281,10 +281,10 @@ nir_srcs_equal(nir_src src1, nir_src src2)
* 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;
@@ -440,7 +440,7 @@ nir_alu_srcs_negative_equal(const nir_alu_instr *alu1,
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;
@@ -457,7 +457,7 @@ nir_alu_srcs_negative_equal(const nir_alu_instr *alu1,
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;
diff --git a/src/compiler/nir/nir_opt_comparison_pre.c b/src/compiler/nir/nir_opt_comparison_pre.c
index ab31a2bf554..eee496251a7 100644
--- a/src/compiler/nir/nir_opt_comparison_pre.c
+++ b/src/compiler/nir/nir_opt_comparison_pre.c
@@ -106,8 +106,8 @@ push_block(struct block_queue *bq)
}
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);
@@ -125,9 +125,9 @@ pop_block(struct block_queue *bq, struct block_instructions *bi)
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;
@@ -227,7 +227,7 @@ comparison_pre_block(nir_block *block, struct block_queue *bq, nir_builder *bld)
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;