mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-25 21:57:05 +02:00
[vk, rasterizer, state_tracker] LineMode disabled from scheduler
This commit is contained in:
parent
07a5bffa2d
commit
4f83aeab9b
3 changed files with 20 additions and 10 deletions
|
|
@ -1014,6 +1014,7 @@ void RasterizerVulkan::UpdateDynamicStates() {
|
||||||
}
|
}
|
||||||
UpdateLogicOpEnable(regs);
|
UpdateLogicOpEnable(regs);
|
||||||
UpdateDepthClampEnable(regs);
|
UpdateDepthClampEnable(regs);
|
||||||
|
UpdateLineRasterizationMode(regs);
|
||||||
UpdateLineStippleEnable(regs);
|
UpdateLineStippleEnable(regs);
|
||||||
UpdateConservativeRasterizationMode(regs);
|
UpdateConservativeRasterizationMode(regs);
|
||||||
UpdateAlphaToCoverageEnable(regs);
|
UpdateAlphaToCoverageEnable(regs);
|
||||||
|
|
@ -1396,17 +1397,19 @@ void RasterizerVulkan::UpdateLineStippleEnable(Tegra::Engines::Maxwell3D::Regs&
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::UpdateLineRasterizationMode(Tegra::Engines::Maxwell3D::Regs& regs) {
|
void RasterizerVulkan::UpdateLineRasterizationMode(Tegra::Engines::Maxwell3D::Regs& regs) {
|
||||||
// if (!state_tracker.TouchLi()) {
|
if (!device.IsExtLineRasterizationSupported()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
if (!state_tracker.TouchLineRasterizationMode()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: The maxwell emulator does not capture line rasters
|
const VkLineRasterizationModeEXT mode =
|
||||||
|
regs.line_anti_alias_enable != 0 ? VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT
|
||||||
// scheduler.Record([enable = regs.line](vk::CommandBuffer cmdbuf) {
|
: VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
|
||||||
// cmdbuf.SetConservativeRasterizationModeEXT(
|
scheduler.Record([mode](vk::CommandBuffer cmdbuf) {
|
||||||
// enable ? VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT
|
cmdbuf.SetLineRasterizationModeEXT(mode);
|
||||||
// : VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT);
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::UpdateDepthBiasEnable(Tegra::Engines::Maxwell3D::Regs& regs) {
|
void RasterizerVulkan::UpdateDepthBiasEnable(Tegra::Engines::Maxwell3D::Regs& regs) {
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ Flags MakeInvalidationFlags() {
|
||||||
DepthClampEnable,
|
DepthClampEnable,
|
||||||
AlphaToCoverageEnable,
|
AlphaToCoverageEnable,
|
||||||
AlphaToOneEnable,
|
AlphaToOneEnable,
|
||||||
|
LineRasterizationMode,
|
||||||
LogicOp,
|
LogicOp,
|
||||||
Blending,
|
Blending,
|
||||||
ColorMask,
|
ColorMask,
|
||||||
|
|
@ -231,6 +232,7 @@ void SetupRasterModes(Tables &tables) {
|
||||||
|
|
||||||
table[OFF(line_stipple_params)] = LineStippleParams;
|
table[OFF(line_stipple_params)] = LineStippleParams;
|
||||||
table[OFF(conservative_raster_enable)] = ConservativeRasterizationMode;
|
table[OFF(conservative_raster_enable)] = ConservativeRasterizationMode;
|
||||||
|
table[OFF(line_anti_alias_enable)] = LineRasterizationMode;
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ enum : u8 {
|
||||||
PrimitiveRestartEnable,
|
PrimitiveRestartEnable,
|
||||||
RasterizerDiscardEnable,
|
RasterizerDiscardEnable,
|
||||||
ConservativeRasterizationMode,
|
ConservativeRasterizationMode,
|
||||||
|
LineRasterizationMode,
|
||||||
LineStippleEnable,
|
LineStippleEnable,
|
||||||
LineStippleParams,
|
LineStippleParams,
|
||||||
DepthBiasEnable,
|
DepthBiasEnable,
|
||||||
|
|
@ -271,6 +272,10 @@ public:
|
||||||
return Exchange(Dirty::LogicOp, false);
|
return Exchange(Dirty::LogicOp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TouchLineRasterizationMode() {
|
||||||
|
return Exchange(Dirty::LineRasterizationMode, false);
|
||||||
|
}
|
||||||
|
|
||||||
bool ChangePrimitiveTopology(Maxwell::PrimitiveTopology new_topology) {
|
bool ChangePrimitiveTopology(Maxwell::PrimitiveTopology new_topology) {
|
||||||
const bool has_changed = current_topology != new_topology;
|
const bool has_changed = current_topology != new_topology;
|
||||||
current_topology = new_topology;
|
current_topology = new_topology;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue