panfrost: Style main Gallium driver

$ astyle *.c *.h --style=linux -s8

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-07-10 10:10:31 -07:00
parent e4bd6fbe51
commit a2d0ea92ba
27 changed files with 785 additions and 785 deletions

View File

@@ -224,8 +224,7 @@ panfrost_get_blend_for_context(struct panfrost_context *ctx, unsigned rti)
if (panfrost_blend_constant( if (panfrost_blend_constant(
&final.equation.constant, &final.equation.constant,
ctx->blend_color.color, ctx->blend_color.color,
rt->constant_mask)) rt->constant_mask)) {
{
/* There's an equation and suitable constant, so we're good to go */ /* There's an equation and suitable constant, so we're good to go */
final.is_shader = false; final.is_shader = false;
final.equation.equation = &rt->equation; final.equation.equation = &rt->equation;

View File

@@ -52,9 +52,9 @@
//#define DRY_RUN //#define DRY_RUN
static enum mali_job_type static enum mali_job_type
panfrost_job_type_for_pipe(enum pipe_shader_type type) panfrost_job_type_for_pipe(enum pipe_shader_type type) {
{ switch (type)
switch (type) { {
case PIPE_SHADER_VERTEX: case PIPE_SHADER_VERTEX:
return JOB_TYPE_VERTEX; return JOB_TYPE_VERTEX;
@@ -2144,9 +2144,9 @@ panfrost_set_stencil_ref(
} }
static enum mali_texture_type static enum mali_texture_type
panfrost_translate_texture_type(enum pipe_texture_target t) panfrost_translate_texture_type(enum pipe_texture_target t) {
{ switch (t)
switch (t) { {
case PIPE_BUFFER: case PIPE_BUFFER:
case PIPE_TEXTURE_1D: case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_1D_ARRAY:
@@ -2534,8 +2534,7 @@ panfrost_begin_query(struct pipe_context *pipe, struct pipe_query *q)
switch (query->type) { switch (query->type) {
case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE: case PIPE_QUERY_OCCLUSION_PREDICATE:
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: {
{
/* Allocate a word for the query results to be stored */ /* Allocate a word for the query results to be stored */
query->transfer = panfrost_allocate_chunk(ctx, sizeof(unsigned), HEAP_DESCRIPTOR); query->transfer = panfrost_allocate_chunk(ctx, sizeof(unsigned), HEAP_DESCRIPTOR);

View File

@@ -104,7 +104,8 @@ panfrost_translate_channel_width(unsigned size)
} }
static unsigned static unsigned
panfrost_translate_channel_type(unsigned type, unsigned size, bool norm) { panfrost_translate_channel_type(unsigned type, unsigned size, bool norm)
{
switch (type) { switch (type) {
case UTIL_FORMAT_TYPE_UNSIGNED: case UTIL_FORMAT_TYPE_UNSIGNED:
return norm ? MALI_FORMAT_UNORM : MALI_FORMAT_UINT; return norm ? MALI_FORMAT_UNORM : MALI_FORMAT_UINT;
@@ -133,12 +134,12 @@ panfrost_translate_channel_type(unsigned type, unsigned size, bool norm) {
* description */ * description */
enum mali_format enum mali_format
panfrost_find_format(const struct util_format_description *desc) panfrost_find_format(const struct util_format_description *desc) {
{
/* Find first non-VOID channel */ /* Find first non-VOID channel */
struct util_format_channel_description chan = desc->channel[0]; struct util_format_channel_description chan = desc->channel[0];
for (unsigned c = 0; c < 4; ++c) { for (unsigned c = 0; c < 4; ++c)
{
if (desc->channel[c].type == UTIL_FORMAT_TYPE_VOID) if (desc->channel[c].type == UTIL_FORMAT_TYPE_VOID)
continue; continue;
@@ -147,7 +148,8 @@ panfrost_find_format(const struct util_format_description *desc)
} }
/* Check for special formats */ /* Check for special formats */
switch (desc->format) { switch (desc->format)
{
case PIPE_FORMAT_YV12: case PIPE_FORMAT_YV12:
case PIPE_FORMAT_YV16: case PIPE_FORMAT_YV16:
case PIPE_FORMAT_IYUV: case PIPE_FORMAT_IYUV:
@@ -213,7 +215,8 @@ panfrost_find_format(const struct util_format_description *desc)
assert(desc->nr_channels >= 1 && desc->nr_channels <= 4); assert(desc->nr_channels >= 1 && desc->nr_channels <= 4);
unsigned format = MALI_NR_CHANNELS(desc->nr_channels); unsigned format = MALI_NR_CHANNELS(desc->nr_channels);
switch (chan.type) { switch (chan.type)
{
case UTIL_FORMAT_TYPE_UNSIGNED: case UTIL_FORMAT_TYPE_UNSIGNED:
case UTIL_FORMAT_TYPE_SIGNED: case UTIL_FORMAT_TYPE_SIGNED:
case UTIL_FORMAT_TYPE_FIXED: case UTIL_FORMAT_TYPE_FIXED:

View File

@@ -679,8 +679,7 @@ panfrost_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *pr
} }
static enum pipe_format static enum pipe_format
panfrost_resource_get_internal_format(struct pipe_resource *prsrc) panfrost_resource_get_internal_format(struct pipe_resource *prsrc) {
{
return prsrc->format; return prsrc->format;
} }