diff options
author | Dave Airlie <airlied@redhat.com> | 2018-03-12 13:25:30 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-03-12 15:04:02 +1000 |
commit | 1b8a51de0646b37fcdf9cf4467a9e2ce653cd42b (patch) | |
tree | 73ffdc607bb7e7f91face2302390916d442d0ba7 | |
parent | 3fd278bfc64a0d272cf5b86db4a9f125d1fa5a0a (diff) |
r600: just use memset to init bank swizzle.glsl_arb_gpu_shader_fp64_v3
This is doing the same thing and makes this function drop of the
perf chart
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 427e7856d28..2b2a04cf584 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -399,15 +399,10 @@ static const unsigned cycle_for_bank_swizzle_scl[][3] = { static void init_bank_swizzle(struct alu_bank_swizzle *bs) { - int i, cycle, component; /* set up gpr use */ - for (cycle = 0; cycle < NUM_OF_CYCLES; cycle++) - for (component = 0; component < NUM_OF_COMPONENTS; component++) - bs->hw_gpr[cycle][component] = -1; - for (i = 0; i < 4; i++) - bs->hw_cfile_addr[i] = -1; - for (i = 0; i < 4; i++) - bs->hw_cfile_elem[i] = -1; + memset(bs->hw_gpr, 0xff, sizeof(int) * NUM_OF_CYCLES * NUM_OF_COMPONENTS); + memset(bs->hw_cfile_addr, 0xff, sizeof(int) * 4); + memset(bs->hw_cfile_elem, 0xff, sizeof(int) * 4); } static int reserve_gpr(struct alu_bank_swizzle *bs, unsigned sel, unsigned chan, unsigned cycle) |