kk: Expose depthBiasClamp

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39702>
This commit is contained in:
Aitor Camacho 2026-01-29 22:25:10 +09:00 committed by Marge Bot
parent e11fd9a178
commit 575dd21e11
2 changed files with 9 additions and 4 deletions

View file

@ -765,10 +765,14 @@ kk_flush_draw_state(struct kk_cmd_buffer *cmd)
cmd->vk.dynamic_graphics_state.rs.front_face));
}
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_BIAS_FACTORS)) {
mtl_set_depth_bias(enc, dyn->rs.depth_bias.constant_factor,
dyn->rs.depth_bias.slope_factor,
dyn->rs.depth_bias.clamp);
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_BIAS_FACTORS) ||
BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_BIAS_ENABLE)) {
if (dyn->rs.depth_bias.enable)
mtl_set_depth_bias(enc, dyn->rs.depth_bias.constant_factor,
dyn->rs.depth_bias.slope_factor,
dyn->rs.depth_bias.clamp);
else
mtl_set_depth_bias(enc, 0.0f, 0.0f, 0.0f);
}
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_RS_DEPTH_CLAMP_ENABLE)) {

View file

@ -155,6 +155,7 @@ kk_get_device_features(
*features = (struct vk_features){
/* Vulkan 1.0 */
.alphaToOne = true,
.depthBiasClamp = true,
.depthClamp = true,
.drawIndirectFirstInstance = true,
.dualSrcBlend = true,