Update src/shader_recompiler/backend/spirv/emit_spirv.cpp
All checks were successful
eden-license / license-header (pull_request) Successful in 20s
All checks were successful
eden-license / license-header (pull_request) Successful in 20s
This commit is contained in:
parent
eabcaa2f3e
commit
97c0339619
1 changed files with 0 additions and 3 deletions
|
@ -476,7 +476,6 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct
|
||||||
void PatchPhiNodes(IR::Program& program, EmitContext& ctx) {
|
void PatchPhiNodes(IR::Program& program, EmitContext& ctx) {
|
||||||
// Flatten all leading PHIs from each block into a vector
|
// Flatten all leading PHIs from each block into a vector
|
||||||
std::vector<IR::Inst*> phi_instructions;
|
std::vector<IR::Inst*> phi_instructions;
|
||||||
phi_instructions.reserve(64); // guess; adjust/remove if unneeded
|
|
||||||
for (IR::Block* block : program.blocks) {
|
for (IR::Block* block : program.blocks) {
|
||||||
for (auto it = block->begin(); it != block->end(); ++it) {
|
for (auto it = block->begin(); it != block->end(); ++it) {
|
||||||
if (it->GetOpcode() != IR::Opcode::Phi)
|
if (it->GetOpcode() != IR::Opcode::Phi)
|
||||||
|
@ -505,8 +504,6 @@ void PatchPhiNodes(IR::Program& program, EmitContext& ctx) {
|
||||||
std::vector<u32> EmitSPIRV(const Profile& profile, const RuntimeInfo& runtime_info,
|
std::vector<u32> EmitSPIRV(const Profile& profile, const RuntimeInfo& runtime_info,
|
||||||
IR::Program& program, Bindings& bindings, bool optimize) {
|
IR::Program& program, Bindings& bindings, bool optimize) {
|
||||||
EmitContext ctx{profile, runtime_info, program, bindings};
|
EmitContext ctx{profile, runtime_info, program, bindings};
|
||||||
// Reserve capacity for interfaces to reduce allocations
|
|
||||||
ctx.interfaces.reserve(16);
|
|
||||||
const Id main{DefineMain(ctx, program)};
|
const Id main{DefineMain(ctx, program)};
|
||||||
DefineEntryPoint(program, ctx, main);
|
DefineEntryPoint(program, ctx, main);
|
||||||
if (profile.support_float_controls) {
|
if (profile.support_float_controls) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue