Module: Mesa Branch: staging/19.1 Commit: e56eb2f54991f7901af8ebbb71d22447f1173fed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e56eb2f54991f7901af8ebbb71d22447f1173fed
Author: Christian Gmeiner <[email protected]> Date: Tue Jun 18 00:54:47 2019 +0200 Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP" There are GPUs that do not support this feature. This reverts commit e871abe452ad40efcccb0bab6b88fc31d0551e29 Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit dcc0e23438f3e5929c2ef74d57e8207be25ecb41) [Juan A. Suarez: resolve trivial conflicts] Signed-off-by: Juan A. Suarez Romero <[email protected]> Conflicts: src/mesa/state_tracker/st_extensions.c --- src/gallium/auxiliary/util/u_screen.c | 3 +++ src/gallium/docs/source/screen.rst | 3 +++ src/gallium/include/pipe/p_defines.h | 1 + src/mesa/state_tracker/st_extensions.c | 4 ++-- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 3f64e466d7f..6f5b1c4e907 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -366,6 +366,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, return 0; #endif + case PIPE_CAP_TEXTURE_SHADOW_MAP: /* Enables ARB_shadow */ + return 1; + default: unreachable("bad PIPE_CAP_*"); } diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 690e534d206..d5fe5330559 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -32,6 +32,9 @@ The integer capabilities: bound. * ``PIPE_CAP_OCCLUSION_QUERY``: Whether occlusion queries are available. * ``PIPE_CAP_QUERY_TIME_ELAPSED``: Whether PIPE_QUERY_TIME_ELAPSED queries are available. +* ``PIPE_CAP_TEXTURE_SHADOW_MAP``: indicates whether the fragment shader hardware + can do the depth texture / Z comparison operation in TEX instructions + for shadow testing. * ``PIPE_CAP_TEXTURE_SWIZZLE``: Whether swizzling through sampler views is supported. * ``PIPE_CAP_MAX_TEXTURE_2D_LEVELS``: The maximum number of mipmap levels available diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 8b9a2cd07f9..8f56a244f4d 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -690,6 +690,7 @@ enum pipe_cap PIPE_CAP_MAX_RENDER_TARGETS, PIPE_CAP_OCCLUSION_QUERY, PIPE_CAP_QUERY_TIME_ELAPSED, + PIPE_CAP_TEXTURE_SHADOW_MAP, PIPE_CAP_TEXTURE_SWIZZLE, PIPE_CAP_MAX_TEXTURE_2D_LEVELS, PIPE_CAP_MAX_TEXTURE_3D_LEVELS, diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 371e7d2ec8f..9a1b64fee87 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -703,6 +703,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(ARB_draw_buffers_blend), PIPE_CAP_INDEP_BLEND_FUNC }, { o(ARB_draw_indirect), PIPE_CAP_DRAW_INDIRECT }, { o(ARB_draw_instanced), PIPE_CAP_TGSI_INSTANCEID }, + { o(ARB_fragment_program_shadow), PIPE_CAP_TEXTURE_SHADOW_MAP }, { o(ARB_framebuffer_object), PIPE_CAP_MIXED_FRAMEBUFFER_SIZES }, { o(ARB_gpu_shader_int64), PIPE_CAP_INT64 }, { o(ARB_indirect_parameters), PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS }, @@ -727,6 +728,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(ARB_shader_stencil_export), PIPE_CAP_SHADER_STENCIL_EXPORT }, { o(ARB_shader_texture_image_samples), PIPE_CAP_TGSI_TXQS }, { o(ARB_shader_texture_lod), PIPE_CAP_SM3 }, + { o(ARB_shadow), PIPE_CAP_TEXTURE_SHADOW_MAP }, { o(ARB_sparse_buffer), PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE }, { o(ARB_texture_buffer_object), PIPE_CAP_TEXTURE_BUFFER_OBJECTS }, { o(ARB_texture_cube_map_array), PIPE_CAP_CUBE_MAP_ARRAY }, @@ -988,13 +990,11 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_explicit_uniform_location = GL_TRUE; extensions->ARB_fragment_coord_conventions = GL_TRUE; extensions->ARB_fragment_program = GL_TRUE; - extensions->ARB_fragment_program_shadow = GL_TRUE; extensions->ARB_fragment_shader = GL_TRUE; extensions->ARB_half_float_vertex = GL_TRUE; extensions->ARB_internalformat_query = GL_TRUE; extensions->ARB_internalformat_query2 = GL_TRUE; extensions->ARB_map_buffer_range = GL_TRUE; - extensions->ARB_shadow = GL_TRUE; extensions->ARB_sync = GL_TRUE; extensions->ARB_texture_border_clamp = GL_TRUE; extensions->ARB_texture_cube_map = GL_TRUE; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
