mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-06 22:10:49 +00:00
experiment with depth ranges
This commit is contained in:
@@ -1299,10 +1299,18 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) {
|
void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) {
|
||||||
if (!state_tracker.TouchDepthBias()) {
|
const bool zeta_changed =
|
||||||
|
std::exchange(depth_bias_zeta_format, regs.zeta.format) != regs.zeta.format;
|
||||||
|
const bool bias_changed = state_tracker.TouchDepthBias();
|
||||||
|
if (!bias_changed && !zeta_changed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float units = regs.depth_bias / 2.0f;
|
float units = regs.depth_bias / 2.0f;
|
||||||
|
const bool is_float = regs.zeta.format == Tegra::DepthFormat::Z32_FLOAT ||
|
||||||
|
regs.zeta.format == Tegra::DepthFormat::Z32_FLOAT_X24S8_UINT;
|
||||||
|
if (is_float && !device.IsExtDepthBiasControlSupported()) {
|
||||||
|
units *= 256.0f;
|
||||||
|
}
|
||||||
const bool is_d24 = regs.zeta.format == Tegra::DepthFormat::Z24_UNORM_S8_UINT ||
|
const bool is_d24 = regs.zeta.format == Tegra::DepthFormat::Z24_UNORM_S8_UINT ||
|
||||||
regs.zeta.format == Tegra::DepthFormat::X8Z24_UNORM ||
|
regs.zeta.format == Tegra::DepthFormat::X8Z24_UNORM ||
|
||||||
regs.zeta.format == Tegra::DepthFormat::S8Z24_UNORM ||
|
regs.zeta.format == Tegra::DepthFormat::S8Z24_UNORM ||
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ private:
|
|||||||
boost::container::static_vector<VkSampler, MAX_TEXTURES> sampler_handles;
|
boost::container::static_vector<VkSampler, MAX_TEXTURES> sampler_handles;
|
||||||
|
|
||||||
u32 draw_counter = 0;
|
u32 draw_counter = 0;
|
||||||
|
Tegra::DepthFormat depth_bias_zeta_format{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|||||||
Reference in New Issue
Block a user