From adb9e1834897edadd7ea2cc69e75ab3d28337098 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Thu, 25 Jul 2019 14:05:58 -0700 Subject: [PATCH] gallium: Add PIPE_CAP_TEXTURE_SHADOW_LOD MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: Line wrap to 80 char (Marek Olsak) Signed-off-by: Sagar Ghuge Reviewed-by: Marek Olšák Reviewed-by: Kenneth Graunke --- src/gallium/auxiliary/util/u_screen.c | 3 +++ src/gallium/docs/source/screen.rst | 2 ++ src/gallium/include/pipe/p_defines.h | 1 + src/mesa/state_tracker/st_extensions.c | 1 + 4 files changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index e6d0706226f..fec4a10c539 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -367,6 +367,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_MAX_FRAMES_IN_FLIGHT: return 1; + case PIPE_CAP_TEXTURE_SHADOW_LOD: + 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 a8ff17e742f..12de59a4d80 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -542,6 +542,8 @@ The integer capabilities: derivatives in fragment shaders. * ``PIPE_CAP_VERTEX_SHADER_SATURATE``: True if the driver supports saturate modifiers in the vertex shader. +* ``PIPE_CAP_TEXTURE_SHADOW_LOD``: True if the driver supports shadow sampler + types with texture functions having interaction with LOD of texture lookup. .. _pipe_capf: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index c926544688d..c706f9819f8 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -894,6 +894,7 @@ enum pipe_cap PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD, PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES, PIPE_CAP_VERTEX_SHADER_SATURATE, + PIPE_CAP_TEXTURE_SHADOW_LOD, }; /** diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 867ec49eb1c..72a6d843ae9 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -755,6 +755,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(EXT_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS }, { o(EXT_texture_filter_anisotropic), PIPE_CAP_ANISOTROPIC_FILTER }, { o(EXT_texture_mirror_clamp), PIPE_CAP_TEXTURE_MIRROR_CLAMP }, + { o(EXT_texture_shadow_lod), PIPE_CAP_TEXTURE_SHADOW_LOD }, { o(EXT_texture_swizzle), PIPE_CAP_TEXTURE_SWIZZLE }, { o(EXT_transform_feedback), PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS }, { o(EXT_window_rectangles), PIPE_CAP_MAX_WINDOW_RECTANGLES }, -- 2.30.2