r600g: indentation fix
authorJerome Glisse <jglisse@redhat.com>
Fri, 3 Dec 2010 17:56:51 +0000 (12:56 -0500)
committerJerome Glisse <jglisse@redhat.com>
Fri, 3 Dec 2010 17:56:51 +0000 (12:56 -0500)
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_buffer.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_texture.c

index 9f44645..ebd541d 100644 (file)
@@ -1206,8 +1206,7 @@ void evergreen_init_config(struct r600_pipe_context *rctx)
        r600_pipe_state_add_reg(rstate, R_0283F8_SQ_VTX_SEMANTIC_30, 0x0, 0xFFFFFFFF, NULL);
        r600_pipe_state_add_reg(rstate, R_0283FC_SQ_VTX_SEMANTIC_31, 0x0, 0xFFFFFFFF, NULL);
 
-r600_pipe_state_add_reg(rstate, R_028810_PA_CL_CLIP_CNTL,
-                       0x0, 0xFFFFFFFF, NULL);
+       r600_pipe_state_add_reg(rstate, R_028810_PA_CL_CLIP_CNTL, 0x0, 0xFFFFFFFF, NULL);
 
        r600_context_pipe_state_set(&rctx->ctx, rstate);
 }
index f35eacd..0f04136 100644 (file)
@@ -159,12 +159,12 @@ static void r600_clear_depth_stencil(struct pipe_context *ctx,
 
 /* Copy a block of pixels from one surface to another using HW. */
 static void r600_hw_copy_region(struct pipe_context *ctx,
-                                struct pipe_resource *dst,
-                                unsigned dst_level,
-                                unsigned dstx, unsigned dsty, unsigned dstz,
-                                struct pipe_resource *src,
-                                unsigned src_level,
-                                const struct pipe_box *src_box)
+                               struct pipe_resource *dst,
+                               unsigned dst_level,
+                               unsigned dstx, unsigned dsty, unsigned dstz,
+                               struct pipe_resource *src,
+                               unsigned src_level,
+                               const struct pipe_box *src_box)
 {
        struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
 
index 76f9d88..51b8aba 100644 (file)
@@ -130,9 +130,9 @@ static void *r600_buffer_transfer_map(struct pipe_context *pipe,
                                r600_bo_reference((struct radeon*)pipe->winsys, &rbuffer->r.bo, NULL);
                                rbuffer->num_ranges = 0;
                                rbuffer->r.bo = r600_bo((struct radeon*)pipe->winsys,
-                                                        rbuffer->r.base.b.width0, 0,
-                                                        rbuffer->r.base.b.bind,
-                                                        rbuffer->r.base.b.usage);
+                                                       rbuffer->r.base.b.width0, 0,
+                                                       rbuffer->r.base.b.bind,
+                                                       rbuffer->r.base.b.usage);
                                break;
                        }
                }
