summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-05-16 18:25:22 -0700
committerFrancisco Jerez <[email protected]>2016-05-27 23:29:06 -0700
commit864737ce6cd5bae030079e749b8b18774a62d073 (patch)
tree499209de9f8697e04d68a4cbf995f7190eb6bf4e /src/mesa/drivers
parent37fd13ee2daf1dbd80cc7b43f7dcfdd1bb64bcc7 (diff)
i965/fs: Build 32-wide compute shader when needed.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 061d5555230..8f657e67641 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -6524,6 +6524,32 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
}
}
+ fs_visitor v32(compiler, log_data, mem_ctx, key, &prog_data->base,
+ NULL, /* Never used in core profile */
+ shader, 32, shader_time_index);
+ if (!fail_msg && v8.max_dispatch_width >= 32 &&
+ simd_required > 16) {
+ /* Try a SIMD32 compile */
+ if (simd_required <= 8)
+ v32.import_uniforms(&v8);
+ else if (simd_required <= 16)
+ v32.import_uniforms(&v16);
+
+ if (!v32.run_cs()) {
+ compiler->shader_perf_log(log_data,
+ "SIMD32 shader failed to compile: %s",
+ v16.fail_msg);
+ if (!cfg) {
+ fail_msg =
+ "Couldn't generate SIMD32 program and not "
+ "enough threads for SIMD16";
+ }
+ } else {
+ cfg = v32.cfg;
+ prog_data->simd_size = 32;
+ }
+ }
+
if (unlikely(cfg == NULL)) {
assert(fail_msg);
if (error_str)