mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
gpu: compile RDNA2 tessellation through native LS HS and TES stages
This commit is contained in:
@@ -150,8 +150,20 @@ struct SampledResourcePair {
|
||||
bool operator==(const SampledResourcePair& other) const = default;
|
||||
};
|
||||
|
||||
enum class TessellationAttribute {
|
||||
LocalOutput,
|
||||
ControlInput,
|
||||
ControlOutput,
|
||||
EvaluationInput,
|
||||
PatchOutput,
|
||||
Factor
|
||||
};
|
||||
|
||||
enum class StageInputKind {
|
||||
VertexIndex,
|
||||
InvocationId,
|
||||
PrimitiveId,
|
||||
TessCoord,
|
||||
InstanceIndex,
|
||||
FragCoord,
|
||||
FrontFacing,
|
||||
@@ -287,8 +299,12 @@ static_assert(sizeof(PushData) == 128);
|
||||
constexpr uint32_t NativePushConstantSize = sizeof(PushData);
|
||||
|
||||
[[nodiscard]] constexpr uint32_t NativeBinding(ShaderType stage, DescriptorBindingKind kind) {
|
||||
const uint32_t group = stage == ShaderType::Pixel ? 1u
|
||||
: stage == ShaderType::TessellationControl ? 2u
|
||||
: stage == ShaderType::TessellationEvaluation ? 3u
|
||||
: 0u;
|
||||
return static_cast<uint32_t>(kind) +
|
||||
(stage == ShaderType::Pixel ? static_cast<uint32_t>(DescriptorBindingKind::Count) : 0u);
|
||||
group * static_cast<uint32_t>(DescriptorBindingKind::Count);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr ImageResourceClass ImageBindingResourceClass(DescriptorBindingKind kind) {
|
||||
|
||||
Reference in New Issue
Block a user