rsx: Implement point sprite coordinate generation

- When the point sprite flag is set, overrides the input similar to the
2D mask. The returned X and Y values are always the gl_PointCoord values
for the fragment.
- Stacks with the 2D mask to override the z and w coordinates.
This commit is contained in:
kd-11 2019-11-08 20:19:54 +03:00 committed by kd-11
parent 81c61e230f
commit 7072489a6e
5 changed files with 72 additions and 6 deletions

View file

@ -1698,6 +1698,13 @@ namespace rsx
result.redirected_textures = 0;
result.shadow_textures = 0;
if (method_registers.current_draw_clause.primitive == primitive_type::points &&
method_registers.point_sprite_enabled())
{
// Set high word of the control mask to store point sprite control
result.texcoord_control_mask |= u32(method_registers.point_sprite_control_mask()) << 16;
}
const auto resolution_scale = rsx::get_resolution_scale();
for (u32 i = 0; i < rsx::limits::fragment_textures_count; ++i)