Browse Source

[video_core] Fix regressions introduced in #3015 (#3068)

This change is intended to fix two regressions:

1. Fixes the issue where `EDS3` + `Vertex Input Dynamic State` being enabled prevented some games from launching correctly.

2. Fixes the issue with broken water in `Super Mario Party Jamboree`.

This complements #3042.

Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3068
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
no-d24
MaranBr 1 month ago
committed by crueter
parent
commit
d8caa74233
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 6
      src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
  2. 6
      src/video_core/renderer_vulkan/vk_rasterizer.cpp

6
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp

@ -845,10 +845,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
VK_DYNAMIC_STATE_LINE_WIDTH,
};
if (key.state.extended_dynamic_state) {
static constexpr std::array extended{
std::vector<VkDynamicState> extended{
VK_DYNAMIC_STATE_CULL_MODE_EXT,
VK_DYNAMIC_STATE_FRONT_FACE_EXT,
VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT,
VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT,
VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT,
VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT,
@ -856,6 +855,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT,
VK_DYNAMIC_STATE_STENCIL_OP_EXT,
};
if (!device.IsExtVertexInputDynamicStateSupported()) {
extended.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT);
}
if (key.state.dynamic_vertex_input) {
dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT);
}

6
src/video_core/renderer_vulkan/vk_rasterizer.cpp

@ -971,8 +971,6 @@ void RasterizerVulkan::UpdateDynamicStates() {
}
UpdateLogicOpEnable(regs);
UpdateDepthClampEnable(regs);
UpdateLineStippleEnable(regs);
UpdateConservativeRasterizationMode(regs);
}
}
if (device.IsExtExtendedDynamicState2ExtrasSupported()) {
@ -981,6 +979,10 @@ void RasterizerVulkan::UpdateDynamicStates() {
if (device.IsExtExtendedDynamicState3BlendingSupported()) {
UpdateBlending(regs);
}
if (device.IsExtExtendedDynamicState3EnablesSupported()) {
UpdateLineStippleEnable(regs);
UpdateConservativeRasterizationMode(regs);
}
}
if (device.IsExtVertexInputDynamicStateSupported()) {
if (auto* gp = pipeline_cache.CurrentGraphicsPipeline(); gp && gp->HasDynamicVertexInput()) {

Loading…
Cancel
Save