Module: Mesa Branch: master Commit: b9c2a0b4c6c122d8c81bced416860da275dc9b1c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9c2a0b4c6c122d8c81bced416860da275dc9b1c
Author: Mike Blumenkrantz <[email protected]> Date: Wed Dec 30 16:14:54 2020 -0500 zink: require KHR_maintenance2 for tessellation and set bottom-left origin this makes tessellation work as expected in apps but has no impact on unit tests Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Witold Baryluk <[email protected]> Tested-by: Witold Baryluk <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8274> --- src/gallium/drivers/zink/zink_instance.py | 1 + src/gallium/drivers/zink/zink_pipeline.c | 4 ++++ src/gallium/drivers/zink/zink_screen.c | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py index dfd2fc0346d..27b72eea948 100644 --- a/src/gallium/drivers/zink/zink_instance.py +++ b/src/gallium/drivers/zink/zink_instance.py @@ -5,6 +5,7 @@ import sys EXTENSIONS = [ Extension("VK_EXT_debug_utils"), + Extension("VK_KHR_maintenance2"), Extension("VK_KHR_get_physical_device_properties2"), Extension("VK_KHR_external_memory_capabilities"), Extension("VK_MVK_moltenvk"), diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index c36bc3c7475..4e20eb4ec3e 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -148,10 +148,14 @@ zink_create_gfx_pipeline(struct zink_screen *screen, pci.pDynamicState = &pipelineDynamicStateCreateInfo; VkPipelineTessellationStateCreateInfo tci = {}; + VkPipelineTessellationDomainOriginStateCreateInfo tdci = {}; if (prog->shaders[PIPE_SHADER_TESS_CTRL] && prog->shaders[PIPE_SHADER_TESS_EVAL]) { tci.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO; tci.patchControlPoints = state->vertices_per_patch; pci.pTessellationState = &tci; + tci.pNext = &tdci; + tdci.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO; + tdci.domainOrigin = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT; } VkPipelineShaderStageCreateInfo shader_stages[ZINK_SHADER_COUNT]; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 8aaaa32883c..3e08734c3b4 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -394,7 +394,9 @@ zink_get_shader_param(struct pipe_screen *pscreen, return INT_MAX; case PIPE_SHADER_TESS_CTRL: case PIPE_SHADER_TESS_EVAL: - if (screen->info.feats.features.tessellationShader) + if (screen->info.feats.features.tessellationShader && + (screen->instance_info.have_KHR_maintenance2 || + VK_MAKE_VERSION(1,1,0) <= screen->loader_version)) return INT_MAX; break; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
