summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-12-05 17:14:34 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-01-01 22:43:58 +0100
commitf800e485c9bcd98e08128db974540e7ba0324128 (patch)
treec931bf1f7e8aa04d6f0ea6c110dedc1c10642cab /src/video_core/vulkan_common
parentVulkan: Implement Dynamic States 2 (diff)
downloadyuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar.gz
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar.bz2
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar.lz
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar.xz
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.tar.zst
yuzu-f800e485c9bcd98e08128db974540e7ba0324128.zip
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp5
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.h10
3 files changed, 13 insertions, 4 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 9a420a293..7294fcfe3 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -576,8 +576,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
.pNext = nullptr,
.extendedDynamicState2 = VK_TRUE,
.extendedDynamicState2LogicOp = ext_extended_dynamic_state2_extra ? VK_TRUE : VK_FALSE,
- .extendedDynamicState2PatchControlPoints =
- ext_extended_dynamic_state2_extra ? VK_TRUE : VK_FALSE,
};
SetNext(next, dynamic_state2);
} else {
@@ -1330,8 +1328,7 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) {
extensions.push_back(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME);
ext_extended_dynamic_state2 = true;
ext_extended_dynamic_state2_extra =
- extended_dynamic_state2.extendedDynamicState2LogicOp &&
- extended_dynamic_state2.extendedDynamicState2PatchControlPoints;
+ extended_dynamic_state2.extendedDynamicState2LogicOp;
}
}
if (has_ext_extended_dynamic_state3) {
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index 4dde325ff..8745cf80f 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -126,6 +126,8 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
X(vkCmdSetRasterizerDiscardEnableEXT);
X(vkCmdSetDepthBiasEnableEXT);
X(vkCmdSetFrontFaceEXT);
+ X(vkCmdSetLogicOpEXT);
+ X(vkCmdSetPatchControlPointsEXT);
X(vkCmdSetLineWidth);
X(vkCmdSetPrimitiveTopologyEXT);
X(vkCmdSetStencilOpEXT);
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h
index 0d3f71460..c4b7051fc 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.h
+++ b/src/video_core/vulkan_common/vulkan_wrapper.h
@@ -239,6 +239,8 @@ struct DeviceDispatch : InstanceDispatch {
PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT{};
PFN_vkCmdSetEvent vkCmdSetEvent{};
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT{};
+ PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT{};
+ PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT{};
PFN_vkCmdSetLineWidth vkCmdSetLineWidth{};
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT{};
PFN_vkCmdSetScissor vkCmdSetScissor{};
@@ -1238,6 +1240,14 @@ public:
dld->vkCmdSetFrontFaceEXT(handle, front_face);
}
+ void SetLogicOpEXT(VkLogicOp logic_op) const noexcept {
+ dld->vkCmdSetLogicOpEXT(handle, logic_op);
+ }
+
+ void SetPatchControlPointsEXT(uint32_t patch_control_points) const noexcept {
+ dld->vkCmdSetPatchControlPointsEXT(handle, patch_control_points);
+ }
+
void SetLineWidth(float line_width) const noexcept {
dld->vkCmdSetLineWidth(handle, line_width);
}