diff options
| author | 2021-03-25 20:27:09 +0100 | |
|---|---|---|
| committer | 2021-07-22 21:51:24 -0400 | |
| commit | f5672777c8af4700c9e0fc32af52cb2563f564f4 (patch) | |
| tree | abb38c87d961475efecff436f2c1a76247c5f8be /src/shader_recompiler/backend/spirv/emit_context.cpp | |
| parent | shader: Implement TLD4S. (diff) | |
| download | yuzu-f5672777c8af4700c9e0fc32af52cb2563f564f4.tar.gz yuzu-f5672777c8af4700c9e0fc32af52cb2563f564f4.tar.xz yuzu-f5672777c8af4700c9e0fc32af52cb2563f564f4.zip | |
shader: Implement FragDepth
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index 5db4a9082..3d028db0f 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp | |||
| @@ -359,6 +359,12 @@ void EmitContext::DefineOutputs(const Info& info) { | |||
| 359 | Decorate(frag_color[i], spv::Decoration::Location, static_cast<u32>(i)); | 359 | Decorate(frag_color[i], spv::Decoration::Location, static_cast<u32>(i)); |
| 360 | Name(frag_color[i], fmt::format("frag_color{}", i)); | 360 | Name(frag_color[i], fmt::format("frag_color{}", i)); |
| 361 | } | 361 | } |
| 362 | if (!info.stores_frag_depth) { | ||
| 363 | return; | ||
| 364 | } | ||
| 365 | frag_depth = DefineOutput(*this, F32[1]); | ||
| 366 | Decorate(frag_depth, spv::Decoration::BuiltIn, static_cast<u32>(spv::BuiltIn::FragDepth)); | ||
| 367 | Name(frag_depth, "frag_depth"); | ||
| 362 | } | 368 | } |
| 363 | } | 369 | } |
| 364 | 370 | ||