mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[vk, settings] Disable VIDS on Android and Ungate Advanced EDS (#3281)
* the issue fixed by this PR (EDS Disabled) is the same as the one on 3096 (All EDS) Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3281 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-committed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
This commit is contained in:
parent
8440c2074d
commit
1370f23675
4 changed files with 11 additions and 31 deletions
|
|
@ -536,7 +536,13 @@ struct Values {
|
||||||
Category::RendererExtensions,
|
Category::RendererExtensions,
|
||||||
Specialization::Scalar};
|
Specialization::Scalar};
|
||||||
|
|
||||||
SwitchableSetting<bool> vertex_input_dynamic_state{linkage, true, "vertex_input_dynamic_state", Category::RendererExtensions};
|
SwitchableSetting<bool> vertex_input_dynamic_state{linkage,
|
||||||
|
#if defined (ANDROID)
|
||||||
|
false,
|
||||||
|
#else
|
||||||
|
true,
|
||||||
|
#endif
|
||||||
|
"vertex_input_dynamic_state", Category::RendererExtensions};
|
||||||
SwitchableSetting<bool> provoking_vertex{linkage, false, "provoking_vertex", Category::RendererExtensions};
|
SwitchableSetting<bool> provoking_vertex{linkage, false, "provoking_vertex", Category::RendererExtensions};
|
||||||
SwitchableSetting<bool> descriptor_indexing{linkage, false, "descriptor_indexing", Category::RendererExtensions};
|
SwitchableSetting<bool> descriptor_indexing{linkage, false, "descriptor_indexing", Category::RendererExtensions};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -816,23 +816,12 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
||||||
.blendConstants = {}
|
.blendConstants = {}
|
||||||
};
|
};
|
||||||
static_vector<VkDynamicState, 34> dynamic_states{
|
static_vector<VkDynamicState, 34> dynamic_states{
|
||||||
VK_DYNAMIC_STATE_VIEWPORT,
|
VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR,
|
||||||
VK_DYNAMIC_STATE_SCISSOR,
|
VK_DYNAMIC_STATE_DEPTH_BIAS, VK_DYNAMIC_STATE_BLEND_CONSTANTS,
|
||||||
VK_DYNAMIC_STATE_DEPTH_BIAS,
|
VK_DYNAMIC_STATE_DEPTH_BOUNDS, VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK,
|
||||||
|
VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, VK_DYNAMIC_STATE_STENCIL_REFERENCE,
|
||||||
VK_DYNAMIC_STATE_LINE_WIDTH,
|
VK_DYNAMIC_STATE_LINE_WIDTH,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (device.UsesAdvancedCoreDynamicState()) {
|
|
||||||
static constexpr std::array core_dynamic_states{
|
|
||||||
VK_DYNAMIC_STATE_BLEND_CONSTANTS,
|
|
||||||
VK_DYNAMIC_STATE_DEPTH_BOUNDS,
|
|
||||||
VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK,
|
|
||||||
VK_DYNAMIC_STATE_STENCIL_WRITE_MASK,
|
|
||||||
VK_DYNAMIC_STATE_STENCIL_REFERENCE,
|
|
||||||
};
|
|
||||||
dynamic_states.insert(dynamic_states.end(), core_dynamic_states.begin(),
|
|
||||||
core_dynamic_states.end());
|
|
||||||
}
|
|
||||||
if (key.state.extended_dynamic_state) {
|
if (key.state.extended_dynamic_state) {
|
||||||
static constexpr std::array extended{
|
static constexpr std::array extended{
|
||||||
VK_DYNAMIC_STATE_CULL_MODE_EXT,
|
VK_DYNAMIC_STATE_CULL_MODE_EXT,
|
||||||
|
|
|
||||||
|
|
@ -1233,9 +1233,6 @@ void RasterizerVulkan::UpdateBlendConstants(Tegra::Engines::Maxwell3D::Regs& reg
|
||||||
if (!state_tracker.TouchBlendConstants()) {
|
if (!state_tracker.TouchBlendConstants()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!device.UsesAdvancedCoreDynamicState()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const std::array blend_color = {regs.blend_color.r, regs.blend_color.g, regs.blend_color.b,
|
const std::array blend_color = {regs.blend_color.r, regs.blend_color.g, regs.blend_color.b,
|
||||||
regs.blend_color.a};
|
regs.blend_color.a};
|
||||||
scheduler.Record(
|
scheduler.Record(
|
||||||
|
|
@ -1246,9 +1243,6 @@ void RasterizerVulkan::UpdateDepthBounds(Tegra::Engines::Maxwell3D::Regs& regs)
|
||||||
if (!state_tracker.TouchDepthBounds()) {
|
if (!state_tracker.TouchDepthBounds()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!device.UsesAdvancedCoreDynamicState() || !device.IsDepthBoundsSupported()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
scheduler.Record([min = regs.depth_bounds[0], max = regs.depth_bounds[1]](
|
scheduler.Record([min = regs.depth_bounds[0], max = regs.depth_bounds[1]](
|
||||||
vk::CommandBuffer cmdbuf) { cmdbuf.SetDepthBounds(min, max); });
|
vk::CommandBuffer cmdbuf) { cmdbuf.SetDepthBounds(min, max); });
|
||||||
}
|
}
|
||||||
|
|
@ -1257,10 +1251,6 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
|
||||||
if (!state_tracker.TouchStencilProperties()) {
|
if (!state_tracker.TouchStencilProperties()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!device.UsesAdvancedCoreDynamicState()) {
|
|
||||||
state_tracker.ClearStencilReset();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bool update_references = state_tracker.TouchStencilReference();
|
bool update_references = state_tracker.TouchStencilReference();
|
||||||
bool update_write_mask = state_tracker.TouchStencilWriteMask();
|
bool update_write_mask = state_tracker.TouchStencilWriteMask();
|
||||||
bool update_compare_masks = state_tracker.TouchStencilCompare();
|
bool update_compare_masks = state_tracker.TouchStencilCompare();
|
||||||
|
|
|
||||||
|
|
@ -682,11 +682,6 @@ public:
|
||||||
return dynamic_state3_alpha_to_one;
|
return dynamic_state3_alpha_to_one;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true when the user enabled extended core dynamic states (level > 0).
|
|
||||||
bool UsesAdvancedCoreDynamicState() const {
|
|
||||||
return u32(Settings::values.dyna_state.GetValue()) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the device supports VK_EXT_vertex_input_dynamic_state.
|
/// Returns true if the device supports VK_EXT_vertex_input_dynamic_state.
|
||||||
bool IsExtVertexInputDynamicStateSupported() const {
|
bool IsExtVertexInputDynamicStateSupported() const {
|
||||||
return extensions.vertex_input_dynamic_state;
|
return extensions.vertex_input_dynamic_state;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue