From 7edcc59a7bd94280f517b161a860e06197c98b4c Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 14 Dec 2015 18:16:38 -0800 Subject: [PATCH] anv: Rename gs_vec4 to gs_kernel 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 Date: Wed Mar 11 23:14:31 2015 -0700 i965: Add scalar geometry shader support. Signed-off-by: Jordan Justen --- src/vulkan/anv_pipeline.c | 4 ++-- src/vulkan/anv_private.h | 2 +- src/vulkan/gen7_pipeline.c | 4 ++-- src/vulkan/gen8_pipeline.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c index 05d84feba68..bf243cdb6b4 100644 --- a/src/vulkan/anv_pipeline.c +++ b/src/vulkan/anv_pipeline.c @@ -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; diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 8aaa2811fc7..b763f701570 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -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; diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index 8262956ef07..e3bfc708deb 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -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), diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index 07a43bdbe55..d3b307ca5f7 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -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; -- 2.30.2