From 6430fc29a910d0d30db1ce6aaa05bf776b112623 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 18 Dec 2021 05:47:48 +0100 Subject: Vulkan: Implement VK_EXT_primitive_topology_list_restart --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_vulkan') diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 616a7b457..0c175c557 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -605,7 +605,8 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .flags = 0, .topology = input_assembly_topology, .primitiveRestartEnable = key.state.primitive_restart_enable != 0 && - SupportsPrimitiveRestart(input_assembly_topology), + (device.IsExtPrimitiveTopologyListRestartSupported() || + SupportsPrimitiveRestart(input_assembly_topology)), }; const VkPipelineTessellationStateCreateInfo tessellation_ci{ .sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, @@ -613,7 +614,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .flags = 0, .patchControlPoints = key.state.patch_control_points_minus_one.Value() + 1, }; - std::array swizzles; std::ranges::transform(key.state.viewport_swizzles, swizzles.begin(), UnpackViewportSwizzle); const VkPipelineViewportSwizzleStateCreateInfoNV swizzle_ci{ -- cgit v1.2.3 From 14d2c77f910aad77b408eef130d8212430e7202a Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 18 Dec 2021 06:52:28 +0100 Subject: Vulkan: implement Logical Operations. --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_vulkan') diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 0c175c557..7fe735e75 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -748,8 +748,8 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, .pNext = nullptr, .flags = 0, - .logicOpEnable = VK_FALSE, - .logicOp = VK_LOGIC_OP_COPY, + .logicOpEnable = key.state.logic_op_enable != 0, + .logicOp = static_cast(key.state.logic_op.Value()), .attachmentCount = static_cast(cb_attachments.size()), .pAttachments = cb_attachments.data(), .blendConstants = {}, -- cgit v1.2.3 From 6c00151d17050861e76677c219296fb35bf76214 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 18 Dec 2021 07:03:13 +0100 Subject: Vulkan: Fix the checks for primitive restart extension. --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_vulkan') diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 7fe735e75..d514b71d0 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -605,8 +605,11 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .flags = 0, .topology = input_assembly_topology, .primitiveRestartEnable = key.state.primitive_restart_enable != 0 && - (device.IsExtPrimitiveTopologyListRestartSupported() || - SupportsPrimitiveRestart(input_assembly_topology)), + ((input_assembly_topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && + device.IsTopologyListPrimitiveRestartSupported()) || + SupportsPrimitiveRestart(input_assembly_topology) || + (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && + device.IsPatchListPrimitiveRestartSupported())), }; const VkPipelineTessellationStateCreateInfo tessellation_ci{ .sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, -- cgit v1.2.3