index 4592cbc..fa0b635 100644 (file)
@@ -420,9 +420,9 @@ static boolean r600_is_format_supported(struct pipe_screen* screen,
        }
 
        if ((usage & (PIPE_BIND_RENDER_TARGET |
-                  PIPE_BIND_DISPLAY_TARGET |
-                  PIPE_BIND_SCANOUT |
-                  PIPE_BIND_SHARED)) &&
+                       PIPE_BIND_DISPLAY_TARGET |
+                       PIPE_BIND_SCANOUT |
+                       PIPE_BIND_SHARED)) &&
                        r600_is_colorbuffer_format_supported(format)) {
                retval |= usage &
                        (PIPE_BIND_RENDER_TARGET |
index e4d5dd4..deec946 100644 (file)
@@ -103,19 +103,20 @@ struct r600_pipe_shader {
 
 struct r600_textures_info {
        struct r600_pipe_sampler_view   *views[NUM_TEX_UNITS];
-       unsigned                        n_views;
+       unsigned                        n_views;
        void                            *samplers[NUM_TEX_UNITS];
-       unsigned                        n_samplers;
+       unsigned                        n_samplers;
 };
 
 struct r600_translate_context {
        /* Translate cache for incompatible vertex offset/stride/format fallback. */
-       struct translate_cache *translate_cache;
+       struct translate_cache          *translate_cache;
 
        /* The vertex buffer slot containing the translated buffer. */
-       unsigned vb_slot;
+       unsigned                        vb_slot;
        /* Saved and new vertex element state. */
-       void *saved_velems, *new_velems;
+       void                            *saved_velems;
+       void                            *new_velems;
 };
 
 #define R600_CONSTANT_ARRAY_SIZE 256
@@ -155,11 +156,9 @@ struct r600_pipe_context {
        struct u_upload_mgr             *upload_vb;
        struct u_upload_mgr             *upload_ib;
        unsigned                        any_user_vbs;
-       struct r600_textures_info       ps_samplers;
-
-       unsigned vb_max_index;
-       struct r600_translate_context tran;
-
+       struct r600_textures_info       ps_samplers;
+       unsigned                        vb_max_index;
+       struct r600_translate_context   tran;
 };
 
 struct r600_drawl {
index 60e6794..c5969c7 100644 (file)
@@ -274,8 +274,8 @@ static int r600_shader_update(struct pipe_context *ctx, struct r600_pipe_shader
                return 0;
        /* doing a full memcmp fell over the refcount */
        if ((rshader->vertex_elements.count == rctx->vertex_elements->count) &&
-           (!memcmp(&rshader->vertex_elements.elements, &rctx->vertex_elements->elements,
-                     rctx->vertex_elements->count * sizeof(struct pipe_vertex_element)))) {
+               (!memcmp(&rshader->vertex_elements.elements, &rctx->vertex_elements->elements,
+               rctx->vertex_elements->count * sizeof(struct pipe_vertex_element)))) {
                return 0;
        }
        rshader->vertex_elements = *rctx->vertex_elements;
index 5938d7e..1a2fd4e 100644 (file)
@@ -205,11 +205,10 @@ static unsigned r600_texture_get_nblocksy(struct pipe_screen *screen,
 }
 
 /* Get a width in pixels from a stride in bytes. */
-static unsigned pitch_to_width(enum pipe_format format,
-                                unsigned pitch_in_bytes)
+static unsigned pitch_to_width(enum pipe_format format, unsigned pitch_in_bytes)
 {
-    return (pitch_in_bytes / util_format_get_blocksize(format)) *
-            util_format_get_blockwidth(format);
+       return (pitch_in_bytes / util_format_get_blocksize(format)) *
+               util_format_get_blockwidth(format);
 }
 
 static void r600_texture_set_array_mode(struct pipe_screen *screen,
@@ -328,12 +327,12 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
                                                const struct pipe_resource *templ)
 {
        unsigned array_mode = 0;
-        static int force_tiling = -1;
+       static int force_tiling = -1;
 
-        /* Would like some magic "get_bool_option_once" routine.
+       /* Would like some magic "get_bool_option_once" routine.
         */
        if (force_tiling == -1)
-                force_tiling = debug_get_bool_option("R600_FORCE_TILING", FALSE);
+               force_tiling = debug_get_bool_option("R600_FORCE_TILING", FALSE);
 
        if (force_tiling) {
                if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
@@ -364,8 +363,8 @@ static void r600_texture_destroy(struct pipe_screen *screen,
 }
 
 static boolean r600_texture_get_handle(struct pipe_screen* screen,
-                                       struct pipe_resource *ptex,
-                                       struct winsys_handle *whandle)
+                                       struct pipe_resource *ptex,
+                                       struct winsys_handle *whandle)
 {
        struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
        struct r600_resource *resource = &rtex->resource;
@@ -387,7 +386,7 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
        assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
        if (surface == NULL)
                return NULL;
-        /* XXX no offset */
+       /* XXX no offset */
 /*     offset = r600_texture_get_offset(rtex, level, surf_tmpl->u.tex.first_layer);*/
        pipe_reference_init(&surface->base.reference, 1);
        pipe_resource_reference(&surface->base.texture, texture);
@@ -487,7 +486,7 @@ out:
  */
 static INLINE unsigned u_box_volume( const struct pipe_box *box )
 {
-        return box->width * box->depth * box->height;
+       return box->width * box->depth * box->height;
 };
 
 
@@ -495,39 +494,39 @@ static INLINE unsigned u_box_volume( const struct pipe_box *box )
  * If so, don't use a staging resource.
  */
 static boolean permit_hardware_blit(struct pipe_screen *screen,
-                                    struct pipe_resource *res)
+                                       struct pipe_resource *res)
 {
-        unsigned bind;
+       unsigned bind;
 
-        if (util_format_is_depth_or_stencil(res->format))
-                bind = PIPE_BIND_DEPTH_STENCIL;
-        else
-                bind = PIPE_BIND_RENDER_TARGET;
+       if (util_format_is_depth_or_stencil(res->format))
+               bind = PIPE_BIND_DEPTH_STENCIL;
+       else
+               bind = PIPE_BIND_RENDER_TARGET;
 
        /* See r600_resource_copy_region: there is something wrong
-         * with depth resource copies at the moment so avoid them for
-         * now.
-         */
+        * with depth resource copies at the moment so avoid them for
+        * now.
+        */
        if (util_format_get_component_bits(res->format,
-                                           UTIL_FORMAT_COLORSPACE_ZS,
-                                           0) != 0)
-                return FALSE;
-
-        if (!screen->is_format_supported(screen,
-                                         res->format,
-                                         res->target,
-                                         res->nr_samples,
-                                         bind, 0))
-                return FALSE;
-
-        if (!screen->is_format_supported(screen,
-                                         res->format,
-                                         res->target,
-                                         res->nr_samples,
-                                         PIPE_BIND_SAMPLER_VIEW, 0))
-                return FALSE;
-
-        return TRUE;
+                               UTIL_FORMAT_COLORSPACE_ZS,
+                               0) != 0)
+               return FALSE;
+
+       if (!screen->is_format_supported(screen,
+                               res->format,
+                               res->target,
+                               res->nr_samples,
+                               bind, 0))
+               return FALSE;
+
+       if (!screen->is_format_supported(screen,
+                               res->format,
+                               res->target,
+                               res->nr_samples,
+                               PIPE_BIND_SAMPLER_VIEW, 0))
+               return FALSE;
+
+       return TRUE;
 }
 
 struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
@@ -552,24 +551,23 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
        if (rtex->tiled)
                use_staging_texture = TRUE;
 
-       if ((usage & PIPE_TRANSFER_READ) &&
-            u_box_volume(box) > 1024)
-                use_staging_texture = TRUE;
-
-        /* XXX: Use a staging texture for uploads if the underlying BO
-         * is busy.  No interface for checking that currently? so do
-         * it eagerly whenever the transfer doesn't require a readback
-         * and might block.
-         */
-        if ((usage & PIPE_TRANSFER_WRITE) &&
-            !(usage & (PIPE_TRANSFER_READ |
-                       PIPE_TRANSFER_DONTBLOCK |
-                       PIPE_TRANSFER_UNSYNCHRONIZED)))
-                use_staging_texture = TRUE;
-
-        if (!permit_hardware_blit(ctx->screen, texture) ||
-            (texture->flags & R600_RESOURCE_FLAG_TRANSFER))
-                use_staging_texture = FALSE;
+       if ((usage & PIPE_TRANSFER_READ) && u_box_volume(box) > 1024)
+               use_staging_texture = TRUE;
+
+       /* XXX: Use a staging texture for uploads if the underlying BO
+        * is busy.  No interface for checking that currently? so do
+        * it eagerly whenever the transfer doesn't require a readback
+        * and might block.
+        */
+       if ((usage & PIPE_TRANSFER_WRITE) &&
+                       !(usage & (PIPE_TRANSFER_READ |
+                                       PIPE_TRANSFER_DONTBLOCK |
+                                       PIPE_TRANSFER_UNSYNCHRONIZED)))
+               use_staging_texture = TRUE;
+
+       if (!permit_hardware_blit(ctx->screen, texture) ||
+               (texture->flags & R600_RESOURCE_FLAG_TRANSFER))
+               use_staging_texture = FALSE;
 
        trans = CALLOC_STRUCT(r600_transfer);
        if (trans == NULL)
@@ -579,10 +577,10 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
        trans->transfer.usage = usage;
        trans->transfer.box = *box;
        if (rtex->depth) {
-                /* XXX: only readback the rectangle which is being mapped?
-                 */
-                /* XXX: when discard is true, no need to read back from depth texture
-                 */
+               /* XXX: only readback the rectangle which is being mapped?
+               */
+               /* XXX: when discard is true, no need to read back from depth texture
+               */
                r = r600_texture_depth_flush(ctx, texture);
                if (r < 0) {
                        R600_ERR("failed to create temporary texture to hold untiled copy\n");
@@ -622,7 +620,7 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
                }
 
                trans->transfer.stride =
-                        ((struct r600_resource_texture *)trans->staging_texture)->pitch_in_bytes[0];
+                       ((struct r600_resource_texture *)trans->staging_texture)->pitch_in_bytes[0];
                if (usage & PIPE_TRANSFER_READ) {
                        r600_copy_to_staging_texture(ctx, trans);
                        /* Always referenced in the blit. */
@@ -848,8 +846,8 @@ uint32_t r600_translate_texformat(enum pipe_format format,
        case UTIL_FORMAT_COLORSPACE_YUV:
                yuv_format |= (1 << 30);
                switch (format) {
-                case PIPE_FORMAT_UYVY:
-                case PIPE_FORMAT_YUYV:
+               case PIPE_FORMAT_UYVY:
+               case PIPE_FORMAT_YUYV:
                default:
                        break;
                }
@@ -867,29 +865,29 @@ uint32_t r600_translate_texformat(enum pipe_format format,
 
        /* S3TC formats. TODO */
        if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
-                static int r600_enable_s3tc = -1;
+               static int r600_enable_s3tc = -1;
 
-                if (r600_enable_s3tc == -1)
-                        r600_enable_s3tc = 
-                                debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
+               if (r600_enable_s3tc == -1)
+                       r600_enable_s3tc = 
+                               debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
 
-                if (!r600_enable_s3tc)
-                        goto out_unknown;
+               if (!r600_enable_s3tc)
+                       goto out_unknown;
 
                switch (format) {
                case PIPE_FORMAT_DXT1_RGB:
                case PIPE_FORMAT_DXT1_RGBA:
-                        result = FMT_BC1;
-                        goto out_word4;
+                       result = FMT_BC1;
+                       goto out_word4;
                case PIPE_FORMAT_DXT3_RGBA:
-                        result = FMT_BC2;
-                        goto out_word4;
+                       result = FMT_BC2;
+                       goto out_word4;
                case PIPE_FORMAT_DXT5_RGBA:
-                        result = FMT_BC3;
-                        goto out_word4;
-                default:
-                        goto out_unknown;
-                }
+                       result = FMT_BC3;
+                       goto out_word4;
+               default:
+                       goto out_unknown;
+               }
        }