mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 11:26:56 +02:00
shader: run merged geometry stages as mesh shaders
Co-authored-by: Brandon Strong <brandostrong@gmail.com> Co-authored-by: fxpw <fxpw@outlook.com> Co-authored-by: shadowbeat070 <70843316+shadowbeat070@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "common/debug.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
namespace Libs::Graphics::ShaderRecompiler::Spirv {
|
||||
@@ -190,6 +191,18 @@ void Builder::AddEntryPoint(uint32_t execution_model, uint32_t entry_point, cons
|
||||
std::vector<uint32_t> operands = {execution_model, entry_point};
|
||||
AppendString(operands, name);
|
||||
operands.insert(operands.end(), interfaces.begin(), interfaces.end());
|
||||
if (m_version >= 0x00010400u) {
|
||||
for (size_t offset = 0; offset < m_declarations.size();) {
|
||||
const auto count = m_declarations[offset] >> 16u;
|
||||
if ((m_declarations[offset] & 0xffffu) == 59u) {
|
||||
const auto id = m_declarations[offset + 2u];
|
||||
if (std::find(interfaces.begin(), interfaces.end(), id) == interfaces.end()) {
|
||||
operands.push_back(id);
|
||||
}
|
||||
}
|
||||
offset += count;
|
||||
}
|
||||
}
|
||||
AppendInstruction(m_entry_points, 15u, operands);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user