diff options
author | Ian Romanick <[email protected]> | 2018-09-11 16:50:06 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-23 00:18:57 +0000 |
commit | 4e9079d0c71e42e152a00678bbe2665882849a43 (patch) | |
tree | 4e393189b98cd307bdb15bb9fb7242b5361692d5 /src | |
parent | 4fcddb55f27e29d78c6937c20d91e7f9962ce875 (diff) |
i965: Enable INTEL_shader_integer_functions2 on Gen8+
v2: Use new lower_hadd64 and lower_usub_sat64 flags.
v3: Enable SPIR-V capability.
v4: Move lowering options to COMMON_SCALAR_OPTIONS. Suggested by Caio.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/compiler/brw_compiler.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_extensions.c | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c index a3b8ddb4bd7..3d0bec30dcf 100644 --- a/src/intel/compiler/brw_compiler.c +++ b/src/intel/compiler/brw_compiler.c @@ -61,6 +61,8 @@ .lower_unpack_snorm_4x8 = true, \ .lower_unpack_unorm_2x16 = true, \ .lower_unpack_unorm_4x8 = true, \ + .lower_usub_sat64 = true, \ + .lower_hadd64 = true, \ .max_unroll_iterations = 32 static const struct nir_shader_compiler_options scalar_nir_options = { diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c30f1a04f30..2676382b489 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -411,6 +411,7 @@ brw_initialize_spirv_supported_capabilities(struct brw_context *brw) ctx->Const.SpirVCapabilities.tessellation = true; ctx->Const.SpirVCapabilities.transform_feedback = devinfo->gen >= 7; ctx->Const.SpirVCapabilities.variable_pointers = true; + ctx->Const.SpirVCapabilities.integer_functions2 = devinfo->gen >= 8; } static void diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index e7ea8cde52e..01dacbec8d7 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -320,6 +320,11 @@ intelInitExtensions(struct gl_context *ctx) /* requires ARB_gpu_shader_int64 */ ctx->Extensions.ARB_shader_ballot = true; ctx->Extensions.ARB_ES3_2_compatibility = true; + + /* Currently only implemented in the scalar backend, so only enable for + * Gen8+. Eventually Gen6+ could be supported. + */ + ctx->Extensions.INTEL_shader_integer_functions2 = true; } if (devinfo->gen >= 9) { |