iris: Enable INTEL_shader_integer_functions2
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 14 Nov 2019 22:20:48 +0000 (14:20 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 00:18:57 +0000 (00:18 +0000)
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>

src/gallium/drivers/iris/iris_screen.c
src/mesa/state_tracker/st_extensions.c

index b17a7e5a24f09c3f1d05d180f8b9dd8baaa4d2de..736d849feb8a516295d4ff2dbcd89cd05ffc7ed7 100644 (file)
@@ -324,6 +324,10 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PCI_FUNCTION:
       return 0;
 
+   case PIPE_CAP_OPENCL_INTEGER_FUNCTIONS:
+   case PIPE_CAP_INTEGER_MULTIPLY_32X16:
+      return true;
+
    default:
       return u_pipe_screen_get_param_defaults(pscreen, param);
    }
index 3f89d3d115d19c048bd5566bb87952fb420d8199..91f429513fe1086156cf845c37d1d7e5f01c0059 100644 (file)
@@ -1145,6 +1145,11 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->EXT_shader_integer_mix = GL_TRUE;
       extensions->ARB_arrays_of_arrays = GL_TRUE;
       extensions->MESA_shader_integer_functions = GL_TRUE;
+
+      if (screen->get_param(screen, PIPE_CAP_OPENCL_INTEGER_FUNCTIONS) &&
+          screen->get_param(screen, PIPE_CAP_INTEGER_MULTIPLY_32X16)) {
+         extensions->INTEL_shader_integer_functions2 = GL_TRUE;
+      }
    } else {
       /* Optional integer support for GLSL 1.2. */
       if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
@@ -1676,6 +1681,7 @@ void st_init_extensions(struct pipe_screen *screen,
       spirv_caps->transform_feedback         = extensions->ARB_transform_feedback3;
       spirv_caps->variable_pointers          =
          screen->get_param(screen, PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS);
+      spirv_caps->integer_functions2         = extensions->INTEL_shader_integer_functions2;
 
       consts->SpirVExtensions = CALLOC_STRUCT(spirv_supported_extensions);
       _mesa_fill_supported_spirv_extensions(consts->SpirVExtensions, spirv_caps);