mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-16 04:09:07 +00:00
vk: Fix user clip planes
This commit is contained in:
parent
ce304f33de
commit
f3e34e1d44
@ -177,11 +177,11 @@ namespace glsl
|
||||
enabled_options.push_back("_ENABLE_LIT_EMULATION");
|
||||
}
|
||||
|
||||
if (props.require_clip_functions)
|
||||
if (props.require_clip_plane_functions)
|
||||
{
|
||||
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 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";
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ namespace glsl
|
||||
bool require_lit_emulation : 1;
|
||||
bool require_explicit_invariance : 1;
|
||||
bool require_instanced_render : 1;
|
||||
bool require_clip_functions : 1;
|
||||
bool require_clip_plane_functions : 1;
|
||||
bool emulate_zclip_transform : 1;
|
||||
bool emulate_depth_clip_only : 1;
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ namespace vk
|
||||
::glsl::shader_properties properties{};
|
||||
properties.domain = ::glsl::program_domain::glsl_vertex_program;
|
||||
properties.require_lit_emulation = true;
|
||||
properties.require_clip_functions = true;
|
||||
properties.require_clip_plane_functions = true;
|
||||
|
||||
RSXVertexProgram null_prog;
|
||||
std::string shader_str;
|
||||
|
||||
@ -334,7 +334,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||
glsl::shader_properties properties2{};
|
||||
properties2.domain = glsl::glsl_vertex_program;
|
||||
properties2.require_lit_emulation = properties.has_lit_op;
|
||||
properties2.require_clip_functions = true;
|
||||
properties2.require_clip_plane_functions = true;
|
||||
properties2.emulate_zclip_transform = true;
|
||||
properties2.emulate_depth_clip_only = vk::g_render_device->get_shader_types_support().allow_float64;
|
||||
properties2.low_precision_tests = vk::is_NVIDIA(vk::get_driver_vendor());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user