vk: Indent tables to align '=' at column 48
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Mon, 1 Jun 2015 05:35:11 +0000 (22:35 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Mon, 1 Jun 2015 05:36:26 +0000 (22:36 -0700)
src/vulkan/device.c
src/vulkan/image.c
src/vulkan/pipeline.c

index 9a87aafe0538953caf505c14686e23a6c923e5a2..07563d8640e0451f56a1b90e88c52ca15cab95d7 100644 (file)
@@ -1698,33 +1698,33 @@ VkResult anv_CreateSampler(
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
 
    static const uint32_t vk_to_gen_tex_filter[] = {
-      [VK_TEX_FILTER_NEAREST] = MAPFILTER_NEAREST,
-      [VK_TEX_FILTER_LINEAR] = MAPFILTER_LINEAR
+      [VK_TEX_FILTER_NEAREST]                   = MAPFILTER_NEAREST,
+      [VK_TEX_FILTER_LINEAR]                    = MAPFILTER_LINEAR
    };
 
    static const uint32_t vk_to_gen_mipmap_mode[] = {
-      [VK_TEX_MIPMAP_MODE_BASE] = MIPFILTER_NONE,
-      [VK_TEX_MIPMAP_MODE_NEAREST] = MIPFILTER_NEAREST,
-      [VK_TEX_MIPMAP_MODE_LINEAR] = MIPFILTER_LINEAR
+      [VK_TEX_MIPMAP_MODE_BASE]                 = MIPFILTER_NONE,
+      [VK_TEX_MIPMAP_MODE_NEAREST]              = MIPFILTER_NEAREST,
+      [VK_TEX_MIPMAP_MODE_LINEAR]               = MIPFILTER_LINEAR
    };
 
    static const uint32_t vk_to_gen_tex_address[] = {
-      [VK_TEX_ADDRESS_WRAP] = TCM_WRAP,
-      [VK_TEX_ADDRESS_MIRROR] = TCM_MIRROR,
-      [VK_TEX_ADDRESS_CLAMP] = TCM_CLAMP,
-      [VK_TEX_ADDRESS_MIRROR_ONCE] = TCM_MIRROR_ONCE,
-      [VK_TEX_ADDRESS_CLAMP_BORDER] = TCM_CLAMP_BORDER,
+      [VK_TEX_ADDRESS_WRAP]                     = TCM_WRAP,
+      [VK_TEX_ADDRESS_MIRROR]                   = TCM_MIRROR,
+      [VK_TEX_ADDRESS_CLAMP]                    = TCM_CLAMP,
+      [VK_TEX_ADDRESS_MIRROR_ONCE]              = TCM_MIRROR_ONCE,
+      [VK_TEX_ADDRESS_CLAMP_BORDER]             = TCM_CLAMP_BORDER,
    };
 
    static const uint32_t vk_to_gen_compare_op[] = {
-      [VK_COMPARE_OP_NEVER]  = PREFILTEROPNEVER,
-      [VK_COMPARE_OP_LESS]  = PREFILTEROPLESS,
-      [VK_COMPARE_OP_EQUAL]  = PREFILTEROPEQUAL,
-      [VK_COMPARE_OP_LESS_EQUAL]  = PREFILTEROPLEQUAL,
-      [VK_COMPARE_OP_GREATER]  = PREFILTEROPGREATER,
-      [VK_COMPARE_OP_NOT_EQUAL]  = PREFILTEROPNOTEQUAL,
-      [VK_COMPARE_OP_GREATER_EQUAL]  = PREFILTEROPGEQUAL,
-      [VK_COMPARE_OP_ALWAYS]  = PREFILTEROPALWAYS,
+      [VK_COMPARE_OP_NEVER]                     = PREFILTEROPNEVER,
+      [VK_COMPARE_OP_LESS]                      = PREFILTEROPLESS,
+      [VK_COMPARE_OP_EQUAL]                     = PREFILTEROPEQUAL,
+      [VK_COMPARE_OP_LESS_EQUAL]                = PREFILTEROPLEQUAL,
+      [VK_COMPARE_OP_GREATER]                   = PREFILTEROPGREATER,
+      [VK_COMPARE_OP_NOT_EQUAL]                 = PREFILTEROPNOTEQUAL,
+      [VK_COMPARE_OP_GREATER_EQUAL]             = PREFILTEROPGEQUAL,
+      [VK_COMPARE_OP_ALWAYS]                    = PREFILTEROPALWAYS,
    };
 
    if (pCreateInfo->maxAnisotropy > 1) {
@@ -2906,9 +2906,9 @@ void anv_CmdBindIndexBuffer(
    struct anv_buffer *buffer = (struct anv_buffer *) _buffer;
 
    static const uint32_t vk_to_gen_index_type[] = {
-      [VK_INDEX_TYPE_UINT8] = INDEX_BYTE,
-      [VK_INDEX_TYPE_UINT16] = INDEX_WORD,
-      [VK_INDEX_TYPE_UINT32] = INDEX_DWORD,
+      [VK_INDEX_TYPE_UINT8]                     = INDEX_BYTE,
+      [VK_INDEX_TYPE_UINT16]                    = INDEX_WORD,
+      [VK_INDEX_TYPE_UINT32]                    = INDEX_DWORD,
    };
 
    anv_batch_emit(&cmd_buffer->batch, GEN8_3DSTATE_INDEX_BUFFER,
@@ -2971,12 +2971,12 @@ cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
       return VK_ERROR_OUT_OF_DEVICE_MEMORY;
 
    static const uint32_t binding_table_opcodes[] = {
-      [VK_SHADER_STAGE_VERTEX] = 38,
-      [VK_SHADER_STAGE_TESS_CONTROL] = 39,
-      [VK_SHADER_STAGE_TESS_EVALUATION] = 40,
-      [VK_SHADER_STAGE_GEOMETRY] = 41,
-      [VK_SHADER_STAGE_FRAGMENT] = 42,
-      [VK_SHADER_STAGE_COMPUTE] = 0,
+      [VK_SHADER_STAGE_VERTEX]                  = 38,
+      [VK_SHADER_STAGE_TESS_CONTROL]            = 39,
+      [VK_SHADER_STAGE_TESS_EVALUATION]         = 40,
+      [VK_SHADER_STAGE_GEOMETRY]                = 41,
+      [VK_SHADER_STAGE_FRAGMENT]                = 42,
+      [VK_SHADER_STAGE_COMPUTE]                 = 0,
    };
 
    anv_batch_emit(&cmd_buffer->batch,
@@ -3078,12 +3078,12 @@ cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer, unsigned stage)
       return VK_ERROR_OUT_OF_DEVICE_MEMORY;
 
    static const uint32_t sampler_state_opcodes[] = {
-      [VK_SHADER_STAGE_VERTEX] = 43,
-      [VK_SHADER_STAGE_TESS_CONTROL] = 44, /* HS */
-      [VK_SHADER_STAGE_TESS_EVALUATION] = 45, /* DS */
-      [VK_SHADER_STAGE_GEOMETRY] = 46,
-      [VK_SHADER_STAGE_FRAGMENT] = 47,
-      [VK_SHADER_STAGE_COMPUTE] = 0,
+      [VK_SHADER_STAGE_VERTEX]                  = 43,
+      [VK_SHADER_STAGE_TESS_CONTROL]            = 44, /* HS */
+      [VK_SHADER_STAGE_TESS_EVALUATION]         = 45, /* DS */
+      [VK_SHADER_STAGE_GEOMETRY]                = 46,
+      [VK_SHADER_STAGE_FRAGMENT]                = 47,
+      [VK_SHADER_STAGE_COMPUTE]                 = 0,
    };
 
    anv_batch_emit(&cmd_buffer->batch,
index 42bb28f9823292b93575a508eef75da8b6b9a330..14e9e3d5e6132c0746e9c54a721882a42f414ca6 100644 (file)
@@ -180,12 +180,12 @@ anv_image_view_init(struct anv_surface_view *view,
    view->extent = image->extent;
 
    static const uint32_t vk_to_gen_swizzle[] = {
-      [VK_CHANNEL_SWIZZLE_ZERO] = SCS_ZERO,
-      [VK_CHANNEL_SWIZZLE_ONE] = SCS_ONE,
-      [VK_CHANNEL_SWIZZLE_R] = SCS_RED,
-      [VK_CHANNEL_SWIZZLE_G] = SCS_GREEN,
-      [VK_CHANNEL_SWIZZLE_B] = SCS_BLUE,
-      [VK_CHANNEL_SWIZZLE_A] = SCS_ALPHA
+      [VK_CHANNEL_SWIZZLE_ZERO]                 = SCS_ZERO,
+      [VK_CHANNEL_SWIZZLE_ONE]                  = SCS_ONE,
+      [VK_CHANNEL_SWIZZLE_R]                    = SCS_RED,
+      [VK_CHANNEL_SWIZZLE_G]                    = SCS_GREEN,
+      [VK_CHANNEL_SWIZZLE_B]                    = SCS_BLUE,
+      [VK_CHANNEL_SWIZZLE_A]                    = SCS_ALPHA
    };
 
    struct GEN8_RENDER_SURFACE_STATE surface_state = {
index e8441e6efd596f8afd3e01f56dd100d0cfa93295..6babd183f1f322cc1ac24d9b7d0f249dfe78e148 100644 (file)
@@ -129,17 +129,17 @@ emit_ia_state(struct anv_pipeline *pipeline,
               const struct anv_pipeline_create_info *extra)
 {
    static const uint32_t vk_to_gen_primitive_type[] = {
-      [VK_PRIMITIVE_TOPOLOGY_POINT_LIST] = _3DPRIM_POINTLIST,
-      [VK_PRIMITIVE_TOPOLOGY_LINE_LIST] = _3DPRIM_LINELIST,
-      [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP] = _3DPRIM_LINESTRIP,
-      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST] = _3DPRIM_TRILIST,
-      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
-      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
-      [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ] = _3DPRIM_LINELIST_ADJ,
-      [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ] = _3DPRIM_LISTSTRIP_ADJ,
+      [VK_PRIMITIVE_TOPOLOGY_POINT_LIST]        = _3DPRIM_POINTLIST,
+      [VK_PRIMITIVE_TOPOLOGY_LINE_LIST]         = _3DPRIM_LINELIST,
+      [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP]        = _3DPRIM_LINESTRIP,
+      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST]     = _3DPRIM_TRILIST,
+      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP]    = _3DPRIM_TRISTRIP,
+      [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN]      = _3DPRIM_TRIFAN,
+      [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ]     = _3DPRIM_LINELIST_ADJ,
+      [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ]    = _3DPRIM_LISTSTRIP_ADJ,
       [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ] = _3DPRIM_TRILIST_ADJ,
       [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ] = _3DPRIM_TRISTRIP_ADJ,
-      [VK_PRIMITIVE_TOPOLOGY_PATCH] = _3DPRIM_PATCHLIST_1
+      [VK_PRIMITIVE_TOPOLOGY_PATCH]             = _3DPRIM_PATCHLIST_1
    };
    uint32_t topology = vk_to_gen_primitive_type[info->topology];
 
@@ -158,26 +158,26 @@ emit_rs_state(struct anv_pipeline *pipeline, VkPipelineRsStateCreateInfo *info,
               const struct anv_pipeline_create_info *extra)
 {
    static const uint32_t vk_to_gen_cullmode[] = {
-      [VK_CULL_MODE_NONE] = CULLMODE_NONE,
-      [VK_CULL_MODE_FRONT] = CULLMODE_FRONT,
-      [VK_CULL_MODE_BACK] = CULLMODE_BACK,
-      [VK_CULL_MODE_FRONT_AND_BACK] = CULLMODE_BOTH
+      [VK_CULL_MODE_NONE]                       = CULLMODE_NONE,
+      [VK_CULL_MODE_FRONT]                      = CULLMODE_FRONT,
+      [VK_CULL_MODE_BACK]                       = CULLMODE_BACK,
+      [VK_CULL_MODE_FRONT_AND_BACK]             = CULLMODE_BOTH
    };
 
    static const uint32_t vk_to_gen_fillmode[] = {
-      [VK_FILL_MODE_POINTS] = RASTER_POINT,
-      [VK_FILL_MODE_WIREFRAME] = RASTER_WIREFRAME,
-      [VK_FILL_MODE_SOLID] = RASTER_SOLID
+      [VK_FILL_MODE_POINTS]                     = RASTER_POINT,
+      [VK_FILL_MODE_WIREFRAME]                  = RASTER_WIREFRAME,
+      [VK_FILL_MODE_SOLID]                      = RASTER_SOLID
    };
 
    static const uint32_t vk_to_gen_front_face[] = {
-      [VK_FRONT_FACE_CCW] = CounterClockwise,
-      [VK_FRONT_FACE_CW] = Clockwise
+      [VK_FRONT_FACE_CCW]                       = CounterClockwise,
+      [VK_FRONT_FACE_CW]                        = Clockwise
    };
    
    static const uint32_t vk_to_gen_coordinate_origin[] = {
-      [VK_COORDINATE_ORIGIN_UPPER_LEFT] = UPPERLEFT,
-      [VK_COORDINATE_ORIGIN_LOWER_LEFT] = LOWERLEFT
+      [VK_COORDINATE_ORIGIN_UPPER_LEFT]         = UPPERLEFT,
+      [VK_COORDINATE_ORIGIN_LOWER_LEFT]         = LOWERLEFT
    };
 
    struct GEN8_3DSTATE_SF sf = {
@@ -314,25 +314,25 @@ emit_cb_state(struct anv_pipeline *pipeline, VkPipelineCbStateCreateInfo *info)
 }
 
 static const uint32_t vk_to_gen_compare_op[] = {
-   [VK_COMPARE_OP_NEVER] = COMPAREFUNCTION_NEVER,
-   [VK_COMPARE_OP_LESS] = COMPAREFUNCTION_LESS,
-   [VK_COMPARE_OP_EQUAL] = COMPAREFUNCTION_EQUAL,
-   [VK_COMPARE_OP_LESS_EQUAL] = COMPAREFUNCTION_LEQUAL,
-   [VK_COMPARE_OP_GREATER] = COMPAREFUNCTION_GREATER,
-   [VK_COMPARE_OP_NOT_EQUAL] = COMPAREFUNCTION_NOTEQUAL,
-   [VK_COMPARE_OP_GREATER_EQUAL] = COMPAREFUNCTION_GEQUAL,
-   [VK_COMPARE_OP_ALWAYS] = COMPAREFUNCTION_ALWAYS,
+   [VK_COMPARE_OP_NEVER]                        = COMPAREFUNCTION_NEVER,
+   [VK_COMPARE_OP_LESS]                         = COMPAREFUNCTION_LESS,
+   [VK_COMPARE_OP_EQUAL]                        = COMPAREFUNCTION_EQUAL,
+   [VK_COMPARE_OP_LESS_EQUAL]                   = COMPAREFUNCTION_LEQUAL,
+   [VK_COMPARE_OP_GREATER]                      = COMPAREFUNCTION_GREATER,
+   [VK_COMPARE_OP_NOT_EQUAL]                    = COMPAREFUNCTION_NOTEQUAL,
+   [VK_COMPARE_OP_GREATER_EQUAL]                = COMPAREFUNCTION_GEQUAL,
+   [VK_COMPARE_OP_ALWAYS]                       = COMPAREFUNCTION_ALWAYS,
 };
 
 static const uint32_t vk_to_gen_stencil_op[] = {
-   [VK_STENCIL_OP_KEEP] = 0,
-   [VK_STENCIL_OP_ZERO] = 0,
-   [VK_STENCIL_OP_REPLACE] = 0,
-   [VK_STENCIL_OP_INC_CLAMP] = 0,
-   [VK_STENCIL_OP_DEC_CLAMP] = 0,
-   [VK_STENCIL_OP_INVERT] = 0,
-   [VK_STENCIL_OP_INC_WRAP] = 0,
-   [VK_STENCIL_OP_DEC_WRAP] = 0
+   [VK_STENCIL_OP_KEEP]                         = 0,
+   [VK_STENCIL_OP_ZERO]                         = 0,
+   [VK_STENCIL_OP_REPLACE]                      = 0,
+   [VK_STENCIL_OP_INC_CLAMP]                    = 0,
+   [VK_STENCIL_OP_DEC_CLAMP]                    = 0,
+   [VK_STENCIL_OP_INVERT]                       = 0,
+   [VK_STENCIL_OP_INC_WRAP]                     = 0,
+   [VK_STENCIL_OP_DEC_WRAP]                     = 0
 };
 
 static void