rsx: Fix user clip plane encode/decode
This commit is contained in:
@@ -589,7 +589,7 @@ namespace rsx
|
||||
{
|
||||
if (REGS(m_ctx)->clip_planes_mask() == 0) [[ likely ]]
|
||||
{
|
||||
*reinterpret_cast<u32*>(buffer) = 0u;
|
||||
*reinterpret_cast<u32*>(buffer) = 0b0101010101010101;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ namespace rsx
|
||||
break;
|
||||
|
||||
case rsx::user_clip_plane_op::less_than:
|
||||
clip_configuration_field |= CLIP_DISTANCE_FACTOR(2) << shift_offset;
|
||||
clip_configuration_field |= CLIP_DISTANCE_FACTOR(-1) << shift_offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace glsl
|
||||
OS <<
|
||||
"#define CLIP_PLANE_DISABLED 1\n"
|
||||
"#define is_user_clip_enabled(idx) (_get_bits(get_user_clip_config(), idx * 2, 2) != CLIP_PLANE_DISABLED)\n"
|
||||
"#define user_clip_factor(idx) float(_get_bits(get_user_clip_config(), idx * 2, 2) - 1)\n\n";
|
||||
"#define user_clip_factor(idx) (float(_get_bits(get_user_clip_config(), idx * 2, 2)) - 1.f)\n\n";
|
||||
}
|
||||
|
||||
if (props.domain == glsl::program_domain::glsl_fragment_program)
|
||||
|
||||
Reference in New Issue
Block a user