mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
shader_recompiler: Implement guest barycentrics (#3245)
* shader_recompiler: Implement guest barycentrics * Review comments and some cleanup
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
@@ -135,6 +136,16 @@ struct PushData {
|
||||
static_assert(sizeof(PushData) <= 128,
|
||||
"PushData size is greater than minimum size guaranteed by Vulkan spec");
|
||||
|
||||
enum class Qualifier : u8 {
|
||||
None,
|
||||
Smooth,
|
||||
NoPerspective,
|
||||
PerVertex,
|
||||
Flat,
|
||||
Centroid,
|
||||
Sample,
|
||||
};
|
||||
|
||||
/**
|
||||
* Contains general information generated by the shader recompiler for an input program.
|
||||
*/
|
||||
@@ -194,7 +205,11 @@ struct Info {
|
||||
PersistentSrtInfo srt_info;
|
||||
std::vector<u32> flattened_ud_buf;
|
||||
|
||||
std::array<IR::Interpolation, 32> interp_qualifiers{};
|
||||
struct Interpolation {
|
||||
Qualifier primary;
|
||||
Qualifier auxiliary;
|
||||
};
|
||||
std::array<Interpolation, IR::NumParams> fs_interpolation{};
|
||||
|
||||
IR::ScalarReg tess_consts_ptr_base = IR::ScalarReg::Max;
|
||||
s32 tess_consts_dword_offset = -1;
|
||||
@@ -209,8 +224,6 @@ struct Info {
|
||||
bool has_discard{};
|
||||
bool has_image_gather{};
|
||||
bool has_image_query{};
|
||||
bool has_perspective_interp{};
|
||||
bool has_linear_interp{};
|
||||
bool uses_buffer_atomic_float_min_max{};
|
||||
bool uses_image_atomic_float_min_max{};
|
||||
bool uses_lane_id{};
|
||||
|
||||
Reference in New Issue
Block a user