bf2956d77a
shader: Avoid usage of C++20 ranges to build in clang
2021-07-22 21:51:40 -04:00
8a3427a4c8
glasm: Add passthrough geometry shader support
2021-07-22 21:51:39 -04:00
7dafa96ab5
shader: Rework varyings and implement passthrough geometry shaders
...
Put all varyings into a single std::bitset with helpers to access it.
Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
808ef97a08
shader: Move loop safety tests to code emission
2021-07-22 21:51:39 -04:00
3a2dd1b483
glasm: Implement SetAttribute ViewportMask
2021-07-22 21:51:39 -04:00
0ffea97e2e
shader: Split profile and runtime info headers
2021-07-22 21:51:38 -04:00
61cd7dd301
shader: Add logging
2021-07-22 21:51:35 -04:00
79f2fe1a39
glasm: Use ARB_derivative_control conditionally
2021-07-22 21:51:34 -04:00
916ca74324
opengl: Declare fragment outputs even if they are not used
...
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.
2021-07-22 21:51:34 -04:00
b6c087496b
glasm: Reduce reg allocation leaks from an exception to a log
2021-07-22 21:51:34 -04:00
f58f79c85d
glasm: Implement Y direction
2021-07-22 21:51:33 -04:00
48aafe0961
glasm: Release phi node registers after they are no longer needed
2021-07-22 21:51:33 -04:00
75fd0079db
glasm: Remove unnecessary value types
2021-07-22 21:51:33 -04:00
379b305b4b
glasm: Throw when there are register leaks
2021-07-22 21:51:33 -04:00
ca05a13c62
glasm: Catch more register leaks
...
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.
2021-07-22 21:51:33 -04:00
9fbfe7d676
glasm: Fix usage counting on phi nodes
2021-07-22 21:51:33 -04:00
c31521512f
gl_shader_cache,glasm: Conditionally use typeless image reads extension
2021-07-22 21:51:33 -04:00
84feabac88
glasm: Implement forced early Z
2021-07-22 21:51:33 -04:00
9e7b6622c2
shader: Split profile and runtime information in separate structs
2021-07-22 21:51:33 -04:00
36d040da70
glasm: Implement FSWZADD
2021-07-22 21:51:33 -04:00
48d4e26326
glasm: Fix tessellation headers
2021-07-22 21:51:32 -04:00
9ec2303ad6
glasm: Add tessellation shader declarations
2021-07-22 21:51:32 -04:00
fad139a3e6
glasm: Declare geometry program headers
2021-07-22 21:51:32 -04:00
dadd192b30
glasm: Implement ImageRead
2021-07-22 21:51:32 -04:00
accad56ee7
glasm: Implement stores to gl_ViewportIndex
2021-07-22 21:51:32 -04:00
8b7d5912d6
glasm: Support textures used in more than one stage
2021-07-22 21:51:32 -04:00
9bb3e008c9
shader: Read branch conditions from an instruction
...
Fixes the identity removal pass.
2021-07-22 21:51:32 -04:00
ec6fc5fe78
glasm: Implement TEX and TEXS instructions
...
Remove lod clamp from texture instructions with lod, as this is not
needed (nor supported).
2021-07-22 21:51:31 -04:00
db2f0f4108
emit_glasm: Enable ARB_draw_buffers when needed
2021-07-22 21:51:31 -04:00
f7a2340205
shader_recompiler: GCC fixes
...
Fixes members of unnamed union not being accessible, and one function
without a declaration.
2021-07-22 21:51:31 -04:00
31d402ee74
glasm: Add Void type to GLASM values
2021-07-22 21:51:31 -04:00
3764750339
glasm: Add graphics specific shader declarations to GLASM
2021-07-22 21:51:31 -04:00
057dee4856
glasm: Implement local memory for glasm
2021-07-22 21:51:31 -04:00
bf5e48ffe4
glasm: Initial implementation of phi nodes on GLASM
2021-07-22 21:51:31 -04:00
d4385c34e3
glasm: Declare NV_shader_thread_group when needed
2021-07-22 21:51:31 -04:00
d54d7de40e
glasm: Rework control flow introducing a syntax list
...
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
2021-07-22 21:51:31 -04:00
7ff5851608
glasm: Implement Storage atomics
...
StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit
result into the register
2021-07-22 21:51:31 -04:00
8c81a20ace
glasm: Ensure reg alloc order across compilers on GLASM
...
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.
2021-07-22 21:51:31 -04:00
c917290497
glasm: Enable unintentionally disabled register aliasing on GLASM
2021-07-22 21:51:31 -04:00
c4fd6b55bc
glasm: Implement shuffle and vote instructions on GLASM
2021-07-22 21:51:31 -04:00
deda89372f
glasm: Fix register allocation when moving immediate on GLASM
2021-07-22 21:51:31 -04:00
8eb72ff0dc
glasm: Fix moving U64 immediates to registers in GLASM
2021-07-22 21:51:31 -04:00
80813b1d14
glasm: Implement storage atomic ops
2021-07-22 21:51:31 -04:00
ad61b47f80
glasm: Add conversion instructions to GLASM
2021-07-22 21:51:31 -04:00
4502595bc2
glasm: Initial GLASM fp64 support
2021-07-22 21:51:30 -04:00
9f851e3832
glasm: Implement GLASM fp16 packing and move bitwise insns
2021-07-22 21:51:30 -04:00
1c9307969c
glasm: Make GLASM aware of types
2021-07-22 21:51:30 -04:00
2b04b4d27f
glasm: Remove unused argument in identity instructions on GLASM
2021-07-22 21:51:30 -04:00
6fd190d1ae
glasm: Implement basic GLASM instructions
2021-07-22 21:51:30 -04:00
b10cf64c48
glasm: Add GLASM backend infrastructure
2021-07-22 21:51:30 -04:00