diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-08-05 16:25:11 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-09-10 14:36:46 -0700 |
commit | eca8032f20d0970184843d98e2bddb688e94a3a9 (patch) | |
tree | 02ee58d7a29dea7a00f513441f34a86ebe2bebbe /src/gallium | |
parent | dccd179ba1c4179fda3eedd928d63fc82c777220 (diff) |
gallium: Add ARB_gl_spirv support
The PIPE_CAP_GL_SPIRV capability enables ARB_gl_spirv and
ARB_spirv_extensions, and will make sure the corresponding SPIR-V
capabilities and extensions lists are initialized.
The additional PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS capability enables
the support for Variable Pointers in SPIR-V shaders. This depends on
the driver and is not mandatory for ARB_gl_spirv support.
v2: Add a PIPE_CAP for Variable Pointers. (Marek)
Reviewed-by: Alejandro PiƱeiro <[email protected]> [v1]
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/docs/source/screen.rst | 2 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 879e49d8d5b..83b1c4df15b 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -376,6 +376,10 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_TEXTURE_SHADOW_LOD: return 0; + case PIPE_CAP_GL_SPIRV: + case PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS: + return 0; + case PIPE_CAP_DMABUF: #if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) return 1; diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 1df04b6c3bf..c4373e72de5 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -552,6 +552,8 @@ The integer capabilities: turn arrays whose contents can be deduced at compile time into constant buffer loads, or false if the driver can handle such arrays itself in a more efficient manner. +* ``PIPE_CAP_GL_SPIRV``: True if the driver supports ARB_gl_spirv extension. +* ``PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS``: True if the driver supports Variable Pointers in SPIR-V shaders. .. _pipe_capf: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 8530994d9ad..0e98af3985d 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -898,6 +898,8 @@ enum pipe_cap PIPE_CAP_SHADER_SAMPLES_IDENTICAL, PIPE_CAP_TGSI_ATOMINC_WRAP, PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF, + PIPE_CAP_GL_SPIRV, + PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS, }; /** |