anv: Rename gs_vec4 to gs_kernel
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Dec 2015 02:16:38 +0000 (18:16 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Dec 2015 02:23:14 +0000 (18:23 -0800)
The code generated may be vec4 or simd8 depending on how we start the
compiler.

To run the GS in SIMD8, set the INTEL_SCALAR_GS environment variable.
This was added in:

    commit 36fd65381756ed1b8f774f7fcdd555941a3d39e1
    Author: Kenneth Graunke <kenneth@whitecape.org>
    Date:   Wed Mar 11 23:14:31 2015 -0700

        i965: Add scalar geometry shader support.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
src/vulkan/anv_pipeline.c
src/vulkan/anv_private.h
src/vulkan/gen7_pipeline.c
src/vulkan/gen8_pipeline.c

index 05d84feba68cfbac1a101138e86a2b954604f6ae..bf243cdb6b4316cbfdfd432e8dae080609e83d2e 100644 (file)
@@ -513,7 +513,7 @@ anv_pipeline_compile_gs(struct anv_pipeline *pipeline,
    }
 
    /* TODO: SIMD8 GS */
-   pipeline->gs_vec4 =
+   pipeline->gs_kernel =
       anv_pipeline_upload_kernel(pipeline, shader_code, code_size);
    pipeline->gs_vertex_count = nir->info.gs.vertices_in;
 
@@ -966,7 +966,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline, struct anv_device *device,
 
    pipeline->vs_simd8 = NO_KERNEL;
    pipeline->vs_vec4 = NO_KERNEL;
-   pipeline->gs_vec4 = NO_KERNEL;
+   pipeline->gs_kernel = NO_KERNEL;
 
    pipeline->active_stages = 0;
    pipeline->total_scratch = 0;
index 8aaa2811fc767bad842b234cbc908a609c4cf736..b763f7015708d2a7596fb1b6cfb549e5bc2dea47 100644 (file)
@@ -1272,7 +1272,7 @@ struct anv_pipeline {
    uint32_t                                     ps_ksp2;
    uint32_t                                     ps_grf_start0;
    uint32_t                                     ps_grf_start2;
-   uint32_t                                     gs_vec4;
+   uint32_t                                     gs_kernel;
    uint32_t                                     gs_vertex_count;
    uint32_t                                     cs_simd;
 
index 8262956ef072ad6f2963aa3f25d366b3602b4855..e3bfc708deb48a7bc6c65d0a5e8148506cdbec0c 100644 (file)
@@ -477,14 +477,14 @@ genX(graphics_pipeline_create)(
 
    const struct brw_gs_prog_data *gs_prog_data = &pipeline->gs_prog_data;
 
-   if (pipeline->gs_vec4 == NO_KERNEL || (extra && extra->disable_vs)) {
+   if (pipeline->gs_kernel == NO_KERNEL || (extra && extra->disable_vs)) {
       anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS), .GSEnable = false);
    } else {
       urb_offset = 1;
       urb_length = (gs_prog_data->base.vue_map.num_slots + 1) / 2 - urb_offset;
 
       anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS),
-         .KernelStartPointer                    = pipeline->gs_vec4,
+         .KernelStartPointer                    = pipeline->gs_kernel,
          .ScratchSpaceBasePointer               = pipeline->scratch_start[MESA_SHADER_GEOMETRY],
          .PerThreadScratchSpace                 = scratch_space(&gs_prog_data->base.base),
 
index 07a43bdbe552f03848261f7639f7f4c7cee1c793..d3b307ca5f7a2b985c1da52b7b1e144c3433a220 100644 (file)
@@ -436,12 +436,12 @@ genX(graphics_pipeline_create)(
    offset = 1;
    length = (gs_prog_data->base.vue_map.num_slots + 1) / 2 - offset;
 
-   if (pipeline->gs_vec4 == NO_KERNEL)
+   if (pipeline->gs_kernel == NO_KERNEL)
       anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS), .Enable = false);
    else
       anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS),
                      .SingleProgramFlow = false,
-                     .KernelStartPointer = pipeline->gs_vec4,
+                     .KernelStartPointer = pipeline->gs_kernel,
                      .VectorMaskEnable = Dmask,
                      .SamplerCount = 0,
                      .BindingTableEntryCount = 0,
@@ -533,7 +533,7 @@ genX(graphics_pipeline_create)(
     * shared with other gens.
     */
    const struct brw_vue_map *fs_input_map;
-   if (pipeline->gs_vec4 == NO_KERNEL)
+   if (pipeline->gs_kernel == NO_KERNEL)
       fs_input_map = &vue_prog_data->vue_map;
    else
       fs_input_map = &gs_prog_data->base.vue_map;
@@ -700,7 +700,7 @@ VkResult genX(compute_pipeline_create)(
 
    pipeline->vs_simd8 = NO_KERNEL;
    pipeline->vs_vec4 = NO_KERNEL;
-   pipeline->gs_vec4 = NO_KERNEL;
+   pipeline->gs_kernel = NO_KERNEL;
 
    pipeline->active_stages = 0;
    pipeline->total_scratch = 0;