diff options
author | Jerome Glisse <[email protected]> | 2010-10-01 10:26:58 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-10-01 10:26:58 -0400 |
commit | 29b491bd033dd97e5afa3ca0058c50f28c01f39d (patch) | |
tree | 88bf959189b31c2d559ecdba6aa07a03aa30aa63 /src/gallium/drivers/r600 | |
parent | 738aa29289296512959cbb37d8602131dae44dab (diff) |
r600g: indentation fixes
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/eg_asm.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/eg_state_inlines.h | 96 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.c | 1 |
5 files changed, 57 insertions, 58 deletions
diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c index dd9eda18d1f..52b7189e9e5 100644 --- a/src/gallium/drivers/r600/eg_asm.c +++ b/src/gallium/drivers/r600/eg_asm.c @@ -72,8 +72,8 @@ int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf) bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->cf_addr >> 1); bc->bytecode[id++] = S_SQ_CF_WORD1_CF_INST(cf->inst) | S_SQ_CF_WORD1_BARRIER(1) | - S_SQ_CF_WORD1_COND(cf->cond) | - S_SQ_CF_WORD1_POP_COUNT(cf->pop_count); + S_SQ_CF_WORD1_COND(cf->cond) | + S_SQ_CF_WORD1_POP_COUNT(cf->pop_count); break; default: diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h index c93b9d94c55..81094904485 100644 --- a/src/gallium/drivers/r600/eg_state_inlines.h +++ b/src/gallium/drivers/r600/eg_state_inlines.h @@ -494,9 +494,9 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) switch (desc->channel[i].type) { /* Half-floats, floats, doubles */ - case UTIL_FORMAT_TYPE_FLOAT: + case UTIL_FORMAT_TYPE_FLOAT: switch (desc->channel[i].size) { - case 16: + case 16: switch (desc->nr_channels) { case 1: result = V_030008_FMT_16_FLOAT; @@ -512,7 +512,7 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) break; } break; - case 32: + case 32: switch (desc->nr_channels) { case 1: result = V_030008_FMT_32_FLOAT; @@ -528,16 +528,16 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) break; } break; - default: + default: goto out_unknown; } break; - /* Unsigned ints */ - case UTIL_FORMAT_TYPE_UNSIGNED: - /* Signed ints */ - case UTIL_FORMAT_TYPE_SIGNED: + /* Unsigned ints */ + case UTIL_FORMAT_TYPE_UNSIGNED: + /* Signed ints */ + case UTIL_FORMAT_TYPE_SIGNED: switch (desc->channel[i].size) { - case 8: + case 8: switch (desc->nr_channels) { case 1: result = V_030008_FMT_8; @@ -546,14 +546,14 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) result = V_030008_FMT_8_8; break; case 3: - // result = V_038008_FMT_8_8_8; /* fails piglit draw-vertices test */ - // break; +// result = V_038008_FMT_8_8_8; /* fails piglit draw-vertices test */ +// break; case 4: result = V_030008_FMT_8_8_8_8; break; } break; - case 16: + case 16: switch (desc->nr_channels) { case 1: result = V_030008_FMT_16; @@ -562,14 +562,14 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) result = V_030008_FMT_16_16; break; case 3: - // result = V_038008_FMT_16_16_16; /* fails piglit draw-vertices test */ - // break; +// result = V_038008_FMT_16_16_16; /* fails piglit draw-vertices test */ +// break; case 4: result = V_030008_FMT_16_16_16_16; break; } break; - case 32: + case 32: switch (desc->nr_channels) { case 1: result = V_030008_FMT_32; @@ -585,14 +585,14 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format) break; } break; - default: + default: goto out_unknown; } break; - default: + default: goto out_unknown; } - + result = S_030008_DATA_FORMAT(result); if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) { @@ -611,36 +611,36 @@ out_unknown: static INLINE uint32_t r600_translate_vertex_data_swizzle(enum pipe_format format) { - const struct util_format_description *desc = util_format_description(format); - unsigned i; - uint32_t word3; - - assert(format); - - if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) { - fprintf(stderr, "r600: Bad format %s in %s:%d\n", - util_format_short_name(format), __FUNCTION__, __LINE__); - return 0; - } - - word3 = 0; - for (i = 0; i < desc->nr_channels; i++) { - switch (i) { - case 0: - word3 |= S_03000C_DST_SEL_X(desc->swizzle[0]); - break; - case 1: - word3 |= S_03000C_DST_SEL_Y(desc->swizzle[1]); - break; - case 2: - word3 |= S_03000C_DST_SEL_Z(desc->swizzle[2]); - break; - case 3: - word3 |= S_03000C_DST_SEL_W(desc->swizzle[3]); - break; - } - } - return word3; + const struct util_format_description *desc = util_format_description(format); + unsigned i; + uint32_t word3; + + assert(format); + + if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) { + fprintf(stderr, "r600: Bad format %s in %s:%d\n", + util_format_short_name(format), __FUNCTION__, __LINE__); + return 0; + } + + word3 = 0; + for (i = 0; i < desc->nr_channels; i++) { + switch (i) { + case 0: + word3 |= S_03000C_DST_SEL_X(desc->swizzle[0]); + break; + case 1: + word3 |= S_03000C_DST_SEL_Y(desc->swizzle[1]); + break; + case 2: + word3 |= S_03000C_DST_SEL_Z(desc->swizzle[2]); + break; + case 3: + word3 |= S_03000C_DST_SEL_W(desc->swizzle[3]); + break; + } + } + return word3; } #endif diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index cbf46a8b64b..dba60afc528 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -58,7 +58,7 @@ struct r600_bc_alu { unsigned bank_swizzle; unsigned bank_swizzle_force; u32 value[4]; - int hw_gpr[NUM_OF_CYCLES][NUM_OF_COMPONENTS]; + int hw_gpr[NUM_OF_CYCLES][NUM_OF_COMPONENTS]; }; struct r600_bc_tex { diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 3900b3779f3..1bbcb310ebf 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -43,23 +43,23 @@ u32 r600_domain_from_usage(unsigned usage) u32 domain = RADEON_GEM_DOMAIN_GTT; if (usage & PIPE_BIND_RENDER_TARGET) { - domain |= RADEON_GEM_DOMAIN_VRAM; + domain |= RADEON_GEM_DOMAIN_VRAM; } if (usage & PIPE_BIND_DEPTH_STENCIL) { - domain |= RADEON_GEM_DOMAIN_VRAM; + domain |= RADEON_GEM_DOMAIN_VRAM; } if (usage & PIPE_BIND_SAMPLER_VIEW) { - domain |= RADEON_GEM_DOMAIN_VRAM; + domain |= RADEON_GEM_DOMAIN_VRAM; } /* also need BIND_BLIT_SOURCE/DESTINATION ? */ if (usage & PIPE_BIND_VERTEX_BUFFER) { - domain |= RADEON_GEM_DOMAIN_GTT; + domain |= RADEON_GEM_DOMAIN_GTT; } if (usage & PIPE_BIND_INDEX_BUFFER) { - domain |= RADEON_GEM_DOMAIN_GTT; + domain |= RADEON_GEM_DOMAIN_GTT; } if (usage & PIPE_BIND_CONSTANT_BUFFER) { - domain |= RADEON_GEM_DOMAIN_VRAM; + domain |= RADEON_GEM_DOMAIN_VRAM; } return domain; diff --git a/src/gallium/drivers/r600/r600_resource.c b/src/gallium/drivers/r600/r600_resource.c index 59edab0e24a..207642ccfa9 100644 --- a/src/gallium/drivers/r600/r600_resource.c +++ b/src/gallium/drivers/r600/r600_resource.c @@ -63,4 +63,3 @@ void r600_init_context_resource_functions(struct r600_pipe_context *r600) r600->context.transfer_inline_write = u_transfer_inline_write_vtbl; r600->context.is_resource_referenced = u_is_resource_referenced_vtbl; } - |