summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-03-17 13:10:19 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-03-23 01:01:14 -0700
commit80390f91a0e200ae29a678bda495b91f6452023a (patch)
tree2215c2a5b1c0446b85f119005b562169ba5de317 /src/mesa/drivers/dri/i965/brw_context.c
parent235c728020af352ee0f4b7d598c951f4a4e83232 (diff)
downloadexternal_mesa3d-80390f91a0e200ae29a678bda495b91f6452023a.zip
external_mesa3d-80390f91a0e200ae29a678bda495b91f6452023a.tar.gz
external_mesa3d-80390f91a0e200ae29a678bda495b91f6452023a.tar.bz2
i965/nir: Use NIR lowering for ffma for gen < 6
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index a39443a..ed6fdff 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -551,7 +551,12 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 128;
}
- static const nir_shader_compiler_options nir_options = {
+ static const nir_shader_compiler_options gen4_nir_options = {
+ .native_integers = true,
+ .lower_ffma = true,
+ };
+
+ static const nir_shader_compiler_options gen6_nir_options = {
.native_integers = true,
};
@@ -568,7 +573,10 @@ brw_initialize_context_constants(struct brw_context *brw)
(i == MESA_SHADER_FRAGMENT);
ctx->Const.ShaderCompilerOptions[i].EmitNoIndirectUniform = false;
ctx->Const.ShaderCompilerOptions[i].LowerClipDistance = true;
- ctx->Const.ShaderCompilerOptions[i].NirOptions = &nir_options;
+ if (brw->gen >= 6)
+ ctx->Const.ShaderCompilerOptions[i].NirOptions = &gen6_nir_options;
+ else
+ ctx->Const.ShaderCompilerOptions[i].NirOptions = &gen4_nir_options;
}
ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = true;