Commit db34e72b authored by Yusuf Khan's avatar Yusuf Khan
Browse files

nvk: Support depth clip



Signed-off-by: Yusuf Khan's avatarYusuf Khan <yusisamerican@gmail.com>
parent b257bb39
Pipeline #730766 waiting for manual action with stages
in 8 seconds
......@@ -31,11 +31,12 @@ static void
emit_pipeline_rs_state(struct nv_push *p,
const struct vk_rasterization_state *rs)
{
/* TODO: Depth clip? */
unsigned clip_clamp_enable = rs->depth_clamp_enable | rs->depth_clip_enable;
P_IMMD(p, NV9097, SET_VIEWPORT_CLIP_CONTROL, {
.min_z_zero_max_z_one = MIN_Z_ZERO_MAX_Z_ONE_TRUE,
.pixel_min_z = rs->depth_clamp_enable ? PIXEL_MIN_Z_CLAMP : PIXEL_MIN_Z_CLIP,
.pixel_max_z = rs->depth_clamp_enable ? PIXEL_MAX_Z_CLAMP : PIXEL_MAX_Z_CLIP,
.pixel_min_z = clip_clamp_enable ? PIXEL_MIN_Z_CLAMP : PIXEL_MIN_Z_CLIP,
.pixel_max_z = clip_clamp_enable ? PIXEL_MAX_Z_CLAMP : PIXEL_MAX_Z_CLIP,
.geometry_guardband = GEOMETRY_GUARDBAND_SCALE_256,
.line_point_cull_guardband = LINE_POINT_CULL_GUARDBAND_SCALE_256,
.geometry_clip = GEOMETRY_CLIP_WZERO_CLIP,
......
......@@ -178,6 +178,11 @@ nvk_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
f->vertexInputDynamicState = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: {
VkPhysicalDeviceDepthClipEnableFeaturesEXT *f = (void *)ext;
f->depthClipEnable = true;
break;
}
/* More feature structs */
default:
break;
......@@ -403,6 +408,7 @@ nvk_get_device_extensions(const struct nvk_physical_device *pdev,
.EXT_private_data = true,
.EXT_sample_locations = pdev->info.cls_eng3d >= MAXWELL_B,
.EXT_vertex_input_dynamic_state = true,
.EXT_depth_clip_enable = true,
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment