mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Chore] (MG_State/ProgramObject): rename attrib to vertex in for clarity
This commit is contained in:
@@ -9,8 +9,8 @@ namespace MobileGL {
|
||||
const glslang::TType& type = ent.symbol->getType();
|
||||
const glslang::TString& name = ent.symbol->getAccessName();
|
||||
if (currentStage == EShLangVertex && type.getQualifier().isPipeInput()) {
|
||||
auto it = m_explicitAttribLocations.find(name.c_str());
|
||||
if (it != m_explicitAttribLocations.end()) {
|
||||
auto it = m_explicitVertexIns.find(name.c_str());
|
||||
if (it != m_explicitVertexIns.end()) {
|
||||
auto& writableType = ent.symbol->getWritableType();
|
||||
writableType.getQualifier().layoutLocation = it->second;
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@ namespace MobileGL {
|
||||
class TMglGlslIoResolver: public glslang::TDefaultGlslIoResolver {
|
||||
public:
|
||||
using ExplicitVarSlotMap = UnorderedMap<String, Uint>;
|
||||
TMglGlslIoResolver(const glslang::TIntermediate& intermediate, const ExplicitVarSlotMap& attribLocations):
|
||||
TDefaultGlslIoResolver(intermediate), m_explicitAttribLocations(attribLocations) {}
|
||||
TMglGlslIoResolver(const glslang::TProgram& program, const EShLanguage stage, const ExplicitVarSlotMap& attribLocations):
|
||||
TDefaultGlslIoResolver(*program.getIntermediate(stage)),
|
||||
m_explicitAttribLocations(attribLocations) {}
|
||||
TMglGlslIoResolver(const glslang::TIntermediate& intermediate, const ExplicitVarSlotMap& vertexIns, const ExplicitVarSlotMap& fragOuts):
|
||||
TDefaultGlslIoResolver(intermediate), m_explicitVertexIns(vertexIns), m_explicitFragOuts(fragOuts) {}
|
||||
TMglGlslIoResolver(const glslang::TProgram& program, const EShLanguage stage, const ExplicitVarSlotMap& vertexIns, const ExplicitVarSlotMap& fragOuts):
|
||||
TMglGlslIoResolver(*program.getIntermediate(stage), vertexIns, fragOuts) {}
|
||||
void reserverStorageSlot(glslang::TVarEntryInfo& ent, TInfoSink& infoSink) override;
|
||||
protected:
|
||||
const ExplicitVarSlotMap& m_explicitAttribLocations;
|
||||
const ExplicitVarSlotMap& m_explicitVertexIns;
|
||||
const ExplicitVarSlotMap& m_explicitFragOuts;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user