diff options
author | Kenneth Graunke <[email protected]> | 2019-05-14 20:23:36 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-05-23 08:13:07 -0700 |
commit | a2d783445791363d56d7365ef50f4748840220a2 (patch) | |
tree | 32569bd0e7b204a040f4084f20d25bb7e082408e /src/mesa | |
parent | 7d2b54e3936ded025d5d75246a7c0a3f2712413f (diff) |
gallium: Change PIPE_CAP_TGSI_FS_FBFETCH bool to PIPE_CAP_FBFETCH count
TGSI's FBFETCH instruction currently only supports reading from a single
render target, but NIR intrinsics can support multiple render targets.
radeonsi can only support fetching from RT 0, but other drivers may be
able to support fetching from any render target.
To express this, this patch renames PIPE_CAP_TGSI_FS_FBFETCH to simply
PIPE_CAP_FBFETCH, and converts it from a boolean "is FBFETCH supported?"
to an integer number of render targets which can be fetched.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index ae0edc5a4d7..98a3490d4df 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -747,8 +747,6 @@ void st_init_extensions(struct pipe_screen *screen, { o(ARB_transform_feedback_overflow_query), PIPE_CAP_QUERY_SO_OVERFLOW }, { o(ARB_fragment_shader_interlock), PIPE_CAP_FRAGMENT_SHADER_INTERLOCK }, - { o(KHR_blend_equation_advanced), PIPE_CAP_TGSI_FS_FBFETCH }, - { o(EXT_blend_equation_separate), PIPE_CAP_BLEND_EQUATION_SEPARATE }, { o(EXT_depth_bounds_test), PIPE_CAP_DEPTH_BOUNDS_TEST }, { o(EXT_disjoint_timer_query), PIPE_CAP_QUERY_TIMESTAMP }, @@ -1396,6 +1394,12 @@ void st_init_extensions(struct pipe_screen *screen, consts->DisableVaryingPacking = GL_TRUE; } + unsigned max_fb_fetch_rts = screen->get_param(screen, PIPE_CAP_FBFETCH); + + if (max_fb_fetch_rts > 0) { + extensions->KHR_blend_equation_advanced = true; + } + consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS); if (consts->MaxViewports >= 16) { if (GLSLVersion >= 400) { |