mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 13:30:07 +00:00
spv_shader_gen: Refactor EmitterIDs
to ModuleIds
This commit is contained in:
parent
1b370520d8
commit
591bc091da
@ -192,7 +192,7 @@ Id VertexModule::WriteFuncSanitizeVertex() {
|
||||
return func;
|
||||
}
|
||||
|
||||
void VertexModule::Generate(Common::UniqueFunction<void, Sirit::Module&, const EmitterIDs&> proc) {
|
||||
void VertexModule::Generate(Common::UniqueFunction<void, Sirit::Module&, const ModuleIds&> proc) {
|
||||
AddLabel(OpLabel());
|
||||
|
||||
ids.ptr_enable_clip1 = OpAccessChain(TypePointer(spv::StorageClass::Uniform, ids.u32),
|
||||
@ -209,7 +209,7 @@ void VertexModule::Generate(Common::UniqueFunction<void, Sirit::Module&, const E
|
||||
std::vector<u32> GenerateTrivialVertexShader(bool use_clip_planes) {
|
||||
VertexModule module;
|
||||
module.Generate([use_clip_planes](Sirit::Module& spv,
|
||||
const VertexModule::EmitterIDs& ids) -> void {
|
||||
const VertexModule::ModuleIds& ids) -> void {
|
||||
const Id pos_sanitized = spv.OpFunctionCall(
|
||||
ids.vec.Get(4), ids.sanitize_vertex, spv.OpLoad(ids.vec.Get(4), ids.vert_in_position));
|
||||
|
||||
|
@ -73,7 +73,7 @@ private:
|
||||
[[nodiscard]] Id WriteFuncSanitizeVertex();
|
||||
|
||||
public:
|
||||
struct EmitterIDs {
|
||||
struct ModuleIds {
|
||||
/// Types
|
||||
Id void_{};
|
||||
Id bool_{};
|
||||
@ -121,7 +121,7 @@ public:
|
||||
} ids;
|
||||
|
||||
/// Generate code using the provided SPIRV emitter context
|
||||
void Generate(Common::UniqueFunction<void, Sirit::Module&, const EmitterIDs&> proc);
|
||||
void Generate(Common::UniqueFunction<void, Sirit::Module&, const ModuleIds&> proc);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user