summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-02-10 11:23:55 -0800
committerMatt Turner <[email protected]>2015-02-10 17:48:42 -0800
commita9065cef4879509c3dc96a5195f785647576f409 (patch)
tree783b6de55068522383b63446032948fa32df3a1e /src/glsl/nir
parentbb1e0071572d491be37d7dfb3841f48af69f6ede (diff)
nir: Remove casts from void*.
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/nir.c16
-rw-r--r--src/glsl/nir/nir_dominance.c6
-rw-r--r--src/glsl/nir/nir_lower_atomics.c3
-rw-r--r--src/glsl/nir/nir_remove_dead_variables.c2
4 files changed, 13 insertions, 14 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index 10e6ed36d0c..b46fd3083fd 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -1180,7 +1180,7 @@ nir_cf_node_remove(nir_cf_node *node)
static bool
add_use_cb(nir_src *src, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
struct set *uses_set = src->is_ssa ? src->ssa->uses : src->reg.reg->uses;
@@ -1192,7 +1192,7 @@ add_use_cb(nir_src *src, void *state)
static bool
add_ssa_def_cb(nir_ssa_def *def, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (instr->block && def->index == UINT_MAX) {
nir_function_impl *impl =
@@ -1207,7 +1207,7 @@ add_ssa_def_cb(nir_ssa_def *def, void *state)
static bool
add_reg_def_cb(nir_dest *dest, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (!dest->is_ssa)
_mesa_set_add(dest->reg.reg->defs, instr);
@@ -1325,7 +1325,7 @@ nir_instr_insert_after_cf_list(struct exec_list *list, nir_instr *after)
static bool
remove_use_cb(nir_src *src, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
struct set *uses_set = src->is_ssa ? src->ssa->uses : src->reg.reg->uses;
@@ -1339,7 +1339,7 @@ remove_use_cb(nir_src *src, void *state)
static bool
remove_def_cb(nir_dest *dest, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (dest->is_ssa)
return true;
@@ -1984,7 +1984,7 @@ nir_block_get_following_if(nir_block *block)
static bool
index_block(nir_block *block, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
block->index = (*index)++;
return true;
}
@@ -2011,7 +2011,7 @@ index_ssa_def(nir_ssa_def *def, unsigned *index)
static bool
index_ssa_def_cb(nir_dest *dest, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
if (dest->is_ssa)
index_ssa_def(&dest->ssa, index);
return true;
@@ -2026,7 +2026,7 @@ index_ssa_undef(nir_ssa_undef_instr *instr, unsigned *index)
static bool
index_ssa_block(nir_block *block, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
nir_foreach_instr(block, instr) {
if (instr->type == nir_instr_type_ssa_undef)
diff --git a/src/glsl/nir/nir_dominance.c b/src/glsl/nir/nir_dominance.c
index 67fdcc69725..4927a292882 100644
--- a/src/glsl/nir/nir_dominance.c
+++ b/src/glsl/nir/nir_dominance.c
@@ -215,7 +215,7 @@ nir_calc_dominance(nir_shader *shader)
static bool
dump_block_dom(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
if (block->imm_dom)
fprintf(fp, "\t%u -> %u\n", block->imm_dom->index, block->index);
return true;
@@ -241,7 +241,7 @@ nir_dump_dom_tree(nir_shader *shader, FILE *fp)
static bool
dump_block_dom_frontier(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
fprintf(fp, "DF(%u) = {", block->index);
struct set_entry *entry;
@@ -271,7 +271,7 @@ nir_dump_dom_frontier(nir_shader *shader, FILE *fp)
static bool
dump_block_succs(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
if (block->successors[0])
fprintf(fp, "\t%u -> %u\n", block->index, block->successors[0]->index);
if (block->successors[1])
diff --git a/src/glsl/nir/nir_lower_atomics.c b/src/glsl/nir/nir_lower_atomics.c
index 6ed53778e18..5e04417c0f3 100644
--- a/src/glsl/nir/nir_lower_atomics.c
+++ b/src/glsl/nir/nir_lower_atomics.c
@@ -128,8 +128,7 @@ lower_block(nir_block *block, void *state)
{
nir_foreach_instr_safe(block, instr) {
if (instr->type == nir_instr_type_intrinsic)
- lower_instr(nir_instr_as_intrinsic(instr),
- (nir_function_impl *) state);
+ lower_instr(nir_instr_as_intrinsic(instr), state);
}
return true;
diff --git a/src/glsl/nir/nir_remove_dead_variables.c b/src/glsl/nir/nir_remove_dead_variables.c
index e37535f7988..e7f8aeacb0a 100644
--- a/src/glsl/nir/nir_remove_dead_variables.c
+++ b/src/glsl/nir/nir_remove_dead_variables.c
@@ -63,7 +63,7 @@ add_var_use_tex(nir_tex_instr *instr, struct set *live)
static bool
add_var_use_block(nir_block *block, void *state)
{
- struct set *live = (struct set *) state;
+ struct set *live = state;
nir_foreach_instr(block, instr) {
switch(instr->type) {