gallium: Make PIPE_CAP_DEPTH_CLIP_DISABLE a tri-state value and use it

Use value "2" to signal that lowering is needed and supported and enable
it accordingly.

v2: - Note in CAP description that this lowering currently requires TGSI
    - use "true" instead of GL_TRUE (both Erik)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Gert Wollny
2019-07-25 10:44:39 +02:00
committed by Gert Wollny
parent 616f320745
commit b2e92c45ce
2 changed files with 6 additions and 1 deletions

View File

@@ -699,6 +699,9 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
}
}
if (screen->get_param(screen, PIPE_CAP_DEPTH_CLIP_DISABLE) == 2)
st->clamp_frag_depth_in_shader = true;
/* called after _mesa_create_context/_mesa_init_point, fix default user
* settable max point size up
*/