mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 10:52:53 +00:00
Move default_attributes into Pica state
This commit is contained in:
parent
f6eb62d062
commit
6c6d99ca51
|
@ -74,7 +74,7 @@ void GraphicsTracingWidget::StartRecording() {
|
|||
std::array<u32, 4 * 16> default_attributes;
|
||||
for (unsigned i = 0; i < 16; ++i) {
|
||||
for (unsigned comp = 0; comp < 3; ++comp) {
|
||||
default_attributes[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.default_attributes[i][comp].ToFloat32());
|
||||
default_attributes[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs_default_attributes[i][comp].ToFloat32());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||
|
||||
// TODO: Verify that this actually modifies the register!
|
||||
if (setup.index < 15) {
|
||||
g_state.vs.default_attributes[setup.index] = attribute;
|
||||
g_state.vs_default_attributes[setup.index] = attribute;
|
||||
setup.index++;
|
||||
} else {
|
||||
// Put each attribute into an immediate input buffer.
|
||||
|
|
|
@ -25,6 +25,8 @@ struct State {
|
|||
Shader::ShaderSetup vs;
|
||||
Shader::ShaderSetup gs;
|
||||
|
||||
std::array<Math::Vec4<float24>, 16> vs_default_attributes;
|
||||
|
||||
struct {
|
||||
union LutEntry {
|
||||
// Used for raw access
|
||||
|
|
|
@ -340,8 +340,6 @@ struct ShaderSetup {
|
|||
std::array<Math::Vec4<u8>, 4> i;
|
||||
} uniforms;
|
||||
|
||||
Math::Vec4<float24> default_attributes[16];
|
||||
|
||||
std::array<u32, 1024> program_code;
|
||||
std::array<u32, 1024> swizzle_data;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ void VertexLoader::LoadVertex(u32 base_address, int index, int vertex, Shader::I
|
|||
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
|
||||
} else if (vertex_attribute_is_default[i]) {
|
||||
// Load the default attribute if we're configured to do so
|
||||
input.attr[i] = g_state.vs.default_attributes[i];
|
||||
input.attr[i] = g_state.vs_default_attributes[i];
|
||||
LOG_TRACE(HW_GPU, "Loaded default attribute %x for vertex %x (index %x): (%f, %f, %f, %f)",
|
||||
i, vertex, index,
|
||||
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
|
||||
|
|
Loading…
Reference in a new issue