mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 04:35:05 +01:00
video_core: Initialize unrefered attributes to 1.f (#6966)
This commit is contained in:
parent
8aee625a14
commit
542209c993
@ -1841,7 +1841,7 @@ struct Vertex {
|
||||
if (attrib < config.gs_output_attributes) {
|
||||
return fmt::format("vtx.attributes[{}].{}", attrib, "xyzw"[comp]);
|
||||
}
|
||||
return "0.0";
|
||||
return "1.0";
|
||||
};
|
||||
|
||||
out += "const float EPSILON_Z = 0.00000001f;\n\n";
|
||||
|
@ -1810,7 +1810,7 @@ layout (set = 0, binding = 0, std140) uniform vs_config {
|
||||
if (attrib < config.gs_output_attributes) {
|
||||
return fmt::format("vs_out_attr{}.{}", attrib, "xyzw"[comp]);
|
||||
}
|
||||
return "0.0";
|
||||
return "1.0";
|
||||
};
|
||||
|
||||
out += "const float EPSILON_Z = 0.00000001f;\n\n";
|
||||
@ -1900,7 +1900,7 @@ struct Vertex {
|
||||
if (attrib < config.gs_output_attributes) {
|
||||
return fmt::format("vtx.attributes[{}].{}", attrib, "xyzw"[comp]);
|
||||
}
|
||||
return "0.0";
|
||||
return "1.0";
|
||||
};
|
||||
|
||||
out += "const float EPSILON_Z = 0.00000001f;\n\n";
|
||||
|
@ -44,6 +44,10 @@ OutputVertex OutputVertex::FromAttributeBuffer(const RasterizerRegs& regs,
|
||||
std::array<f24, 32> vertex_slots_overflow;
|
||||
};
|
||||
|
||||
// Some games use attributes without setting them in GPUREG_SH_OUTMAP_Oi
|
||||
// Hardware tests have shown that they are initialized to 1.f in this case.
|
||||
vertex_slots_overflow.fill(f24::One());
|
||||
|
||||
// Assert that OutputVertex has enough space for 24 semantic registers
|
||||
static_assert(sizeof(std::array<f24, 24>) == sizeof(ret),
|
||||
"Struct and array have different sizes.");
|
||||
|
Loading…
Reference in New Issue
Block a user