Merge pull request #2870 from FernandoS27/multi-draw
Implement a MME Draw commands Inliner and correct host instance drawing
This commit is contained in:
commit
9d69206cd0
9 changed files with 273 additions and 91 deletions
|
@ -114,6 +114,18 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (index == Attribute::Index::TessCoordInstanceIDVertexID) {
|
||||
switch (element) {
|
||||
case 2:
|
||||
uses_instance_id = true;
|
||||
break;
|
||||
case 3:
|
||||
uses_vertex_id = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (index == Attribute::Index::ClipDistances0123 ||
|
||||
index == Attribute::Index::ClipDistances4567) {
|
||||
const auto clip_index =
|
||||
|
|
|
@ -124,6 +124,14 @@ public:
|
|||
return uses_point_size;
|
||||
}
|
||||
|
||||
bool UsesInstanceId() const {
|
||||
return uses_instance_id;
|
||||
}
|
||||
|
||||
bool UsesVertexId() const {
|
||||
return uses_vertex_id;
|
||||
}
|
||||
|
||||
bool HasPhysicalAttributes() const {
|
||||
return uses_physical_attributes;
|
||||
}
|
||||
|
@ -373,6 +381,8 @@ private:
|
|||
bool uses_viewport_index{};
|
||||
bool uses_point_size{};
|
||||
bool uses_physical_attributes{}; // Shader uses AL2P or physical attribute read/writes
|
||||
bool uses_instance_id{};
|
||||
bool uses_vertex_id{};
|
||||
|
||||
Tegra::Shader::Header header;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue