mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Vertex program output fixes
This commit is contained in:
parent
07f0c7b4a5
commit
c5975d5f66
8 changed files with 120 additions and 103 deletions
|
@ -601,32 +601,35 @@ namespace rsx
|
|||
rsx::method_registers.clip_plane_5_enabled(),
|
||||
};
|
||||
|
||||
std::array<f32, 8> tmp{};
|
||||
s32 clip_enabled_flags[8] = {};
|
||||
f32 clip_distance_factors[8] = {};
|
||||
|
||||
for (int index = 0; index < 6; ++index)
|
||||
{
|
||||
f32 value = 0;
|
||||
switch (clip_plane_control[index])
|
||||
{
|
||||
default:
|
||||
LOG_ERROR(RSX, "bad clip plane control (0x%x)", (u8)clip_plane_control[index]);
|
||||
|
||||
case rsx::user_clip_plane_op::disable:
|
||||
value = 0.f;
|
||||
clip_enabled_flags[index] = 0;
|
||||
clip_distance_factors[index] = 0.f;
|
||||
break;
|
||||
|
||||
case rsx::user_clip_plane_op::greater_or_equal:
|
||||
value = 1.f;
|
||||
clip_enabled_flags[index] = 1;
|
||||
clip_distance_factors[index] = 1.f;
|
||||
break;
|
||||
|
||||
case rsx::user_clip_plane_op::less_than:
|
||||
value = -1.f;
|
||||
clip_enabled_flags[index] = 1;
|
||||
clip_distance_factors[index] = -1.f;
|
||||
break;
|
||||
}
|
||||
|
||||
tmp[index] = value;
|
||||
}
|
||||
stream_vector_from_memory((char*)buffer, tmp.data());
|
||||
stream_vector_from_memory((char*)buffer + 16, &tmp[4]);
|
||||
|
||||
memcpy(buffer, clip_enabled_flags, 32);
|
||||
memcpy((char*)buffer + 32, clip_distance_factors, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue