diff options
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index f110fd7f8..edff04a44 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -374,8 +374,9 @@ std::string_view GetTessSpacing(TessSpacing spacing) { | |||
| 374 | } | 374 | } |
| 375 | } // Anonymous namespace | 375 | } // Anonymous namespace |
| 376 | 376 | ||
| 377 | std::string EmitGLASM(const Profile& profile, IR::Program& program, Bindings& bindings) { | 377 | std::string EmitGLASM(const Profile& profile, const RuntimeInfo& runtime_info, IR::Program& program, |
| 378 | EmitContext ctx{program, bindings, profile}; | 378 | Bindings& bindings) { |
| 379 | EmitContext ctx{program, bindings, profile, runtime_info}; | ||
| 379 | Precolor(ctx, program); | 380 | Precolor(ctx, program); |
| 380 | EmitCode(ctx, program); | 381 | EmitCode(ctx, program); |
| 381 | std::string header{StageHeader(program.stage)}; | 382 | std::string header{StageHeader(program.stage)}; |
| @@ -385,18 +386,18 @@ std::string EmitGLASM(const Profile& profile, IR::Program& program, Bindings& bi | |||
| 385 | header += fmt::format("VERTICES_OUT {};", program.invocations); | 386 | header += fmt::format("VERTICES_OUT {};", program.invocations); |
| 386 | break; | 387 | break; |
| 387 | case Stage::TessellationEval: | 388 | case Stage::TessellationEval: |
| 388 | header += | 389 | header += fmt::format("TESS_MODE {};" |
| 389 | fmt::format("TESS_MODE {};" | 390 | "TESS_SPACING {};" |
| 390 | "TESS_SPACING {};" | 391 | "TESS_VERTEX_ORDER {};", |
| 391 | "TESS_VERTEX_ORDER {};", | 392 | GetTessMode(runtime_info.tess_primitive), |
| 392 | GetTessMode(profile.tess_primitive), GetTessSpacing(profile.tess_spacing), | 393 | GetTessSpacing(runtime_info.tess_spacing), |
| 393 | profile.tess_clockwise ? "CW" : "CCW"); | 394 | runtime_info.tess_clockwise ? "CW" : "CCW"); |
| 394 | break; | 395 | break; |
| 395 | case Stage::Geometry: | 396 | case Stage::Geometry: |
| 396 | header += fmt::format("PRIMITIVE_IN {};" | 397 | header += fmt::format("PRIMITIVE_IN {};" |
| 397 | "PRIMITIVE_OUT {};" | 398 | "PRIMITIVE_OUT {};" |
| 398 | "VERTICES_OUT {};", | 399 | "VERTICES_OUT {};", |
| 399 | InputPrimitive(profile.input_topology), | 400 | InputPrimitive(runtime_info.input_topology), |
| 400 | OutputPrimitive(program.output_topology), program.output_vertices); | 401 | OutputPrimitive(program.output_topology), program.output_vertices); |
| 401 | break; | 402 | break; |
| 402 | case Stage::Compute: | 403 | case Stage::Compute: |