svga: assorted whitespace and formatting fixes
authorBrian Paul <brianp@vmware.com>
Fri, 1 Feb 2019 02:58:30 +0000 (19:58 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 26 Feb 2019 16:56:45 +0000 (09:56 -0700)
Remove trailing whitespace, etc.

Trivial.

src/gallium/drivers/svga/svga_pipe_constants.c
src/gallium/drivers/svga/svga_resource_buffer.c
src/gallium/drivers/svga/svga_resource_buffer.h
src/gallium/drivers/svga/svga_resource_texture.c
src/gallium/drivers/svga/svga_resource_texture.h
src/gallium/drivers/svga/svga_swtnl_draw.c
src/gallium/drivers/svga/svga_tgsi_decl_sm30.c

index d3535357fcd540d6d64f5ac83e3ca38472ac1a4e..4ef8fb7379638c373442f343cf47ddf002392510 100644 (file)
 #include "svga_context.h"
 #include "svga_resource_buffer.h"
 
-/***********************************************************************
- * Constant buffers 
- */
 
-struct svga_constbuf 
+struct svga_constbuf
 {
    unsigned type;
    float (*data)[4];
@@ -44,9 +41,10 @@ struct svga_constbuf
 
 
 
-static void svga_set_constant_buffer(struct pipe_context *pipe,
-                                     enum pipe_shader_type shader, uint index,
-                                     const struct pipe_constant_buffer *cb)
+static void
+svga_set_constant_buffer(struct pipe_context *pipe,
+                         enum pipe_shader_type shader, uint index,
+                         const struct pipe_constant_buffer *cb)
 {
    struct svga_screen *svgascreen = svga_screen(pipe->screen);
    struct svga_context *svga = svga_context(pipe);
@@ -95,8 +93,8 @@ static void svga_set_constant_buffer(struct pipe_context *pipe,
 }
 
 
-
-void svga_init_constbuffer_functions( struct svga_context *svga )
+void
+svga_init_constbuffer_functions(struct svga_context *svga)
 {
    svga->pipe.set_constant_buffer = svga_set_constant_buffer;
 }
index e9d31de6166919398f4097b93e89d26bfe26ec78..e4d12f07e65d89fd32ccd2b8173a483d7ec24d8d 100644 (file)
@@ -283,9 +283,9 @@ done:
 
 
 static void
-svga_buffer_transfer_flush_region( struct pipe_context *pipe,
-                                   struct pipe_transfer *transfer,
-                                   const struct pipe_box *box)
+svga_buffer_transfer_flush_region(struct pipe_context *pipe,
+                                  struct pipe_transfer *transfer,
+                                  const struct pipe_box *box)
 {
    struct svga_screen *ss = svga_screen(pipe->screen);
    struct svga_buffer *sbuf = svga_buffer(transfer->resource);
@@ -303,8 +303,8 @@ svga_buffer_transfer_flush_region( struct pipe_context *pipe,
 
 
 static void
-svga_buffer_transfer_unmap( struct pipe_context *pipe,
-                            struct pipe_transfer *transfer )
+svga_buffer_transfer_unmap(struct pipe_context *pipe,
+                           struct pipe_transfer *transfer)
 {
    struct svga_screen *ss = svga_screen(pipe->screen);
    struct svga_context *svga = svga_context(pipe);
@@ -349,11 +349,11 @@ svga_buffer_transfer_unmap( struct pipe_context *pipe,
 
 
 static void
-svga_buffer_destroy( struct pipe_screen *screen,
-                    struct pipe_resource *buf )
+svga_buffer_destroy(struct pipe_screen *screen,
+                    struct pipe_resource *buf)
 {
-   struct svga_screen *ss = svga_screen(screen); 
-   struct svga_buffer *sbuf = svga_buffer( buf );
+   struct svga_screen *ss = svga_screen(screen);
+   struct svga_buffer *sbuf = svga_buffer(buf);
 
    assert(!p_atomic_read(&buf->reference.count));
 
@@ -395,7 +395,7 @@ struct u_resource_vtbl svga_buffer_vtbl =
 
 struct pipe_resource *
 svga_buffer_create(struct pipe_screen *screen,
-                  const struct pipe_resource *template)
+                   const struct pipe_resource *template)
 {
    struct svga_screen *ss = svga_screen(screen);
    struct svga_buffer *sbuf;
@@ -483,7 +483,7 @@ struct pipe_resource *
 svga_user_buffer_create(struct pipe_screen *screen,
                         void *ptr,
                         unsigned bytes,
-                       unsigned bind)
+                        unsigned bind)
 {
    struct svga_buffer *sbuf;
    struct svga_screen *ss = svga_screen(screen);
@@ -517,6 +517,3 @@ svga_user_buffer_create(struct pipe_screen *screen,
 no_sbuf:
    return NULL;
 }
-
-
-
index db533416ec4cef9d0591d1cfd7ab48c9eb0ea601..464f073b34fad6237e3a2f6fd552afd007c1cadf 100644 (file)
@@ -73,7 +73,7 @@ struct svga_buffer_surface
 /**
  * SVGA pipe buffer.
  */
-struct svga_buffer 
+struct svga_buffer
 {
    struct u_resource b;
 
@@ -82,30 +82,30 @@ struct svga_buffer
 
    /**
     * Regular (non DMA'able) memory.
-    * 
+    *
     * Used for user buffers or for buffers which we know before hand that can
     * never be used by the virtual hardware directly, such as constant buffers.
     */
    void *swbuf;
-   
-   /** 
+
+   /**
     * Whether swbuf was created by the user or not.
     */
    boolean user;
-   
+
    /**
     * Creation key for the host surface handle.
-    * 
-    * This structure describes all the host surface characteristics so that it 
+    *
+    * This structure describes all the host surface characteristics so that it
     * can be looked up in cache, since creating a host surface is often a slow
     * operation.
     */
    struct svga_host_surface_cache_key key;
-   
+
    /**
     * Host surface handle.
-    * 
-    * This is a platform independent abstraction for host SID. We create when 
+    *
+    * This is a platform independent abstraction for host SID. We create when
     * trying to bind.
     *
     * Only set for non-user buffers.
@@ -237,8 +237,8 @@ svga_buffer(struct pipe_resource *resource)
  * Returns TRUE for user buffers.  We may
  * decide to use an alternate upload path for these buffers.
  */
-static inline boolean 
-svga_buffer_is_user_buffer( struct pipe_resource *buffer )
+static inline boolean
+svga_buffer_is_user_buffer(struct pipe_resource *buffer)
 {
    if (buffer) {
       return svga_buffer(buffer)->user;
@@ -324,11 +324,11 @@ struct pipe_resource *
 svga_user_buffer_create(struct pipe_screen *screen,
                         void *ptr,
                         unsigned bytes,
-                       unsigned usage);
+                        unsigned usage);
 
 struct pipe_resource *
 svga_buffer_create(struct pipe_screen *screen,
-                  const struct pipe_resource *template);
+                   const struct pipe_resource *template);
 
 
 
@@ -351,7 +351,7 @@ svga_context_flush_buffers(struct svga_context *svga);
 
 struct svga_winsys_buffer *
 svga_winsys_buffer_create(struct svga_context *svga,
-                          unsigned alignment, 
+                          unsigned alignment,
                           unsigned usage,
                           unsigned size);
 
index c09215254654f92acd915209040bb8fa82e5cd6a..c716b66e89f9ece0d984ec7c04c1c7ddbc2b2d99 100644 (file)
@@ -116,7 +116,7 @@ svga_transfer_dma(struct svga_context *svga,
    /* Ensure any pending operations on host surfaces are queued on the command
     * buffer first.
     */
-   svga_surfaces_flush( svga );
+   svga_surfaces_flush(svga);
 
    if (!st->swbuf) {
       /* Do the DMA transfer in a single go */
@@ -223,7 +223,7 @@ svga_texture_get_handle(struct pipe_screen *screen,
 
 static void
 svga_texture_destroy(struct pipe_screen *screen,
-                    struct pipe_resource *pt)
+                     struct pipe_resource *pt)
 {
    struct svga_screen *ss = svga_screen(screen);
    struct svga_texture *tex = svga_texture(pt);
@@ -241,7 +241,7 @@ svga_texture_destroy(struct pipe_screen *screen,
    /* Destroy the backed surface handle if exists */
    if (tex->backed_handle)
       svga_screen_surface_destroy(ss, &tex->backed_key, &tex->backed_handle);
-      
+
    ss->hud.total_resource_bytes -= tex->size;
 
    FREE(tex->defined);
@@ -743,11 +743,11 @@ update_image_vgpu10(struct svga_context *svga,
  */
 static void
 svga_texture_transfer_unmap_dma(struct svga_context *svga,
-                               struct svga_transfer *st)
+                                struct svga_transfer *st)
 {
    struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
 
-   if (st->hwbuf) 
+   if (st->hwbuf)
       sws->buffer_unmap(sws, st->hwbuf);
 
    if (st->base.usage & PIPE_TRANSFER_WRITE) {
@@ -775,7 +775,7 @@ svga_texture_transfer_unmap_dma(struct svga_context *svga,
  */
 static void
 svga_texture_transfer_unmap_direct(struct svga_context *svga,
-                                  struct svga_transfer *st)
+                                   struct svga_transfer *st)
 {
    struct pipe_transfer *transfer = &st->base;
    struct svga_texture *tex = svga_texture(transfer->resource);
@@ -830,9 +830,10 @@ svga_texture_transfer_unmap_direct(struct svga_context *svga,
    }
 }
 
+
 static void
 svga_texture_transfer_unmap(struct pipe_context *pipe,
-                           struct pipe_transfer *transfer)
+                            struct pipe_transfer *transfer)
 {
    struct svga_context *svga = svga_context(pipe);
    struct svga_screen *ss = svga_screen(pipe->screen);
@@ -1480,7 +1481,7 @@ svga_texture_transfer_unmap_upload(struct svga_context *svga,
    struct svga_winsys_surface *dstsurf;
    struct pipe_resource *texture = st->base.resource;
    struct svga_texture *tex = svga_texture(texture);
-   enum pipe_error ret; 
+   enum pipe_error ret;
    unsigned subResource;
    unsigned numMipLevels;
    unsigned i, layer;
@@ -1488,7 +1489,7 @@ svga_texture_transfer_unmap_upload(struct svga_context *svga,
 
    assert(svga->tex_upload);
    assert(st->upload.buf);
-   
+
    /* unmap the texture upload buffer */
    u_upload_unmap(svga->tex_upload);
 
index 20db1c03957539eb88749d2cc9f247065dfa83ea..053d74c69131033650bc03527b77a3481df05c38 100644 (file)
@@ -47,12 +47,12 @@ enum SVGA3dSurfaceFormat;
 extern struct u_resource_vtbl svga_texture_vtbl;
 
 
-struct svga_texture 
+struct svga_texture
 {
    struct u_resource b;
 
    ushort *defined;
-   
+
    struct svga_sampler_view *cached_view;
 
    unsigned view_age[SVGA_MAX_TEXTURE_LEVELS];
@@ -62,8 +62,8 @@ struct svga_texture
 
    /**
     * Creation key for the host surface handle.
-    * 
-    * This structure describes all the host surface characteristics so that it 
+    *
+    * This structure describes all the host surface characteristics so that it
     * can be looked up in cache, since creating a host surface is often a slow
     * operation.
     */
@@ -102,7 +102,7 @@ struct svga_texture
 
    /** array indexed by cube face or 3D/array slice, one bit per mipmap level.
     *  Set if the level is marked as dirty.
-    */ 
+    */
    ushort *dirty;
 
    /**
@@ -284,8 +284,8 @@ svga_texture_create(struct pipe_screen *screen,
 
 struct pipe_resource *
 svga_texture_from_handle(struct pipe_screen * screen,
-                       const struct pipe_resource *template,
-                       struct winsys_handle *whandle);
+                         const struct pipe_resource *template,
+                         struct winsys_handle *whandle);
 
 boolean
 svga_texture_generate_mipmap(struct pipe_context *pipe,
index 3db7a4b3b71a92ea5845d34047f352fe0152591f..4cfd8c65ff466869833d28f50d97eb4b2894edf6 100644 (file)
@@ -155,7 +155,7 @@ svga_init_swtnl(struct svga_context *svga)
    struct svga_screen *screen = svga_screen(svga->pipe.screen);
 
    svga->swtnl.backend = svga_vbuf_render_create(svga);
-   if(!svga->swtnl.backend)
+   if (!svga->swtnl.backend)
       goto fail;
 
    /*
index 2296861f6fc07164edd31fdb0bdbbe8eba9e2536..5e0f52bd8992ae27f855ab69949fe97f68941ede 100644 (file)
@@ -578,7 +578,7 @@ svga_translate_decl_sm30(struct svga_shader_emitter *emit,
    unsigned last = decl->Range.Last;
    unsigned idx;
 
-   for(idx = first; idx <= last; idx++) {
+   for (idx = first; idx <= last; idx++) {
       boolean ok = TRUE;
 
       switch (decl->Declaration.File) {