mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-23 03:28:58 +02:00
fix polygon lut name issue
This commit is contained in:
parent
ed11b4860b
commit
94bbcc0b2a
2 changed files with 39 additions and 39 deletions
|
|
@ -18,27 +18,6 @@
|
|||
|
||||
namespace Vulkan {
|
||||
namespace {
|
||||
constexpr size_t POINT = 0;
|
||||
constexpr size_t LINE = 1;
|
||||
constexpr size_t POLYGON = 2;
|
||||
constexpr std::array POLYGON_OFFSET_ENABLE_LUT = {
|
||||
POINT, // Points
|
||||
LINE, // Lines
|
||||
LINE, // LineLoop
|
||||
LINE, // LineStrip
|
||||
POLYGON, // Triangles
|
||||
POLYGON, // TriangleStrip
|
||||
POLYGON, // TriangleFan
|
||||
POLYGON, // Quads
|
||||
POLYGON, // QuadStrip
|
||||
POLYGON, // Polygon
|
||||
LINE, // LinesAdjacency
|
||||
LINE, // LineStripAdjacency
|
||||
POLYGON, // TrianglesAdjacency
|
||||
POLYGON, // TriangleStripAdjacency
|
||||
POLYGON, // Patches
|
||||
};
|
||||
|
||||
void RefreshXfbState(VideoCommon::TransformFeedbackState& state, const Maxwell& regs) {
|
||||
std::ranges::transform(regs.transform_feedback.controls, state.layouts.begin(),
|
||||
[](const auto& layout) {
|
||||
|
|
@ -292,6 +271,27 @@ void FixedPipelineState::DynamicState::Refresh2(const Maxwell& regs,
|
|||
|
||||
rasterize_enable.Assign(regs.rasterize_enable != 0 ? 1 : 0);
|
||||
primitive_restart_enable.Assign(regs.primitive_restart.enabled != 0 ? 1 : 0);
|
||||
|
||||
constexpr size_t ENABLE_POINT = 0;
|
||||
constexpr size_t ENABLE_LINE = 1;
|
||||
constexpr size_t ENABLE_POLYGON = 2;
|
||||
constexpr std::array POLYGON_OFFSET_ENABLE_LUT = {
|
||||
ENABLE_POINT, // Points
|
||||
ENABLE_LINE, // Lines
|
||||
ENABLE_LINE, // LineLoop
|
||||
ENABLE_LINE, // LineStrip
|
||||
ENABLE_POLYGON, // Triangles
|
||||
ENABLE_POLYGON, // TriangleStrip
|
||||
ENABLE_POLYGON, // TriangleFan
|
||||
ENABLE_POLYGON, // Quads
|
||||
ENABLE_POLYGON, // QuadStrip
|
||||
ENABLE_POLYGON, // Polygon
|
||||
ENABLE_LINE, // LinesAdjacency
|
||||
ENABLE_LINE, // LineStripAdjacency
|
||||
ENABLE_POLYGON, // TrianglesAdjacency
|
||||
ENABLE_POLYGON, // TriangleStripAdjacency
|
||||
ENABLE_POLYGON, // Patches
|
||||
};
|
||||
depth_bias_enable.Assign(enabled_lut[POLYGON_OFFSET_ENABLE_LUT[topology_index]] != 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1467,25 +1467,25 @@ void RasterizerVulkan::UpdateDepthBiasEnable(Tegra::Engines::Maxwell3D::Regs& re
|
|||
if (!state_tracker.TouchDepthBiasEnable()) {
|
||||
return;
|
||||
}
|
||||
constexpr size_t POINT = 0;
|
||||
constexpr size_t LINE = 1;
|
||||
constexpr size_t POLYGON = 2;
|
||||
constexpr size_t ENABLE_POINT = 0;
|
||||
constexpr size_t ENABLE_LINE = 1;
|
||||
constexpr size_t ENABLE_POLYGON = 2;
|
||||
static constexpr std::array POLYGON_OFFSET_ENABLE_LUT = {
|
||||
POINT, // Points
|
||||
LINE, // Lines
|
||||
LINE, // LineLoop
|
||||
LINE, // LineStrip
|
||||
POLYGON, // Triangles
|
||||
POLYGON, // TriangleStrip
|
||||
POLYGON, // TriangleFan
|
||||
POLYGON, // Quads
|
||||
POLYGON, // QuadStrip
|
||||
POLYGON, // Polygon
|
||||
LINE, // LinesAdjacency
|
||||
LINE, // LineStripAdjacency
|
||||
POLYGON, // TrianglesAdjacency
|
||||
POLYGON, // TriangleStripAdjacency
|
||||
POLYGON, // Patches
|
||||
ENABLE_POINT, // Points
|
||||
ENABLE_LINE, // Lines
|
||||
ENABLE_LINE, // LineLoop
|
||||
ENABLE_LINE, // LineStrip
|
||||
ENABLE_POLYGON, // Triangles
|
||||
ENABLE_POLYGON, // TriangleStrip
|
||||
ENABLE_POLYGON, // TriangleFan
|
||||
ENABLE_POLYGON, // Quads
|
||||
ENABLE_POLYGON, // QuadStrip
|
||||
ENABLE_POLYGON, // Polygon
|
||||
ENABLE_LINE, // LinesAdjacency
|
||||
ENABLE_LINE, // LineStripAdjacency
|
||||
ENABLE_POLYGON, // TrianglesAdjacency
|
||||
ENABLE_POLYGON, // TriangleStripAdjacency
|
||||
ENABLE_POLYGON, // Patches
|
||||
};
|
||||
const std::array enabled_lut{
|
||||
regs.polygon_offset_point_enable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue