diff options
author | Lionel Landwerlin <[email protected]> | 2019-01-14 18:06:33 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-02-20 09:57:58 +0000 |
commit | f5092136755854b8b9591af93fa264a1b78737a1 (patch) | |
tree | 42de4a3f512584d1970f50955c07ff7b8617a657 /src/intel/vulkan/anv_pipeline.c | |
parent | fa4e103c326a0411ff08984bc77e2feba35b8d9d (diff) |
anv: implement VK_EXT_depth_clip_enable
A new extension allowing the user to explictly specify the clipping
behavior.
Signed-off-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index e2024212bd9..b64cf44373b 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1517,6 +1517,16 @@ anv_pipeline_init(struct anv_pipeline *pipeline, pipeline->depth_clamp_enable = pCreateInfo->pRasterizationState && pCreateInfo->pRasterizationState->depthClampEnable; + /* Previously we enabled depth clipping when !depthClampEnable. + * DepthClipStateCreateInfo now makes depth clipping explicit so if the + * clipping info is available, use its enable value to determine clipping, + * otherwise fallback to the previous !depthClampEnable logic. + */ + const VkPipelineRasterizationDepthClipStateCreateInfoEXT *clip_info = + vk_find_struct_const(pCreateInfo->pRasterizationState->pNext, + PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT); + pipeline->depth_clip_enable = clip_info ? clip_info->depthClipEnable : !pipeline->depth_clamp_enable; + pipeline->sample_shading_enable = pCreateInfo->pMultisampleState && pCreateInfo->pMultisampleState->sampleShadingEnable; |