[Mesa-dev] [PATCH v2 68/78] i965/nir: Enable NIR-vec4 pass on geometry shaders

Eduardo Lima Mitev elima at igalia.com
Thu Jul 23 03:17:48 PDT 2015


From: Iago Toral Quiroga <itoral at igalia.com>

---
 src/mesa/drivers/dri/i965/brw_shader.cpp | 4 ++++
 src/mesa/drivers/dri/i965/brw_vec4.cpp   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 34b040d..94461ff 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -135,6 +135,10 @@ brw_compiler_create(void *mem_ctx, const struct brw_device_info *devinfo)
       compiler->glsl_compiler_options[MESA_SHADER_VERTEX].NirOptions = nir_options;
    }
 
+   if (brw_env_var_as_boolean("INTEL_USE_NIR", false)) {
+      compiler->glsl_compiler_options[MESA_SHADER_GEOMETRY].NirOptions = nir_options;
+   }
+
    compiler->glsl_compiler_options[MESA_SHADER_FRAGMENT].NirOptions = nir_options;
    compiler->glsl_compiler_options[MESA_SHADER_COMPUTE].NirOptions = nir_options;
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 251f560..f77f570 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1721,7 +1721,7 @@ bool
 vec4_visitor::run(gl_clip_plane *clip_planes)
 {
    bool use_vec4_nir =
-      compiler->glsl_compiler_options[MESA_SHADER_VERTEX].NirOptions != NULL;
+      compiler->glsl_compiler_options[stage].NirOptions != NULL;
 
    sanity_param_count = prog->Parameters->NumParameters;
 
-- 
2.1.4



More information about the mesa-dev mailing list