diff options
author | Jason Ekstrand <[email protected]> | 2019-02-22 10:48:39 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-07-24 12:55:40 -0500 |
commit | c84b8eeeac30ec033847a3e13d05d1162e78daf3 (patch) | |
tree | 2fba023f049627a457343e8664566852f6baee9f /src/intel/compiler/brw_fs.cpp | |
parent | 1981460af2c17d55c17be2475a28bbf711a80c79 (diff) |
intel/compiler: Be more conservative about subgroup sizes in GL
The rules for gl_SubgroupSize in Vulkan require that it be a constant
that can be queried through the API. However, all GL requires is that
it's a uniform. Instead of always claiming that the subgroup size in
the shader is 32 in GL like we have to do for Vulkan, claim 8 for
geometry stages, the maximum for fragment shaders, and the actual size
for compute.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 30e04ddc318..4ab50aad11f 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -7967,7 +7967,9 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data, { const struct gen_device_info *devinfo = compiler->devinfo; - brw_nir_apply_key(shader, compiler, &key->base, true); + unsigned max_subgroup_size = unlikely(INTEL_DEBUG & DEBUG_DO32) ? 32 : 16; + + brw_nir_apply_key(shader, compiler, &key->base, max_subgroup_size, true); brw_nir_lower_fs_inputs(shader, devinfo, key); brw_nir_lower_fs_outputs(shader); @@ -8228,7 +8230,7 @@ compile_cs_to_nir(const struct brw_compiler *compiler, unsigned dispatch_width) { nir_shader *shader = nir_shader_clone(mem_ctx, src_shader); - brw_nir_apply_key(shader, compiler, &key->base, true); + brw_nir_apply_key(shader, compiler, &key->base, dispatch_width, true); NIR_PASS_V(shader, brw_nir_lower_cs_intrinsics, dispatch_width); |