aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shader_recompiler: translate Switch 2 task and mesh programsTakoroka3 days1-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Mario Kart World draws some of its geometry with NVN task and mesh programs (the task program culls and writes the mesh workgroup count and a payload to its stage buffer; each mesh workgroup reads it back and writes vertices and primitives). Add Task and Mesh stages and translate them for VK_EXT_mesh_shader: - the ISBE pseudo instruction from the lowering becomes reads and writes of an emulated stage buffer: the task's output region is the task payload, the mesh output regions live in workgroup memory - every EXIT of these stages jumps to one final return, so all invocations reach the epilogue: a barrier, then OpEmitMeshTasksEXT, or OpSetMeshOutputsEXT and a copy of the 32-element vertex and primitive groups (lines named by the mesh header's and the pass-through geometry header's output maps) to arrayed and per-primitive outputs - Sirit lacks the two mesh instructions: they are emitted as OpStore markers and replaced after assembly - fragment inputs a mesh program writes per primitive get PerPrimitiveEXT The captured task and mesh programs of the title translate to SPIR-V that spirv-val accepts.
* emit_glasm: Fix lmem size computationameerj2023-06-251-1/+1
|
* glasm: Add MS sampler typesameerj2023-01-271-0/+2
|
* shader: Implement miss attribute layerFengChen2022-11-171-0/+1
|
* Merge pull request #8858 from vonchenplus/mipmapbunnei2022-11-031-0/+3
|\ | | | | video_core: Generate mipmap texture by drawing
| * video_core: Generate mipmap texture by drawingFengChen2022-09-201-0/+3
| |
* | chore: fix some typosAndrea Pappacoda2022-09-231-1/+1
|/ | | | Fix some typos reported by Lintian
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* shader_recompiler: Adjust emit_context includesameerj2021-12-051-1/+1
|
* glsl/glasm: Pass and use scaling parameters in shadersReinUsesLisp2021-11-161-0/+3
|
* emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()Lioncash2021-07-261-1/+1
| | | | This should be LINES_ADJACENCY
* shader: Avoid usage of C++20 ranges to build in clangReinUsesLisp2021-07-221-2/+5
|
* glasm: Add passthrough geometry shader supportReinUsesLisp2021-07-221-5/+23
|
* shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-221-2/+4
| | | | | | Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
* shader: Move loop safety tests to code emissionReinUsesLisp2021-07-221-0/+17
|
* glasm: Implement SetAttribute ViewportMaskameerj2021-07-221-1/+2
|
* shader: Split profile and runtime info headersReinUsesLisp2021-07-221-0/+1
|
* shader: Add loggingReinUsesLisp2021-07-221-1/+1
|
* glasm: Use ARB_derivative_control conditionallyReinUsesLisp2021-07-221-3/+4
|
* opengl: Declare fragment outputs even if they are not usedReinUsesLisp2021-07-221-2/+1
| | | | | | Fixes Ori and the Blind Forest's menu on GLASM. For some reason (probably high level optimizations) it is not sanitized on SPIR-V for OpenGL. Vulkan is unaffected by this change.
* glasm: Reduce reg allocation leaks from an exception to a logReinUsesLisp2021-07-221-1/+1
|
* glasm: Implement Y directionReinUsesLisp2021-07-221-0/+3
|
* glasm: Release phi node registers after they are no longer neededReinUsesLisp2021-07-221-31/+22
|
* glasm: Remove unnecessary value typesReinUsesLisp2021-07-221-11/+1
|
* glasm: Throw when there are register leaksReinUsesLisp2021-07-221-0/+3
|
* glasm: Catch more register leaksReinUsesLisp2021-07-221-1/+7
| | | | | | | | | | | | | Add support for null registers. These are used when an instruction has no usages. This comes handy when an instruction is only used for its CC value, with the caveat of having to invalidate all pseudo-instructions before defining the instruction itself in the register allocator. This commits changes this. Workaround a bug on Nvidia's condition codes conditional execution using branches.
* glasm: Fix usage counting on phi nodesReinUsesLisp2021-07-221-3/+9
|
* gl_shader_cache,glasm: Conditionally use typeless image reads extensionReinUsesLisp2021-07-221-2/+4
|
* glasm: Implement forced early ZReinUsesLisp2021-07-221-2/+6
|
* shader: Split profile and runtime information in separate structsReinUsesLisp2021-07-221-9/+10
|
* glasm: Implement FSWZADDameerj2021-07-221-1/+15
|
* glasm: Fix tessellation headersReinUsesLisp2021-07-221-2/+2
|
* glasm: Add tessellation shader declarationsReinUsesLisp2021-07-221-0/+35
|
* glasm: Declare geometry program headersReinUsesLisp2021-07-221-0/+35
|
* glasm: Implement ImageReadReinUsesLisp2021-07-221-1/+2
|
* glasm: Implement stores to gl_ViewportIndexReinUsesLisp2021-07-221-4/+12
|
* glasm: Support textures used in more than one stageReinUsesLisp2021-07-221-2/+2
|
* shader: Read branch conditions from an instructionReinUsesLisp2021-07-221-1/+1
| | | | Fixes the identity removal pass.
* glasm: Implement TEX and TEXS instructionsReinUsesLisp2021-07-221-0/+3
| | | | | Remove lod clamp from texture instructions with lod, as this is not needed (nor supported).
* emit_glasm: Enable ARB_draw_buffers when neededReinUsesLisp2021-07-221-0/+4
|
* shader_recompiler: GCC fixeslat9nq2021-07-221-8/+8
| | | | | Fixes members of unnamed union not being accessible, and one function without a declaration.
* glasm: Add Void type to GLASM valuesReinUsesLisp2021-07-221-0/+1
|
* glasm: Add graphics specific shader declarations to GLASMReinUsesLisp2021-07-221-6/+26
|
* glasm: Implement local memory for glasmameerj2021-07-221-0/+3
|
* glasm: Initial implementation of phi nodes on GLASMReinUsesLisp2021-07-221-3/+56
|
* glasm: Declare NV_shader_thread_group when neededReinUsesLisp2021-07-221-3/+4
|
* glasm: Rework control flow introducing a syntax listReinUsesLisp2021-07-221-7/+34
| | | | | This commit regresses VertexA shaders, their transformation pass has to be adapted to the new control flow.
* glasm: Implement Storage atomicsameerj2021-07-221-0/+7
| | | | | StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit result into the register
* glasm: Ensure reg alloc order across compilers on GLASMReinUsesLisp2021-07-221-11/+14
| | | | | | | | | | | | | | | | | | Use a struct constructor to serialize register allocation arguments to ensure registers are allocated in the same order regardless of the compiler used. The A and B functions can be called in any order when passed as arguments to "foo": foo(A(), B()) But the order is guaranteed for curly-braced constructor calls in classes: Foo{A(), B()} Use this to get consistent behavior.
* glasm: Enable unintentionally disabled register aliasing on GLASMReinUsesLisp2021-07-221-16/+11
|