diff options
author | Kristian Høgsberg <[email protected]> | 2014-10-20 23:29:41 -0700 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2014-12-10 12:29:27 -0800 |
commit | ee5fb8d1ba7f50ed94e1a34fa0f6e15a0588145e (patch) | |
tree | 303ad7ac28769482c37c27fdc448231f9cd9c052 /src/mesa/drivers/dri/i965/brw_context.c | |
parent | 7ff457b93028d1884c7952080edd919008edf141 (diff) |
i965: Generate vs code using scalar backend for BDW+
With everything in place, we can now use the scalar backend compiler for
vertex shaders on BDW+. We make scalar vertex shaders the default on
BDW+ but add a new vec4vs debug option to force the vec4 backend.
No piglit regressions.
Performance impact is minimal, I see a ~1.5 improvement on the T-Rex
GLBenchmark case, but in general it's in the noise. Some of our
internal synthetic, vs bounded benchmarks show great improvement, 20%-40%
in some cases, but real-world cases are mostly unaffected.
Signed-off-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index ee9684bf945..860ee22d674 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -559,6 +559,15 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = true; ctx->Const.ShaderCompilerOptions[MESA_SHADER_GEOMETRY].OptimizeForAOS = true; + if (brw->scalar_vs) { + /* If we're using the scalar backend for vertex shaders, we need to + * configure these accordingly. + */ + ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoIndirectOutput = true; + ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoIndirectTemp = true; + ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = false; + } + /* ARB_viewport_array */ if (brw->gen >= 7 && ctx->API == API_OPENGL_CORE) { ctx->Const.MaxViewports = GEN7_NUM_VIEWPORTS; @@ -754,6 +763,10 @@ brwCreateContext(gl_api api, brw_process_driconf_options(brw); brw_process_intel_debug_variable(brw); + + if (brw->gen >= 8 && !(INTEL_DEBUG & DEBUG_VEC4VS)) + brw->scalar_vs = true; + brw_initialize_context_constants(brw); ctx->Const.ResetStrategy = notify_reset |