mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-25 09:31:21 -08:00
vk_shader_decompiler: Skip NDC correction when it is native
Avoid changing gl_Position when the NDC used by the game is [0, 1] (Vulkan's native).
This commit is contained in:
parent
485c21eac3
commit
de918ebeb0
@ -1841,7 +1841,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PreExit() {
|
void PreExit() {
|
||||||
if (stage == ShaderType::Vertex) {
|
if (stage == ShaderType::Vertex && specialization.ndc_minus_one_to_one) {
|
||||||
const u32 position_index = out_indices.position.value();
|
const u32 position_index = out_indices.position.value();
|
||||||
const Id z_pointer = AccessElement(t_out_float, out_vertex, position_index, 2U);
|
const Id z_pointer = AccessElement(t_out_float, out_vertex, position_index, 2U);
|
||||||
const Id w_pointer = AccessElement(t_out_float, out_vertex, position_index, 3U);
|
const Id w_pointer = AccessElement(t_out_float, out_vertex, position_index, 3U);
|
||||||
|
@ -94,6 +94,7 @@ struct Specialization final {
|
|||||||
Maxwell::PrimitiveTopology primitive_topology{};
|
Maxwell::PrimitiveTopology primitive_topology{};
|
||||||
std::optional<float> point_size{};
|
std::optional<float> point_size{};
|
||||||
std::array<Maxwell::VertexAttribute::Type, Maxwell::NumVertexAttributes> attribute_types{};
|
std::array<Maxwell::VertexAttribute::Type, Maxwell::NumVertexAttributes> attribute_types{};
|
||||||
|
bool ndc_minus_one_to_one{};
|
||||||
|
|
||||||
// Tessellation specific
|
// Tessellation specific
|
||||||
struct {
|
struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user